Add sleepForever() function

This commit is contained in:
GHOSCHT 2023-03-25 18:07:57 +01:00
parent 909ca16fd7
commit 415c5a04b1
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 { namespace freertos {
/// @brief Blocks the task for the specified amount of time /// @brief Blocks the task for the specified amount of time
/// @param time in milliseconds /// @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 } // namespace freertos