aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32F4xx/CAN/main.c
diff options
context:
space:
mode:
authorgdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-02-23 09:04:38 +0000
committergdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4>2013-02-23 09:04:38 +0000
commit4256a9113fd16e1b8d7cef963f83931b7d9182ad (patch)
tree5d4e1692bfef3431bcb95255afc8c22915234969 /testhal/STM32F4xx/CAN/main.c
parent61524c2014380d425983c269f641c6f7404fb8d9 (diff)
downloadChibiOS-4256a9113fd16e1b8d7cef963f83931b7d9182ad.tar.gz
ChibiOS-4256a9113fd16e1b8d7cef963f83931b7d9182ad.tar.bz2
ChibiOS-4256a9113fd16e1b8d7cef963f83931b7d9182ad.zip
CAN driver enhancements completed.
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@5303 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx/CAN/main.c')
-rw-r--r--testhal/STM32F4xx/CAN/main.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/testhal/STM32F4xx/CAN/main.c b/testhal/STM32F4xx/CAN/main.c
index e095da4d5..2ff2025e0 100644
--- a/testhal/STM32F4xx/CAN/main.c
+++ b/testhal/STM32F4xx/CAN/main.c
@@ -56,7 +56,8 @@ static msg_t can_rx(void *p) {
while(!chThdShouldTerminate()) {
if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0)
continue;
- while (canReceive(cip->canp, 1, &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
+ while (canReceive(cip->canp, CAN_ANY_MAILBOX,
+ &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
/* Process message.*/
palTogglePad(GPIOD, cip->led);
}
@@ -82,8 +83,8 @@ static msg_t can_tx(void * p) {
txmsg.data32[1] = 0x00FF00FF;
while (!chThdShouldTerminate()) {
- canTransmit(&CAND1, CAN_ANY_TX_MAILBOX, &txmsg, MS2ST(100));
- canTransmit(&CAND2, CAN_ANY_TX_MAILBOX, &txmsg, MS2ST(100));
+ canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
+ canTransmit(&CAND2, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
chThdSleepMilliseconds(500);
}
return 0;