aboutsummaryrefslogtreecommitdiffstats
path: root/testhal/KINETIS
diff options
context:
space:
mode:
authorFabien Poussin <fabien.poussin@gmail.com>2018-03-14 20:15:13 +0100
committerFabien Poussin <fabien.poussin@gmail.com>2018-03-14 20:15:13 +0100
commit424c7a2717fb6b2a847cec5c0060e3236f25e97f (patch)
treeb41f66639a1bcafa9d8ddbf8feb800d8cd7ffbbd /testhal/KINETIS
parent1bfe2ef9f7f39d93174b1f62ac4b079aac2dea59 (diff)
downloadChibiOS-Contrib-424c7a2717fb6b2a847cec5c0060e3236f25e97f.tar.gz
ChibiOS-Contrib-424c7a2717fb6b2a847cec5c0060e3236f25e97f.tar.bz2
ChibiOS-Contrib-424c7a2717fb6b2a847cec5c0060e3236f25e97f.zip
Fixed most testhal examples for STM32, updated configs using script. Fixed deprecated MS2ST calls.
Diffstat (limited to 'testhal/KINETIS')
-rw-r--r--testhal/KINETIS/TEENSY3_x/ADC/main.c6
-rw-r--r--testhal/KINETIS/TEENSY3_x/EXT/main.c2
-rw-r--r--testhal/KINETIS/TEENSY3_x/SERIAL/main.c2
3 files changed, 5 insertions, 5 deletions
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)
{