From 84a9fcee486dd5a92ee02e58ecfa98e09cf244a0 Mon Sep 17 00:00:00 2001 From: "Matthias P. Braendli" Date: Sat, 11 Jun 2016 13:37:06 +0200 Subject: prefer pdMS_TO_TICKS --- src/temperature/main.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/temperature') 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(); -- cgit v1.2.3