34 #error "include FreeRTOS.h must appear in source files before include task.h"
56#define tskKERNEL_VERSION_NUMBER "V10.6.2"
57#define tskKERNEL_VERSION_MAJOR 10
58#define tskKERNEL_VERSION_MINOR 6
59#define tskKERNEL_VERSION_BUILD 2
63#define tskMPU_REGION_READ_ONLY ( 1UL << 0UL )
64#define tskMPU_REGION_READ_WRITE ( 1UL << 1UL )
65#define tskMPU_REGION_EXECUTE_NEVER ( 1UL << 2UL )
66#define tskMPU_REGION_NORMAL_MEMORY ( 1UL << 3UL )
67#define tskMPU_REGION_DEVICE_MEMORY ( 1UL << 4UL )
71#define tskMPU_READ_PERMISSION ( 1UL << 0UL )
72#define tskMPU_WRITE_PERMISSION ( 1UL << 1UL )
79#define tskDEFAULT_INDEX_TO_NOTIFY ( 0 )
152 #if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
169 #if ( ( portSTACK_GROWTH > 0 ) && ( configRECORD_STACK_HIGH_ADDRESS == 1 ) )
181 #if ( INCLUDE_vTaskSuspend == 1 )
182 eNoTasksWaitingTimeout
191#define tskIDLE_PRIORITY ( ( UBaseType_t ) 0U )
201#define taskYIELD() portYIELD()
215#define taskENTER_CRITICAL() portENTER_CRITICAL()
216#define taskENTER_CRITICAL_FROM_ISR() portSET_INTERRUPT_MASK_FROM_ISR()
230#define taskEXIT_CRITICAL() portEXIT_CRITICAL()
231#define taskEXIT_CRITICAL_FROM_ISR( x ) portCLEAR_INTERRUPT_MASK_FROM_ISR( x )
241#define taskDISABLE_INTERRUPTS() portDISABLE_INTERRUPTS()
251#define taskENABLE_INTERRUPTS() portENABLE_INTERRUPTS()
256#define taskSCHEDULER_SUSPENDED ( ( BaseType_t ) 0 )
257#define taskSCHEDULER_NOT_STARTED ( ( BaseType_t ) 1 )
258#define taskSCHEDULER_RUNNING ( ( BaseType_t ) 2 )
359#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
361 const char *
const pcName,
363 void *
const pvParameters,
476#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
478 const char *
const pcName,
479 const uint32_t ulStackDepth,
480 void *
const pvParameters,
559#if ( portUSING_MPU_WRAPPERS == 1 )
649#if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
873#define vTaskDelayUntil( pxPreviousWakeTime, xTimeIncrement ) \
875 ( void ) xTaskDelayUntil( ( pxPreviousWakeTime ), ( xTimeIncrement ) ); \
1541#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
1611#ifdef configUSE_APPLICATION_TASK_TAG
1612 #if configUSE_APPLICATION_TASK_TAG == 1
1652#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS > 0 )
1659 void vTaskSetThreadLocalStoragePointer(
TaskHandle_t xTaskToSet,
1662 void * pvTaskGetThreadLocalStoragePointer(
TaskHandle_t xTaskToQuery,
1667#if ( configCHECK_FOR_STACK_OVERFLOW > 0 )
1683 char * pcTaskName );
1687#if ( configUSE_IDLE_HOOK == 1 )
1705#if ( configUSE_TICK_HOOK != 0 )
1715 void vApplicationTickHook(
void );
1719#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
1734 void vApplicationGetIdleTaskMemory(
StaticTask_t ** ppxIdleTaskTCBBuffer,
1736 uint32_t * pulIdleTaskStackSize );
2161#define xTaskNotify( xTaskToNotify, ulValue, eAction ) \
2162 xTaskGenericNotify( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( ulValue ), ( eAction ), NULL )
2163#define xTaskNotifyIndexed( xTaskToNotify, uxIndexToNotify, ulValue, eAction ) \
2164 xTaskGenericNotify( ( xTaskToNotify ), ( uxIndexToNotify ), ( ulValue ), ( eAction ), NULL )
2190#define xTaskNotifyAndQuery( xTaskToNotify, ulValue, eAction, pulPreviousNotifyValue ) \
2191 xTaskGenericNotify( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) )
2192#define xTaskNotifyAndQueryIndexed( xTaskToNotify, uxIndexToNotify, ulValue, eAction, pulPreviousNotifyValue ) \
2193 xTaskGenericNotify( ( xTaskToNotify ), ( uxIndexToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotifyValue ) )
2312 uint32_t * pulPreviousNotificationValue,
2314#define xTaskNotifyFromISR( xTaskToNotify, ulValue, eAction, pxHigherPriorityTaskWoken ) \
2315 xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) )
2316#define xTaskNotifyIndexedFromISR( xTaskToNotify, uxIndexToNotify, ulValue, eAction, pxHigherPriorityTaskWoken ) \
2317 xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( ulValue ), ( eAction ), NULL, ( pxHigherPriorityTaskWoken ) )
2343#define xTaskNotifyAndQueryIndexedFromISR( xTaskToNotify, uxIndexToNotify, ulValue, eAction, pulPreviousNotificationValue, pxHigherPriorityTaskWoken ) \
2344 xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( ulValue ), ( eAction ), ( pulPreviousNotificationValue ), ( pxHigherPriorityTaskWoken ) )
2345#define xTaskNotifyAndQueryFromISR( xTaskToNotify, ulValue, eAction, pulPreviousNotificationValue, pxHigherPriorityTaskWoken ) \
2346 xTaskGenericNotifyFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( ulValue ), ( eAction ), ( pulPreviousNotificationValue ), ( pxHigherPriorityTaskWoken ) )
2453 uint32_t ulBitsToClearOnEntry,
2454 uint32_t ulBitsToClearOnExit,
2455 uint32_t * pulNotificationValue,
2457#define xTaskNotifyWait( ulBitsToClearOnEntry, ulBitsToClearOnExit, pulNotificationValue, xTicksToWait ) \
2458 xTaskGenericNotifyWait( tskDEFAULT_INDEX_TO_NOTIFY, ( ulBitsToClearOnEntry ), ( ulBitsToClearOnExit ), ( pulNotificationValue ), ( xTicksToWait ) )
2459#define xTaskNotifyWaitIndexed( uxIndexToWaitOn, ulBitsToClearOnEntry, ulBitsToClearOnExit, pulNotificationValue, xTicksToWait ) \
2460 xTaskGenericNotifyWait( ( uxIndexToWaitOn ), ( ulBitsToClearOnEntry ), ( ulBitsToClearOnExit ), ( pulNotificationValue ), ( xTicksToWait ) )
2534#define xTaskNotifyGive( xTaskToNotify ) \
2535 xTaskGenericNotify( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( 0 ), eIncrement, NULL )
2536#define xTaskNotifyGiveIndexed( xTaskToNotify, uxIndexToNotify ) \
2537 xTaskGenericNotify( ( xTaskToNotify ), ( uxIndexToNotify ), ( 0 ), eIncrement, NULL )
2621#define vTaskNotifyGiveFromISR( xTaskToNotify, pxHigherPriorityTaskWoken ) \
2622 vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( pxHigherPriorityTaskWoken ) )
2623#define vTaskNotifyGiveIndexedFromISR( xTaskToNotify, uxIndexToNotify, pxHigherPriorityTaskWoken ) \
2624 vTaskGenericNotifyGiveFromISR( ( xTaskToNotify ), ( uxIndexToNotify ), ( pxHigherPriorityTaskWoken ) )
2727#define ulTaskNotifyTake( xClearCountOnExit, xTicksToWait ) \
2728 ulTaskGenericNotifyTake( ( tskDEFAULT_INDEX_TO_NOTIFY ), ( xClearCountOnExit ), ( xTicksToWait ) )
2729#define ulTaskNotifyTakeIndexed( uxIndexToWaitOn, xClearCountOnExit, xTicksToWait ) \
2730 ulTaskGenericNotifyTake( ( uxIndexToWaitOn ), ( xClearCountOnExit ), ( xTicksToWait ) )
2791#define xTaskNotifyStateClear( xTask ) \
2792 xTaskGenericNotifyStateClear( ( xTask ), ( tskDEFAULT_INDEX_TO_NOTIFY ) )
2793#define xTaskNotifyStateClearIndexed( xTask, uxIndexToClear ) \
2794 xTaskGenericNotifyStateClear( ( xTask ), ( uxIndexToClear ) )
2857#define ulTaskNotifyValueClear( xTask, ulBitsToClear ) \
2858 ulTaskGenericNotifyValueClear( ( xTask ), ( tskDEFAULT_INDEX_TO_NOTIFY ), ( ulBitsToClear ) )
2859#define ulTaskNotifyValueClearIndexed( xTask, uxIndexToClear, ulBitsToClear ) \
2860 ulTaskGenericNotifyValueClear( ( xTask ), ( uxIndexToClear ), ( ulBitsToClear ) )
3200#if ( portUSING_MPU_WRAPPERS == 1 )
3210#if ( ( portUSING_MPU_WRAPPERS == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) && ( configENABLE_ACCESS_CONTROL_LIST == 1 ) )
3215 void vGrantAccessToKernelObject(
TaskHandle_t xExternalTaskHandle,
3217 void vRevokeAccessToKernelObject(
TaskHandle_t xExternalTaskHandle,
3223 void vPortGrantAccessToKernelObject(
TaskHandle_t xInternalTaskHandle,
3225 void vPortRevokeAccessToKernelObject(
TaskHandle_t xInternalTaskHandle,
#define configRUN_TIME_COUNTER_TYPE
#define configSTACK_DEPTH_TYPE
struct xSTATIC_TCB StaticTask_t
void vApplicationIdleHook(void)
void vApplicationStackOverflowHook(xTaskHandle xTask, char *pcTaskName)
File Name : freertos.c Description : Code for freertos applications.
struct xLIST_ITEM ListItem_t
#define PRIVILEGED_FUNCTION
#define portNUM_CONFIGURABLE_REGIONS
unsigned long UBaseType_t
portSTACK_TYPE StackType_t
void(* TaskFunction_t)(void *)
TaskFunction_t pvTaskCode
StackType_t * puxStackBuffer
configSTACK_DEPTH_TYPE usStackDepth
MemoryRegion_t xRegions[portNUM_CONFIGURABLE_REGIONS]
StackType_t * pxStackBase
UBaseType_t uxCurrentPriority
UBaseType_t uxBasePriority
configRUN_TIME_COUNTER_TYPE ulRunTimeCounter
configSTACK_DEPTH_TYPE usStackHighWaterMark
TickType_t xTimeOnEntering
BaseType_t xOverflowCount
BaseType_t xTaskResumeAll(void) PRIVILEGED_FUNCTION
BaseType_t xTaskGetSchedulerState(void) PRIVILEGED_FUNCTION
BaseType_t xTaskPriorityDisinherit(TaskHandle_t const pxMutexHolder) PRIVILEGED_FUNCTION
configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimeCounter(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
TickType_t xTaskGetTickCountFromISR(void) PRIVILEGED_FUNCTION
BaseType_t xTaskRemoveFromEventList(const List_t *const pxEventList) PRIVILEGED_FUNCTION
uint32_t ulTaskGenericNotifyValueClear(TaskHandle_t xTask, UBaseType_t uxIndexToClear, uint32_t ulBitsToClear) PRIVILEGED_FUNCTION
void vTaskEndScheduler(void) PRIVILEGED_FUNCTION
UBaseType_t uxTaskPriorityGet(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
void vTaskPrioritySet(TaskHandle_t xTask, UBaseType_t uxNewPriority) PRIVILEGED_FUNCTION
struct tskTaskControlBlock * TaskHandle_t
void vTaskStepTick(TickType_t xTicksToJump) PRIVILEGED_FUNCTION
configRUN_TIME_COUNTER_TYPE ulTaskGetRunTimePercent(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
void vTaskDelete(TaskHandle_t xTaskToDelete) PRIVILEGED_FUNCTION
void vTaskRemoveFromUnorderedEventList(ListItem_t *pxEventListItem, const TickType_t xItemValue) PRIVILEGED_FUNCTION
void vTaskSuspendAll(void) PRIVILEGED_FUNCTION
struct xTASK_PARAMETERS TaskParameters_t
BaseType_t xTaskCatchUpTicks(TickType_t xTicksToCatchUp) PRIVILEGED_FUNCTION
BaseType_t xTaskCheckForTimeOut(TimeOut_t *const pxTimeOut, TickType_t *const pxTicksToWait) PRIVILEGED_FUNCTION
TaskHandle_t xTaskGetIdleTaskHandle(void) PRIVILEGED_FUNCTION
xTaskGetIdleTaskHandle() is only available if INCLUDE_xTaskGetIdleTaskHandle is set to 1 in FreeRTOSC...
TaskHandle_t xTaskGetHandle(const char *pcNameToQuery) PRIVILEGED_FUNCTION
void vTaskGenericNotifyGiveFromISR(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
void vTaskGetRunTimeStats(char *pcWriteBuffer) PRIVILEGED_FUNCTION
TaskHandle_t pvTaskIncrementMutexHeldCount(void) PRIVILEGED_FUNCTION
struct xTIME_OUT TimeOut_t
BaseType_t xTaskGenericNotifyFromISR(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue, BaseType_t *pxHigherPriorityTaskWoken) PRIVILEGED_FUNCTION
void vTaskPlaceOnEventList(List_t *const pxEventList, const TickType_t xTicksToWait) PRIVILEGED_FUNCTION
void vTaskSetTimeOutState(TimeOut_t *const pxTimeOut) PRIVILEGED_FUNCTION
UBaseType_t uxTaskGetNumberOfTasks(void) PRIVILEGED_FUNCTION
TickType_t xTaskGetTickCount(void) PRIVILEGED_FUNCTION
UBaseType_t uxTaskPriorityGetFromISR(const TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.
TickType_t uxTaskResetEventItemValue(void) PRIVILEGED_FUNCTION
UBaseType_t uxTaskGetStackHighWaterMark(TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.h
portDONT_DISCARD void vTaskSwitchContext(void) PRIVILEGED_FUNCTION
configSTACK_DEPTH_TYPE uxTaskGetStackHighWaterMark2(TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.h
void vTaskResume(TaskHandle_t xTaskToResume) PRIVILEGED_FUNCTION
void vTaskSuspend(TaskHandle_t xTaskToSuspend) PRIVILEGED_FUNCTION
configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimeCounter(void) PRIVILEGED_FUNCTION
TaskHandle_t xTaskGetCurrentTaskHandle(void) PRIVILEGED_FUNCTION
UBaseType_t uxTaskGetSystemState(TaskStatus_t *const pxTaskStatusArray, const UBaseType_t uxArraySize, configRUN_TIME_COUNTER_TYPE *const pulTotalRunTime) PRIVILEGED_FUNCTION
configUSE_TRACE_FACILITY must be defined as 1 in FreeRTOSConfig.h for uxTaskGetSystemState() to be av...
BaseType_t xTaskGenericNotifyStateClear(TaskHandle_t xTask, UBaseType_t uxIndexToClear) PRIVILEGED_FUNCTION
eTaskState eTaskGetState(TaskHandle_t xTask) PRIVILEGED_FUNCTION
task.
BaseType_t xTaskIncrementTick(void) PRIVILEGED_FUNCTION
void vTaskMissedYield(void) PRIVILEGED_FUNCTION
void vTaskInternalSetTimeOutState(TimeOut_t *const pxTimeOut) PRIVILEGED_FUNCTION
void vTaskPlaceOnUnorderedEventList(List_t *pxEventList, const TickType_t xItemValue, const TickType_t xTicksToWait) PRIVILEGED_FUNCTION
void vTaskPriorityDisinheritAfterTimeout(TaskHandle_t const pxMutexHolder, UBaseType_t uxHighestPriorityWaitingTask) PRIVILEGED_FUNCTION
void vTaskDelay(const TickType_t xTicksToDelay) PRIVILEGED_FUNCTION
BaseType_t xTaskGenericNotifyWait(UBaseType_t uxIndexToWaitOn, uint32_t ulBitsToClearOnEntry, uint32_t ulBitsToClearOnExit, uint32_t *pulNotificationValue, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
BaseType_t xTaskPriorityInherit(TaskHandle_t const pxMutexHolder) PRIVILEGED_FUNCTION
uint32_t ulTaskGenericNotifyTake(UBaseType_t uxIndexToWaitOn, BaseType_t xClearCountOnExit, TickType_t xTicksToWait) PRIVILEGED_FUNCTION
void vTaskStartScheduler(void) PRIVILEGED_FUNCTION
BaseType_t xTaskCallApplicationTaskHook(TaskHandle_t xTask, void *pvParameter) PRIVILEGED_FUNCTION
task.h
void vTaskList(char *pcWriteBuffer) PRIVILEGED_FUNCTION
configRUN_TIME_COUNTER_TYPE ulTaskGetIdleRunTimePercent(void) PRIVILEGED_FUNCTION
struct xMEMORY_REGION MemoryRegion_t
void vTaskGetInfo(TaskHandle_t xTask, TaskStatus_t *pxTaskStatus, BaseType_t xGetFreeStackSpace, eTaskState eState) PRIVILEGED_FUNCTION
eSleepModeStatus eTaskConfirmSleepModeStatus(void) PRIVILEGED_FUNCTION
void vTaskAllocateMPURegions(TaskHandle_t xTask, const MemoryRegion_t *const pxRegions) PRIVILEGED_FUNCTION
UBaseType_t uxTaskGetTaskNumber(TaskHandle_t xTask) PRIVILEGED_FUNCTION
void vTaskPlaceOnEventListRestricted(List_t *const pxEventList, TickType_t xTicksToWait, const BaseType_t xWaitIndefinitely) PRIVILEGED_FUNCTION
BaseType_t xTaskGenericNotify(TaskHandle_t xTaskToNotify, UBaseType_t uxIndexToNotify, uint32_t ulValue, eNotifyAction eAction, uint32_t *pulPreviousNotificationValue) PRIVILEGED_FUNCTION
void vTaskSetTaskNumber(TaskHandle_t xTask, const UBaseType_t uxHandle) PRIVILEGED_FUNCTION
struct xTASK_STATUS TaskStatus_t
@ eSetValueWithoutOverwrite
char * pcTaskGetName(TaskHandle_t xTaskToQuery) PRIVILEGED_FUNCTION
BaseType_t xTaskResumeFromISR(TaskHandle_t xTaskToResume) PRIVILEGED_FUNCTION
BaseType_t xTaskDelayUntil(TickType_t *const pxPreviousWakeTime, const TickType_t xTimeIncrement) PRIVILEGED_FUNCTION
BaseType_t(* TaskHookFunction_t)(void *)
BaseType_t xTaskAbortDelay(TaskHandle_t xTask) PRIVILEGED_FUNCTION