62 #if defined(FOXBMS_USES_FREERTOS)
65 #define OS_TASK_HANDLE TaskHandle_t
66 #define OS_QUEUE QueueHandle_t
67 #define OS_IDLE_TASK_STACK_SIZE (configMINIMAL_STACK_SIZE)
68 #define OS_TICK_RATE_MS (portTICK_RATE_MS)
69 #define OS_ENABLE_CACHE (false)
77 #if (configUSE_TIMERS > 0) && (configSUPPORT_STATIC_ALLOCATION == 1)
78 #define OS_TIMER_TASK_STACK_SIZE configTIMER_TASK_STACK_DEPTH
166 #if (configUSE_TIMERS > 0) && (configSUPPORT_STATIC_ALLOCATION == 1)
177 extern void vApplicationGetTimerTaskMemory(
178 StaticTask_t **ppxTimerTaskTCBBuffer,
179 StackType_t **ppxTimerTaskStackBuffer,
180 uint32_t *pulTimerTaskStackSize);
232 extern void OS_DelayTaskUntil(uint32_t *pPreviousWakeTime, uint32_t milliseconds);
303 uint32_t indexToWaitOn,
304 uint32_t *pNotifiedValue,
324 TaskHandle_t taskToNotify,
325 uint32_t indexToNotify,
326 uint32_t notifiedValue);
388 const void *
const pvItemToQueue,
389 long *
const pxHigherPriorityTaskWoken);
422 uint32_t oldTimeStamp_ms,
423 uint32_t currentTimeStamp_ms,
424 uint32_t timeToPass_ms);
437 #ifdef UNITY_UNIT_TEST
Definition of foxBMS standard types.
OS_STD_RETURN_e OS_NotifyFromIsr(TaskHandle_t taskToNotify, uint32_t notifiedValue)
Notify a task.
OS_STD_RETURN_e OS_WaitForNotification(uint32_t *pNotifiedValue, uint32_t timeout)
Wait for a notification.
OS_STD_RETURN_e OS_ClearNotificationIndexed(uint32_t indexToClear)
Clear pending notification of a task, with index.
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
OS_STD_RETURN_e OS_WaitForNotificationIndexed(uint32_t indexToWaitOn, uint32_t *pNotifiedValue, uint32_t timeout)
Wait for a notification, with index.
OS_STD_RETURN_e OS_NotifyIndexedFromIsr(TaskHandle_t taskToNotify, uint32_t indexToNotify, uint32_t notifiedValue)
Notify a task, with index.
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