aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/STM32/STM32L4xx/CAN/main.c
diff options
context:
space:
mode:
Diffstat (limited to 'testhal/STM32/STM32L4xx/CAN/main.c')
-rw-r--r--testhal/STM32/STM32L4xx/CAN/main.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/testhal/STM32/STM32L4xx/CAN/main.c b/testhal/STM32/STM32L4xx/CAN/main.c
index 809d5ab5e..5aaea86ec 100644
--- a/testhal/STM32/STM32L4xx/CAN/main.c
+++ b/testhal/STM32/STM32L4xx/CAN/main.c
@@ -48,7 +48,7 @@ static THD_FUNCTION(can_rx, p) {
chRegSetThreadName("receiver");
chEvtRegister(&cip->canp->rxfull_event, &el, 0);
while(!chThdShouldTerminateX()) {
- 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) {
@@ -76,7 +76,7 @@ static THD_FUNCTION(can_tx, p) {
txmsg.data32[1] = 0x00FF00FF;
while (!chThdShouldTerminateX()) {
- canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, MS2ST(100));
+ canTransmit(&CAND1, CAN_ANY_MAILBOX, &txmsg, TIME_MS2I(100));
chThdSleepMilliseconds(500);
}
}