diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-02-22 14:45:58 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-02-22 14:45:58 +0000 |
commit | 04385d42d46173127ac7c5274cbd15d5d255c460 (patch) | |
tree | 3ee6d3d57897cd1b47f14244d2f5554b76a036dd /testhal/STM32F4xx | |
parent | 48506ff3481afe8e2490e78a451852bc4bbb1c0b (diff) | |
download | ChibiOS-04385d42d46173127ac7c5274cbd15d5d255c460.tar.gz ChibiOS-04385d42d46173127ac7c5274cbd15d5d255c460.tar.bz2 ChibiOS-04385d42d46173127ac7c5274cbd15d5d255c460.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5300 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx')
-rw-r--r-- | testhal/STM32F4xx/CAN/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/testhal/STM32F4xx/CAN/main.c b/testhal/STM32F4xx/CAN/main.c index e7a10247b..e095da4d5 100644 --- a/testhal/STM32F4xx/CAN/main.c +++ b/testhal/STM32F4xx/CAN/main.c @@ -56,7 +56,7 @@ static msg_t can_rx(void *p) { while(!chThdShouldTerminate()) {
if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0)
continue;
- while (canReceive(cip->canp, &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
+ while (canReceive(cip->canp, 1, &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
/* Process message.*/
palTogglePad(GPIOD, cip->led);
}
@@ -82,8 +82,8 @@ static msg_t can_tx(void * p) { txmsg.data32[1] = 0x00FF00FF;
while (!chThdShouldTerminate()) {
- canTransmit(&CAND1, &txmsg, MS2ST(100));
- canTransmit(&CAND2, &txmsg, MS2ST(100));
+ canTransmit(&CAND1, CAN_ANY_TX_MAILBOX, &txmsg, MS2ST(100));
+ canTransmit(&CAND2, CAN_ANY_TX_MAILBOX, &txmsg, MS2ST(100));
chThdSleepMilliseconds(500);
}
return 0;
|