diff options
author | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-23 09:17:33 +0000 |
---|---|---|
committer | gdisirio <gdisirio@35acf78f-673a-0410-8e92-d51de3d6d3f4> | 2013-08-23 09:17:33 +0000 |
commit | 19745e5d5857dad5ed80ad3465434a9cfc5f5b65 (patch) | |
tree | eb02b2c5fe99c7fe3319fc14e3cd1a20fbbbb025 /testhal/STM32F4xx/CAN/main.c | |
parent | 32c2d2fca06f0cc2122a5fc944716b629f8f8fcd (diff) | |
download | ChibiOS-19745e5d5857dad5ed80ad3465434a9cfc5f5b65.tar.gz ChibiOS-19745e5d5857dad5ed80ad3465434a9cfc5f5b65.tar.bz2 ChibiOS-19745e5d5857dad5ed80ad3465434a9cfc5f5b65.zip |
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6208 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'testhal/STM32F4xx/CAN/main.c')
-rw-r--r-- | testhal/STM32F4xx/CAN/main.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/testhal/STM32F4xx/CAN/main.c b/testhal/STM32F4xx/CAN/main.c index 8202afe1e..373fca4fc 100644 --- a/testhal/STM32F4xx/CAN/main.c +++ b/testhal/STM32F4xx/CAN/main.c @@ -43,17 +43,17 @@ static WORKING_AREA(can_rx1_wa, 256); static WORKING_AREA(can_rx2_wa, 256);
static msg_t can_rx(void *p) {
struct can_instance *cip = p;
- EventListener el;
+ event_listener_t el;
CANRxFrame rxmsg;
(void)p;
chRegSetThreadName("receiver");
chEvtRegister(&cip->canp->rxfull_event, &el, 0);
- while(!chThdShouldTerminate()) {
+ while(!chThdShouldTerminateX()) {
if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0)
continue;
while (canReceive(cip->canp, CAN_ANY_MAILBOX,
- &rxmsg, TIME_IMMEDIATE) == RDY_OK) {
+ &rxmsg, TIME_IMMEDIATE) == MSG_OK) {
/* Process message.*/
palTogglePad(GPIOD, cip->led);
}
@@ -78,7 +78,7 @@ static msg_t can_tx(void * p) { txmsg.data32[0] = 0x55AA55AA;
txmsg.data32[1] = 0x00FF00FF;
- while (!chThdShouldTerminate()) {
+ while (!chThdShouldTerminateX()) {
canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
canTransmit(&CAND2, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
chThdSleepMilliseconds(500);
|