diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-04-06 08:42:25 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-04-06 08:42:25 +0000 |
commit | 44a4c3aacb6bc9ea440ca4a74cb3d568051f1317 (patch) | |
tree | 0e3df89301b5466009e7418af3ad9b8882d0c246 /testhal/STM32F37x/I2C/main.c | |
parent | 9986b28b99c257afb7eb5666ca30513c461f1c53 (diff) | |
download | ChibiOS-44a4c3aacb6bc9ea440ca4a74cb3d568051f1317.tar.gz ChibiOS-44a4c3aacb6bc9ea440ca4a74cb3d568051f1317.tar.bz2 ChibiOS-44a4c3aacb6bc9ea440ca4a74cb3d568051f1317.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5547 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F37x/I2C/main.c')
-rw-r--r-- | testhal/STM32F37x/I2C/main.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/testhal/STM32F37x/I2C/main.c b/testhal/STM32F37x/I2C/main.c index 113515d39..46f190f2a 100644 --- a/testhal/STM32F37x/I2C/main.c +++ b/testhal/STM32F37x/I2C/main.c @@ -55,6 +55,7 @@ static msg_t blinker(void *arg) { palClearPad(GPIOC, GPIOC_LED1);
chThdSleepMilliseconds(500);
}
+ return 0;
}
/*
@@ -95,12 +96,13 @@ int main(void) { msg = i2cMasterTransmitTimeout(&I2CD2, 0x52, cmd, sizeof(cmd),
data, sizeof(data), TIME_INFINITE);
if (msg != RDY_OK)
- chSysHalt();
+ palTogglePad(GPIOC, GPIOC_LED3);
for (i = 0; i < 256; i++) {
+ chThdSleepMilliseconds(2);
msg = i2cMasterReceiveTimeout(&I2CD2, 0x52,
data, sizeof(data), TIME_INFINITE);
if (msg != RDY_OK)
- chSysHalt();
+ palTogglePad(GPIOC, GPIOC_LED3);
}
chThdSleepMilliseconds(500);
palTogglePad(GPIOC, GPIOC_LED2);
|