aboutsummaryrefslogtreecommitdiffstats
path: root/testhal
diff options
context:
space:
mode:
authorbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-14 18:11:35 +0000
committerbarthess <barthess@35acf78f-673a-0410-8e92-d51de3d6d3f4>2012-08-14 18:11:35 +0000
commitcd0be9838e1bb9624854ba1128af7ee55cae63c5 (patch)
tree9b4923ce92c0af138987ecb1336a41ba501c6213 /testhal
parent023c9515e432b94ec4a71b563729f03cc3e1d381 (diff)
downloadChibiOS-cd0be9838e1bb9624854ba1128af7ee55cae63c5.tar.gz
ChibiOS-cd0be9838e1bb9624854ba1128af7ee55cae63c5.tar.bz2
ChibiOS-cd0be9838e1bb9624854ba1128af7ee55cae63c5.zip
I2C. Minor changes in testhal.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@4572 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal')
-rw-r--r--testhal/STM32F1xx/I2C/i2c_pns.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/testhal/STM32F1xx/I2C/i2c_pns.c b/testhal/STM32F1xx/I2C/i2c_pns.c
index 96ac9a0bd..a64dab546 100644
--- a/testhal/STM32F1xx/I2C/i2c_pns.c
+++ b/testhal/STM32F1xx/I2C/i2c_pns.c
@@ -28,8 +28,8 @@
/* I2C1 */
static const I2CConfig i2cfg1 = {
OPMODE_I2C,
- 360000,
- FAST_DUTY_CYCLE_16_9,
+ 400000,
+ FAST_DUTY_CYCLE_2,
};
@@ -43,9 +43,9 @@ void I2CInit_pns(void){
palSetPadMode(IOPORT2, 6, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
palSetPadMode(IOPORT2, 7, PAL_MODE_STM32_ALTERNATE_OPENDRAIN);
- /* startups. Pauses added just to be safe */
- chThdSleepMilliseconds(100);
- init_lis3();
+ chThdSleepMilliseconds(100); /* Just to be safe. */
+
+ init_lis3(); /* accelerometer init */
}