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/STM32/STM32F4xx/EICU/main.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'testhal/STM32/STM32F4xx/EICU/main.c') diff --git a/testhal/STM32/STM32F4xx/EICU/main.c b/testhal/STM32/STM32F4xx/EICU/main.c index 90f8eb1..a6dbf8a 100644 --- a/testhal/STM32/STM32F4xx/EICU/main.c +++ b/testhal/STM32/STM32F4xx/EICU/main.c @@ -35,10 +35,10 @@ typedef struct { /* * Chose values suitable for measurement using 16-bit timer on 1MHz */ -static pulse_t pulse_led3 = {MS2ST(2), MS2ST(59), GPIOD_LED3}; -static pulse_t pulse_led4 = {MS2ST(3), MS2ST(53), GPIOD_LED4}; -static pulse_t pulse_led5 = {MS2ST(5), MS2ST(47), GPIOD_LED5}; -static pulse_t pulse_led6 = {MS2ST(7), MS2ST(43), GPIOD_LED6}; +static pulse_t pulse_led3 = {TIME_MS2I(2), TIME_MS2I(59), GPIOD_LED3}; +static pulse_t pulse_led4 = {TIME_MS2I(3), TIME_MS2I(53), GPIOD_LED4}; +static pulse_t pulse_led5 = {TIME_MS2I(5), TIME_MS2I(47), GPIOD_LED5}; +static pulse_t pulse_led6 = {TIME_MS2I(7), TIME_MS2I(43), GPIOD_LED6}; /* * @@ -72,19 +72,19 @@ void eicu_cb(EICUDriver *eicup, eicuchannel_t channel, uint32_t w, uint32_t p) { (void)p; switch (channel) { case EICU_CHANNEL_1: - if (abs((int32_t)w - (int32_t)ST2US(pulse_led3.high)) > tolerance) + if (abs((int32_t)w - (int32_t)TIME_I2US(pulse_led3.high)) > tolerance) osalSysHalt("ch1"); break; case EICU_CHANNEL_2: - if (abs((int32_t)w - (int32_t)ST2US(pulse_led4.high)) > tolerance) + if (abs((int32_t)w - (int32_t)TIME_I2US(pulse_led4.high)) > tolerance) osalSysHalt("ch2"); break; case EICU_CHANNEL_3: - if (abs((int32_t)w - (int32_t)ST2US(pulse_led5.high)) > tolerance) + if (abs((int32_t)w - (int32_t)TIME_I2US(pulse_led5.high)) > tolerance) osalSysHalt("ch3"); break; case EICU_CHANNEL_4: - if (abs((int32_t)w - (int32_t)ST2US(pulse_led6.high)) > tolerance) + if (abs((int32_t)w - (int32_t)TIME_I2US(pulse_led6.high)) > tolerance) osalSysHalt("ch4"); break; default: -- cgit v1.2.3