From 19745e5d5857dad5ed80ad3465434a9cfc5f5b65 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Fri, 23 Aug 2013 09:17:33 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/branches/kernel_3_dev@6208 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32F4xx/CAN/main.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'testhal/STM32F4xx/CAN/main.c') 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); -- cgit v1.2.3