Add sleepForever() function

This commit is contained in:
GHOSCHT 2023-03-25 18:07:57 +01:00
parent c5f3220569
commit 428a0f437f
No known key found for this signature in database
2 changed files with 7 additions and 1 deletions

View file

@ -0,0 +1,3 @@
#include "Util.h"
void freertos::sleep(int time) { vTaskDelay(time * portTICK_PERIOD_MS); }
void freertos::sleepForever() { vTaskDelay(portMAX_DELAY); }

View file

@ -4,5 +4,8 @@
namespace freertos {
/// @brief Blocks the task for the specified amount of time
/// @param time in milliseconds
void sleep(int time) { vTaskDelay(time * portTICK_PERIOD_MS); }
void sleep(int time);
/// @brief Sleep for the maximum delay possible
void sleepForever();
} // namespace freertos