Skip to content
Snippets Groups Projects
Verified Commit e9ca7b4d authored by rahix's avatar rahix
Browse files

feat(epicardium): Enable FreeRTOS timers


Signed-off-by: default avatarRahix <rahix@rahix.de>
parent 36d858b9
No related branches found
No related tags found
No related merge requests found
......@@ -43,6 +43,11 @@
#define configUSE_CO_ROUTINES 0
#define configUSE_16_BIT_TICKS 0
#define configUSE_MUTEXES 1
#define configUSE_TIMERS 1
#define configTIMER_TASK_PRIORITY (configMAX_PRIORITIES - 1)
#define configTIMER_QUEUE_LENGTH 10
#define configTIMER_TASK_STACK_DEPTH (configMINIMAL_STACK_SIZE * 2)
#define INCLUDE_vTaskSuspend 1
#define INCLUDE_vTaskDelay 1
......
......@@ -80,3 +80,35 @@ void vApplicationGetIdleTaskMemory(
*/
*pulIdleTaskStackSize = configMINIMAL_STACK_SIZE;
}
void vApplicationGetTimerTaskMemory(
StaticTask_t **ppxTimerTaskTCBBuffer,
StackType_t **ppxTimerTaskStackBuffer,
uint32_t *pulTimerTaskStackSize
) {
/*
* If the buffers to be provided to the Timer task are declared inside
* this function then they must be declared static - otherwise they will
* be allocated on the stack and so not exists after this function
* exits.
*/
static StaticTask_t xTimerTaskTCB;
static StackType_t uxTimerTaskStack[configTIMER_TASK_STACK_DEPTH];
/*
* Pass out a pointer to the StaticTask_t structure in which the Timer
* task's state will be stored.
*/
*ppxTimerTaskTCBBuffer = &xTimerTaskTCB;
/* Pass out the array that will be used as the Timer task's stack. */
*ppxTimerTaskStackBuffer = uxTimerTaskStack;
/*
* Pass out the size of the array pointed to by
* *ppxTimerTaskStackBuffer. Note that, as the array is necessarily of
* type StackType_t, configMINIMAL_STACK_SIZE is specified in words, not
* bytes.
*/
*pulTimerTaskStackSize = configTIMER_TASK_STACK_DEPTH;
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment