Add sleepForever() function
This commit is contained in:
parent
c5f3220569
commit
428a0f437f
2 changed files with 7 additions and 1 deletions
3
modules/control/Firmware/src/FreeRTOS/Util.cpp
Normal file
3
modules/control/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 {
|
||||
/// @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
|
||||
|
|
Reference in a new issue