aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-31 13:15:54 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2011-12-31 13:15:54 +0000
commit12158e277f53dc988600e31e256aa876332c3097 (patch)
tree357a4e8e2eacbe2b24b5659083b6cfb346994626 /testhal
parentbb25813ee93489b793b120ef7e595fa313e14234 (diff)
downloadChibiOS-12158e277f53dc988600e31e256aa876332c3097.tar.gz
ChibiOS-12158e277f53dc988600e31e256aa876332c3097.tar.bz2
ChibiOS-12158e277f53dc988600e31e256aa876332c3097.zip
I2C. STM32F4x testhal comments cleanup.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3698 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32F4xx/I2C/main.c8
1 files changed, 6 insertions, 2 deletions
diff --git a/testhal/STM32F4xx/I2C/main.c b/testhal/STM32F4xx/I2C/main.c
index 9caff15ec..5cb616e8c 100644
--- a/testhal/STM32F4xx/I2C/main.c
+++ b/testhal/STM32F4xx/I2C/main.c
@@ -17,6 +17,10 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
+/*
+ Concepts and parts of this file have been contributed by Uladzimir Pylinsky
+ aka barthess.
+ */
#include <stdlib.h>
@@ -128,7 +132,7 @@ int main(void) {
/**
* Prepares the accelerometer
*/
- txbuf[0] = ACCEL_CTRL_REG1; // register address
+ txbuf[0] = ACCEL_CTRL_REG1; /* register address */
txbuf[1] = 0x1;
i2cAcquireBus(&I2CD2);
i2cMasterTransmitTimeout(&I2CD2, mma8451_addr, txbuf, 2, rxbuf, 0, TIME_INFINITE);
@@ -140,7 +144,7 @@ int main(void) {
while (TRUE) {
chThdSleepMilliseconds(100);
- txbuf[0] = ACCEL_OUT_DATA; // register address
+ txbuf[0] = ACCEL_OUT_DATA; /* register address */
i2cAcquireBus(&I2CD2);
status = i2cMasterTransmitTimeout(&I2CD2, mma8451_addr, txbuf, 1, rxbuf, 6, TIME_INFINITE);
i2cReleaseBus(&I2CD2);