From 424c7a2717fb6b2a847cec5c0060e3236f25e97f Mon Sep 17 00:00:00 2001 From: Fabien Poussin Date: Wed, 14 Mar 2018 20:15:13 +0100 Subject: Fixed most testhal examples for STM32, updated configs using script. Fixed deprecated MS2ST calls. --- testhal/KINETIS/TEENSY3_x/ADC/main.c | 6 +++--- testhal/KINETIS/TEENSY3_x/EXT/main.c | 2 +- testhal/KINETIS/TEENSY3_x/SERIAL/main.c | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) (limited to 'testhal/KINETIS') diff --git a/testhal/KINETIS/TEENSY3_x/ADC/main.c b/testhal/KINETIS/TEENSY3_x/ADC/main.c index 7a2dc3a..09c3921 100644 --- a/testhal/KINETIS/TEENSY3_x/ADC/main.c +++ b/testhal/KINETIS/TEENSY3_x/ADC/main.c @@ -68,11 +68,11 @@ static void adc_end_cb(ADCDriver *adcp, adcsample_t *buffer, size_t n) { chSysLockFromISR(); chVTResetI(&vt); if (temp < 19000) { - chVTSetI(&vt, MS2ST(10), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(10), ledoff, NULL); } else if (temp > 28000) { - chVTSetI(&vt, MS2ST(20), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(20), ledoff, NULL); } else { - chVTSetI(&vt, MS2ST(40), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(40), ledoff, NULL); } chSysUnlockFromISR(); } diff --git a/testhal/KINETIS/TEENSY3_x/EXT/main.c b/testhal/KINETIS/TEENSY3_x/EXT/main.c index 3903897..f46d49c 100644 --- a/testhal/KINETIS/TEENSY3_x/EXT/main.c +++ b/testhal/KINETIS/TEENSY3_x/EXT/main.c @@ -31,7 +31,7 @@ static void extcb1(EXTDriver *extp, expchannel_t channel) { chSysLockFromISR(); chVTResetI(&vt); /* LED set to OFF after 500mS.*/ - chVTSetI(&vt, MS2ST(500), ledoff, NULL); + chVTSetI(&vt, TIME_MS2I(500), ledoff, NULL); chSysUnlockFromISR(); } diff --git a/testhal/KINETIS/TEENSY3_x/SERIAL/main.c b/testhal/KINETIS/TEENSY3_x/SERIAL/main.c index 722a398..66b21e0 100644 --- a/testhal/KINETIS/TEENSY3_x/SERIAL/main.c +++ b/testhal/KINETIS/TEENSY3_x/SERIAL/main.c @@ -26,7 +26,7 @@ static THD_FUNCTION(thSerEcho, arg) while (!chThdShouldTerminateX()) { - chEvtWaitOneTimeout(EVENT_MASK(1), MS2ST(10)); + chEvtWaitOneTimeout(EVENT_MASK(1), TIME_MS2I(10)); flags = chEvtGetAndClearFlags(&elSerData); if (flags & CHN_INPUT_AVAILABLE) { -- cgit v1.2.3