61 #if defined(FOXBMS_USES_FREERTOS)
64 #define OS_QUEUE QueueHandle_t
65 #define OS_IDLE_TASK_STACK_SIZE (configMINIMAL_STACK_SIZE)
66 #define OS_TICK_RATE_MS (portTICK_RATE_MS)
67 #define OS_ENABLE_CACHE (false)
72 #if (configUSE_TIMERS > 0) && (configSUPPORT_STATIC_ALLOCATION == 1)
73 #define OS_TIMER_TASK_STACK_SIZE configTIMER_TASK_STACK_DEPTH
161 #if (configUSE_TIMERS > 0) && (configSUPPORT_STATIC_ALLOCATION == 1)
172 extern void vApplicationGetTimerTaskMemory(
173 StaticTask_t **ppxTimerTaskTCBBuffer,
174 StackType_t **ppxTimerTaskStackBuffer,
175 uint32_t *pulTimerTaskStackSize);
227 extern void OS_DelayTaskUntil(uint32_t *pPreviousWakeTime, uint32_t milliseconds);
288 const void *
const pvItemToQueue,
289 long *
const pxHigherPriorityTaskWoken);
322 uint32_t oldTimeStamp_ms,
323 uint32_t currentTimeStamp_ms,
324 uint32_t timeToPass_ms);
337 #ifdef UNITY_UNIT_TEST
General macros and definitions for the whole platform.
OS_STD_RETURN_e OS_ReceiveFromQueue(OS_QUEUE xQueue, void *const pvBuffer, uint32_t ticksToWait)
Receive an item from a queue.
void OS_StartScheduler(void)
Starts the operating system scheduler.
void OS_DelayTaskUntil(uint32_t *pPreviousWakeTime, uint32_t milliseconds)
Delay a task until a specified time.
OS_PRIORITY_e
typedef for thread priority. The higher the value, the higher the priority.
@ OS_PRIORITY_BELOW_REALTIME
@ OS_PRIORITY_BELOW_NORMAL
@ OS_PRIORITY_ABOVE_NORMAL
OS_STD_RETURN_e OS_SendToBackOfQueueFromIsr(OS_QUEUE xQueue, const void *const pvItemToQueue, long *const pxHigherPriorityTaskWoken)
Post an item to the back the provided queue during an ISR.
uint32_t os_schedulerStartTime
Scheduler "zero" time for task phase control.
void OS_MarkTaskAsRequiringFpuContext(void)
Marks the current task as requiring FPU context.
bool OS_CheckTimeHasPassed(uint32_t oldTimeStamp_ms, uint32_t timeToPass_ms)
This function checks if timeToPass has passed since the last timestamp to now.
STD_RETURN_TYPE_e OS_CheckTimeHasPassedSelfTest(void)
Does a self check if the OS_CheckTimeHasPassedWithTimestamp works as expected.
uint32_t OS_GetNumberOfStoredMessagesInQueue(OS_QUEUE xQueue)
Check if messages are waiting for queue.
OS_BOOT_STATE_e
enum of OS boot states
@ OS_INITIALIZE_SCHEDULER
@ OS_PRE_CYCLIC_INITIALIZATION_HAS_FINISHED
@ OS_INIT_OS_FATALERROR_SCHEDULER
bool OS_CheckTimeHasPassedWithTimestamp(uint32_t oldTimeStamp_ms, uint32_t currentTimeStamp_ms, uint32_t timeToPass_ms)
This function checks if timeToPass has passed since the last timestamp to now.
void OS_ExitTaskCritical(void)
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
void OS_InitializeOperatingSystem(void)
Initialization the RTOS interface.
OS_TIMER_s * TEST_OS_GetOsTimer()
void vApplicationIdleHook(void)
Hook function for the idle task.
void OS_IncrementTimer(void)
Increments the system timer os_timer.
void OS_EnterTaskCritical(void)
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR.
OS_STD_RETURN_e OS_SendToBackOfQueue(OS_QUEUE xQueue, const void *const pvItemToQueue, uint32_t ticksToWait)
Post an item to the back the provided queue.
void OS_InitializeScheduler(void)
Initialization function for the scheduler.
uint32_t OS_GetTickCount(void)
Returns OS based system tick value.
volatile OS_BOOT_STATE_e os_boot
struct for FreeRTOS task definition