66 #if defined(FOXBMS_USES_FREERTOS)
69 #define OS_TASK_HANDLE TaskHandle_t
70 #define OS_QUEUE QueueHandle_t
71 #define OS_IDLE_TASK_STACK_SIZE (configMINIMAL_STACK_SIZE)
72 #define OS_TICK_RATE_MS (portTICK_RATE_MS)
73 #define OS_ENABLE_CACHE (false)
80 #if (configUSE_TIMERS > 0) && (configSUPPORT_STATIC_ALLOCATION == 1)
81 #define OS_TIMER_TASK_STACK_SIZE configTIMER_TASK_STACK_DEPTH
169 #if (configUSE_TIMERS > 0) && (configSUPPORT_STATIC_ALLOCATION == 1)
180 extern void vApplicationGetTimerTaskMemory(
181 StaticTask_t **ppxTimerTaskTCBBuffer,
182 StackType_t **ppxTimerTaskStackBuffer,
183 uint32_t *pulTimerTaskStackSize);
235 extern void OS_DelayTaskUntil(uint32_t *pPreviousWakeTime, uint32_t milliseconds);
306 uint32_t indexToWaitOn,
307 uint32_t *pNotifiedValue,
327 TaskHandle_t taskToNotify,
328 uint32_t indexToNotify,
329 uint32_t notifiedValue);
391 const void *
const pvItemToQueue,
392 long *
const pxHigherPriorityTaskWoken);
425 uint32_t oldTimeStamp_ms,
426 uint32_t currentTimeStamp_ms,
427 uint32_t timeToPass_ms);
440 #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.
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