Add sleepForever() function
This commit is contained in:
parent
909ca16fd7
commit
415c5a04b1
2 changed files with 7 additions and 1 deletions
3
Firmware/src/FreeRTOS/Util.cpp
Normal file
3
Firmware/src/FreeRTOS/Util.cpp
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
#include "Util.h"
|
||||||
|
void freertos::sleep(int time) { vTaskDelay(time * portTICK_PERIOD_MS); }
|
||||||
|
void freertos::sleepForever() { vTaskDelay(portMAX_DELAY); }
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue