From 12158e277f53dc988600e31e256aa876332c3097 Mon Sep 17 00:00:00 2001 From: barthess Date: Sat, 31 Dec 2011 13:15:54 +0000 Subject: I2C. STM32F4x testhal comments cleanup. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3698 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32F4xx/I2C/main.c | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'testhal/STM32F4xx') 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 . */ +/* + Concepts and parts of this file have been contributed by Uladzimir Pylinsky + aka barthess. + */ #include @@ -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); -- cgit v1.2.3