diff options
author | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-06-11 13:37:06 +0200 |
---|---|---|
committer | Matthias P. Braendli <matthias.braendli@mpb.li> | 2016-06-11 13:37:06 +0200 |
commit | 84a9fcee486dd5a92ee02e58ecfa98e09cf244a0 (patch) | |
tree | 127d49a02f7c1c04e6f4d7a885841d23cd8a02b5 /src/temperature/main.c | |
parent | c5743bb412d50d81d01351750c31e38d3c13c020 (diff) | |
download | glutte-o-matic-84a9fcee486dd5a92ee02e58ecfa98e09cf244a0.tar.gz glutte-o-matic-84a9fcee486dd5a92ee02e58ecfa98e09cf244a0.tar.bz2 glutte-o-matic-84a9fcee486dd5a92ee02e58ecfa98e09cf244a0.zip |
prefer pdMS_TO_TICKS
Diffstat (limited to 'src/temperature/main.c')
-rw-r--r-- | src/temperature/main.c | 6 |
1 files changed, 3 insertions, 3 deletions
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(); |