From e6fbbc4da8ddf97e053651ad3d38802429562a23 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sat, 4 Nov 2017 16:03:57 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10939 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- testhal/STM32/STM32F4xx/CAN/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'testhal/STM32/STM32F4xx/CAN/main.c') diff --git a/testhal/STM32/STM32F4xx/CAN/main.c b/testhal/STM32/STM32F4xx/CAN/main.c index 0316505a4..f2c6b5463 100644 --- a/testhal/STM32/STM32F4xx/CAN/main.c +++ b/testhal/STM32/STM32F4xx/CAN/main.c @@ -50,7 +50,7 @@ static THD_FUNCTION(can_rx, p) { chRegSetThreadName("receiver"); chEvtRegister(&cip->canp->rxfull_event, &el, 0); while (true) { - if (chEvtWaitAnyTimeout(ALL_EVENTS, MS2ST(100)) == 0) + if (chEvtWaitAnyTimeout(ALL_EVENTS, TIME_MS2I(100)) == 0) continue; while (canReceive(cip->canp, CAN_ANY_MAILBOX, &rxmsg, TIME_IMMEDIATE) == MSG_OK) { @@ -78,8 +78,8 @@ static THD_FUNCTION(can_tx, p) { txmsg.data32[1] = 0x00FF00FF; while (true) { - canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100)); - canTransmit(&CAND2, CAN_ANY_MAILBOX, &txmsg, MS2ST(100)); + canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, TIME_MS2I(100)); + canTransmit(&CAND2, CAN_ANY_MAILBOX, &txmsg, TIME_MS2I(100)); chThdSleepMilliseconds(500); } } -- cgit v1.2.3