Add sleep function
This commit is contained in:
parent
1e40e1f870
commit
21b5796ee3
1 changed files with 8 additions and 0 deletions
8
modules/control/Firmware/src/FreeRTOS/Util.h
Normal file
8
modules/control/Firmware/src/FreeRTOS/Util.h
Normal file
|
@ -0,0 +1,8 @@
|
|||
#pragma once
|
||||
#include <Arduino.h>
|
||||
|
||||
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); }
|
||||
} // namespace freertos
|
Reference in a new issue