foxBMS
1.1.2
The foxBMS Battery Management System API Documentation
|
Implementation of the tasks used by the system. More...
Go to the source code of this file.
Macros | |
#define | OS_IDLE_TASK_STACK_SIZE configMINIMAL_STACK_SIZE |
Functions | |
void | OS_StartScheduler (void) |
Starts the operating system scheduler. More... | |
void | OS_InitializeOperatingSystem (void) |
Initialization the RTOS interface. More... | |
void | vApplicationGetIdleTaskMemory (StaticTask_t **ppxIdleTaskTCBBuffer, StackType_t **ppxIdleTaskStackBuffer, uint32_t *pulIdleTaskStackSize) |
Supplies the memory for the idle task. More... | |
void | vApplicationIdleHook (void) |
Hook function for the idle task. More... | |
void | vApplicationStackOverflowHook (TaskHandle_t xTask, char *pcTaskName) |
Hook function for StackOverflowHandling. More... | |
void | OS_TriggerTimer (volatile OS_TIMER_s *timer) |
Increments the system timer os_timer. More... | |
void | OS_EnterTaskCritical (void) |
Enter Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR. More... | |
void | OS_ExitTaskCritical (void) |
Exit Critical interface function for use in FreeRTOS-Tasks and FreeRTOS-ISR. More... | |
uint32_t | OS_GetTickCount (void) |
Returns OS based system tick value. More... | |
void | OS_DelayTask (uint32_t delay_ms) |
Delays a task in milliseconds. More... | |
void | OS_DelayTaskUntil (uint32_t *pPreviousWakeTime, uint32_t milliseconds) |
Delay a task until a specified time. More... | |
void | OS_SystemTickHandler (void) |
Handles the tick increment of operating systick timer. More... | |
Variables | |
volatile OS_BOOT_STATE_e | os_boot = OS_OFF |
volatile OS_TIMER_s | os_timer = {0, 0, 0, 0, 0, 0, 0} |
uint32_t | os_schedulerStartTime = 0 |
Scheduler "zero" time for task phase control. More... | |
static StaticTask_t | os_idleTaskTcbBuffer |
static StackType_t | os_stackSizeIdle [OS_IDLE_TASK_STACK_SIZE] |
Stack for the Idle task. More... | |
Implementation of the tasks used by the system.
SPDX-License-Identifier: BSD-3-Clause
Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
We kindly request you to use one or more of the following phrases to refer to foxBMS in your hardware, software, documentation or advertising materials:
Definition in file os.c.
#define OS_IDLE_TASK_STACK_SIZE configMINIMAL_STACK_SIZE |
void OS_DelayTask | ( | uint32_t | delay_ms | ) |
void OS_DelayTaskUntil | ( | uint32_t * | pPreviousWakeTime, |
uint32_t | milliseconds | ||
) |
Delay a task until a specified time.
TODO
pPreviousWakeTime | Pointer to a variable that holds the time at which the task was last unblocked. PreviousWakeTime must be initialized with the current time prior to its first use (PreviousWakeTime = OS_osSysTick()). |
milliseconds | time delay value in milliseconds |
void OS_EnterTaskCritical | ( | void | ) |
void OS_ExitTaskCritical | ( | void | ) |
uint32_t OS_GetTickCount | ( | void | ) |
void OS_InitializeOperatingSystem | ( | void | ) |
void OS_StartScheduler | ( | void | ) |
void OS_SystemTickHandler | ( | void | ) |
void OS_TriggerTimer | ( | volatile OS_TIMER_s * | timer | ) |
void vApplicationGetIdleTaskMemory | ( | StaticTask_t ** | ppxIdleTaskTCBBuffer, |
StackType_t ** | ppxIdleTaskStackBuffer, | ||
uint32_t * | pulIdleTaskStackSize | ||
) |
Supplies the memory for the idle task.
This is needed due to the usage of configSUPPORT_STATIC_ALLOCATION. This is an FreeRTOS function an does not adhere to foxBMS function naming convetions.
ppxIdleTaskTCBBuffer | TODO |
ppxIdleTaskStackBuffer | TODO |
pulIdleTaskStackSize | TODO |
void vApplicationIdleHook | ( | void | ) |
void vApplicationStackOverflowHook | ( | TaskHandle_t | xTask, |
char * | pcTaskName | ||
) |
volatile OS_BOOT_STATE_e os_boot = OS_OFF |
|
static |
uint32_t os_schedulerStartTime = 0 |
|
static |
volatile OS_TIMER_s os_timer = {0, 0, 0, 0, 0, 0, 0} |