diff options
-rw-r--r-- | src/common/src/Core/main.c | 8 | ||||
-rw-r--r-- | src/glutt-o-logique/pio.c | 2 | ||||
-rw-r--r-- | src/simulator/src/Core/main.c | 2 | ||||
-rw-r--r-- | src/simulator/src/GPIO/temperature.c | 2 | ||||
-rw-r--r-- | src/temperature/main.c | 6 |
5 files changed, 10 insertions, 10 deletions
diff --git a/src/common/src/Core/main.c b/src/common/src/Core/main.c index f11ba50..d23cda7 100644 --- a/src/common/src/Core/main.c +++ b/src/common/src/Core/main.c @@ -186,7 +186,7 @@ static void launcher_task(void __attribute__ ((unused))*pvParameters) while(1) { int i = 0; - vTaskDelay(1000 / portTICK_RATE_MS); + vTaskDelay(pdMS_TO_TICKS(1000)); if (i == 0) { i = 1; @@ -217,7 +217,7 @@ static void detect_button_press(void __attribute__ ((unused))*pvParameters) } } - vTaskDelay(10 / portTICK_RATE_MS); /* Debounce Delay */ + vTaskDelay(pdMS_TO_TICKS(10)); /* Debounce Delay */ if (pin_high_count == pin_high_thresh && last_pin_high_count != pin_high_count) { @@ -345,7 +345,7 @@ static void gps_monit_task(void __attribute__ ((unused))*pvParameters) { t_gps_hours_handeled = 0; } - vTaskDelay(100 / portTICK_RATE_MS); + vTaskDelay(pdMS_TO_TICKS(100)); // Reload watchdog #ifndef SIMULATOR @@ -373,7 +373,7 @@ static void exercise_fsm(void __attribute__ ((unused))*pvParameters) fsm_input.wind_generator_ok = 1; while (1) { - vTaskDelay(10 / portTICK_RATE_MS); + vTaskDelay(pdMS_TO_TICKS(10)); pio_set_fsm_signals(&fsm_input); diff --git a/src/glutt-o-logique/pio.c b/src/glutt-o-logique/pio.c index b389a0b..e7c2a29 100644 --- a/src/glutt-o-logique/pio.c +++ b/src/glutt-o-logique/pio.c @@ -149,7 +149,7 @@ void read_fsm_input_task(void __attribute__ ((unused))*pvParameters) pio_signals.sstv_mode = GPIO_ReadInputDataBit(GPIOC, GPIO_PIN_FAX) ? 1 : 0; - vTaskDelay(100 / portTICK_RATE_MS); + vTaskDelay(pdMS_TO_TICKS(100)); } } diff --git a/src/simulator/src/Core/main.c b/src/simulator/src/Core/main.c index d190bce..215ead5 100644 --- a/src/simulator/src/Core/main.c +++ b/src/simulator/src/Core/main.c @@ -76,7 +76,7 @@ int gui_gps_custom_year_len; static void thread_gui_gps(void __attribute__ ((unused))*arg) { while(1) { - vTaskDelay(1000 / portTICK_RATE_MS); + vTaskDelay(pdMS_TO_TICKS(1000)); if (gui_gps_send_frame) { diff --git a/src/simulator/src/GPIO/temperature.c b/src/simulator/src/GPIO/temperature.c index 34b079c..ce38097 100644 --- a/src/simulator/src/GPIO/temperature.c +++ b/src/simulator/src/GPIO/temperature.c @@ -37,7 +37,7 @@ void temperature_task(void __attribute__ ((unused))*pvParameters) { _temperature_last_value = gui_temperature; _temperature_valid = gui_temperature_valid; - vTaskDelay(1000 / portTICK_PERIOD_MS); + vTaskDelay(pdMS_TO_TICKS(1000)); } } diff --git a/src/temperature/main.c b/src/temperature/main.c index 9864dab..7be7f45 100644 --- a/src/temperature/main.c +++ b/src/temperature/main.c @@ -73,7 +73,7 @@ static void detect_button_press(void *pvParameters) if (GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0)>0) { while (GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0) > 0) { - vTaskDelay(100 / portTICK_RATE_MS); /* Button Debounce Delay */ + vTaskDelay(pdMS_TO_TICKS(100)); /* Button Debounce Delay */ } GPIO_ResetBits(GPIOD, GPIO_Pin_12); @@ -90,7 +90,7 @@ static void detect_button_press(void *pvParameters) GPIO_SetBits(GPIOD, GPIO_Pin_12); while (GPIO_ReadInputDataBit(GPIOA,GPIO_Pin_0) == 0) { - vTaskDelay(100 / portTICK_RATE_MS); /* Button Debounce Delay */ + vTaskDelay(pdMS_TO_TICKS(100)); /* Button Debounce Delay */ } } taskYIELD(); @@ -102,7 +102,7 @@ static void update_temperature(void *pvParameters) while (1) { - vTaskDelay(1000 / portTICK_RATE_MS); + vTaskDelay(pdMS_TO_TICKS(1000)); GPIO_SetBits(GPIOD, GPIO_Pin_13); temperature_update(); |