mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
refactor(freertos): Uncrustify and format IDF addition headers
- Uncrustified IDF addition related header/source files - Reorganized functions into groups - linker_common.lf updated to adhere to new function organization
This commit is contained in:
parent
a67e8c1972
commit
0a15f28d17
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* SPDX-FileCopyrightText: 2021 Espressif Systems (Shanghai) CO LTD
|
||||
* SPDX-FileCopyrightText: 2021-2023 Espressif Systems (Shanghai) CO LTD
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
@ -12,23 +12,26 @@
|
||||
* This file maintains these legacy APIs until the next ESP-IDF major release.
|
||||
*
|
||||
* Todo: Clean up for ESP-IDF v6.0 (IDF-8144)
|
||||
*/
|
||||
*/
|
||||
|
||||
#include "FreeRTOS.h"
|
||||
#include "queue.h"
|
||||
#include "semphr.h"
|
||||
|
||||
BaseType_t xQueueGenericReceive( QueueHandle_t xQueue, void * const pvBuffer, TickType_t xTicksToWait, const BaseType_t xPeek )
|
||||
BaseType_t xQueueGenericReceive( QueueHandle_t xQueue,
|
||||
void * const pvBuffer,
|
||||
TickType_t xTicksToWait,
|
||||
const BaseType_t xPeek )
|
||||
{
|
||||
if ( xPeek == pdTRUE )
|
||||
{
|
||||
return xQueuePeek( xQueue, pvBuffer, xTicksToWait );
|
||||
}
|
||||
if( xPeek == pdTRUE )
|
||||
{
|
||||
return xQueuePeek( xQueue, pvBuffer, xTicksToWait );
|
||||
}
|
||||
|
||||
if ( pvBuffer == NULL )
|
||||
{
|
||||
return xQueueSemaphoreTake( xQueue, xTicksToWait );
|
||||
}
|
||||
if( pvBuffer == NULL )
|
||||
{
|
||||
return xQueueSemaphoreTake( xQueue, xTicksToWait );
|
||||
}
|
||||
|
||||
return xQueueReceive( xQueue, pvBuffer, xTicksToWait );
|
||||
return xQueueReceive( xQueue, pvBuffer, xTicksToWait );
|
||||
}
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -4,6 +4,11 @@
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/*
|
||||
* This file contains the implementation for some the functions in
|
||||
* idf_additions.h
|
||||
*/
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include <stdint.h>
|
||||
#include "freertos/FreeRTOS.h"
|
||||
@ -17,19 +22,12 @@
|
||||
#include "freertos/idf_additions.h"
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
/*
|
||||
* This file contains the implementation for some the functions in
|
||||
* idf_additions.h
|
||||
*/
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Creation With Memory Caps
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
/* -------------------------------------------- Creation With Memory Caps ------------------------------------------- */
|
||||
|
||||
/* ---------------------------------- Tasks --------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
BaseType_t xTaskCreatePinnedToCoreWithCaps( TaskFunction_t pvTaskCode,
|
||||
const char * const pcName,
|
||||
const configSTACK_DEPTH_TYPE usStackDepth,
|
||||
@ -78,6 +76,11 @@ err:
|
||||
return pdFAIL;
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
void vTaskDeleteWithCaps( TaskHandle_t xTaskToDelete )
|
||||
{
|
||||
BaseType_t xResult;
|
||||
@ -95,8 +98,13 @@ err:
|
||||
vPortFree( pxTaskBuffer );
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
/* ---------------------------------- Queue --------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
QueueHandle_t xQueueCreateWithCaps( UBaseType_t uxQueueLength,
|
||||
UBaseType_t uxItemSize,
|
||||
UBaseType_t uxMemoryCaps )
|
||||
@ -138,6 +146,11 @@ err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
void vQueueDeleteWithCaps( QueueHandle_t xQueue )
|
||||
{
|
||||
BaseType_t xResult;
|
||||
@ -156,8 +169,13 @@ err:
|
||||
heap_caps_free( pucQueueStorageBuffer );
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
/* -------------------------------- Semaphore ------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
SemaphoreHandle_t xSemaphoreCreateGenericWithCaps( UBaseType_t uxMaxCount,
|
||||
UBaseType_t uxInitialCount,
|
||||
const uint8_t ucQueueType,
|
||||
@ -200,6 +218,11 @@ err:
|
||||
return xSemaphore;
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
void vSemaphoreDeleteWithCaps( SemaphoreHandle_t xSemaphore )
|
||||
{
|
||||
BaseType_t xResult;
|
||||
@ -217,8 +240,13 @@ err:
|
||||
heap_caps_free( pxSemaphoreBuffer );
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
/* ------------------------- Stream & Message Buffers ----------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
StreamBufferHandle_t xStreamBufferGenericCreateWithCaps( size_t xBufferSizeBytes,
|
||||
size_t xTriggerLevelBytes,
|
||||
BaseType_t xIsMessageBuffer,
|
||||
@ -261,6 +289,11 @@ err:
|
||||
return NULL;
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
void vStreamBufferGenericDeleteWithCaps( StreamBufferHandle_t xStreamBuffer,
|
||||
BaseType_t xIsMessageBuffer )
|
||||
{
|
||||
@ -296,8 +329,13 @@ err:
|
||||
heap_caps_free( pucStreamBufferStorageArea );
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
/* ------------------------------ Event Groups ------------------------------ */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
EventGroupHandle_t xEventGroupCreateWithCaps( UBaseType_t uxMemoryCaps )
|
||||
{
|
||||
EventGroupHandle_t xEventGroup;
|
||||
@ -322,6 +360,11 @@ err:
|
||||
return xEventGroup;
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
void vEventGroupDeleteWithCaps( EventGroupHandle_t xEventGroup )
|
||||
{
|
||||
BaseType_t xResult;
|
||||
@ -340,3 +383,4 @@ err:
|
||||
}
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
/*----------------------------------------------------------*/
|
||||
|
@ -8,25 +8,29 @@
|
||||
|
||||
/*
|
||||
* This file is like "idf_additions.h" but for private API (i.e., only meant to
|
||||
* be called by other internally by other
|
||||
* ESP-IDF components.
|
||||
* be called internally by other ESP-IDF components.
|
||||
*/
|
||||
|
||||
#include "sdkconfig.h"
|
||||
#include "freertos/FreeRTOS.h"
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Priority Raise/Restore
|
||||
* - Special functions to forcefully raise and restore a task's priority
|
||||
* - Used by cache_utils.c when disabling/enabling the cache
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
/*------------------------------------------------------------------------------
|
||||
* TASK UTILITIES (PRIVATE)
|
||||
*----------------------------------------------------------------------------*/
|
||||
#if ( INCLUDE_vTaskPrioritySet == 1 )
|
||||
|
||||
/**
|
||||
* @brief Structure to save a task's previous priority
|
||||
*
|
||||
* This structure is meant to be used with prvTaskPriorityRaise() and
|
||||
* prvTaskPriorityRestore().
|
||||
*/
|
||||
typedef struct
|
||||
{
|
||||
UBaseType_t uxPriority;
|
||||
@ -35,13 +39,17 @@
|
||||
#endif
|
||||
} prvTaskSavedPriority_t;
|
||||
|
||||
#endif /* INCLUDE_vTaskPrioritySet == 1 */
|
||||
|
||||
#if ( INCLUDE_vTaskPrioritySet == 1 )
|
||||
|
||||
/**
|
||||
* INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be
|
||||
* available. See the configuration section for more information.
|
||||
*
|
||||
* Saves the current priority and current base priority of a task, then
|
||||
* raises the task's current and base priority to uxNewPriority if
|
||||
* uxNewPriority is of a higher priority.
|
||||
* Saves the current priority and current base priority of a task, then raises
|
||||
* the task's current and base priority to uxNewPriority if uxNewPriority is of
|
||||
* a higher priority.
|
||||
*
|
||||
* Once a task's priority has been raised with this function, the priority
|
||||
* can be restored by calling prvTaskPriorityRestore()
|
||||
@ -53,8 +61,8 @@
|
||||
* forced immediately to a higher priority.
|
||||
*
|
||||
* For configUSE_MUTEXES == 0: A context switch will occur before the
|
||||
* function returns if the priority being set is higher than the currently
|
||||
* executing task.
|
||||
* function returns if the priority being set is higher than the priority of the
|
||||
* currently executing task.
|
||||
*
|
||||
* @note This functions is private and should only be called internally
|
||||
* within various IDF components. Users should never call this function from
|
||||
@ -71,17 +79,20 @@
|
||||
void prvTaskPriorityRaise( prvTaskSavedPriority_t * pxSavedPriority,
|
||||
UBaseType_t uxNewPriority );
|
||||
|
||||
#endif /* INCLUDE_vTaskPrioritySet == 1 */
|
||||
|
||||
#if ( INCLUDE_vTaskPrioritySet == 1 )
|
||||
|
||||
/**
|
||||
* INCLUDE_vTaskPrioritySet must be defined as 1 for this function to be
|
||||
* available.
|
||||
* See the configuration section for more information.
|
||||
* available. See the configuration section for more information.
|
||||
*
|
||||
* Restore a task's priority that was previously raised by
|
||||
* prvTaskPriorityRaise().
|
||||
*
|
||||
* For configUSE_MUTEXES == 0: A context switch will occur before the function
|
||||
* returns if the priority
|
||||
* being set is higher than the currently executing task.
|
||||
* returns if the priority being set is higher than the priority of the currently
|
||||
* executing task.
|
||||
*
|
||||
* @note This functions is private and should only be called internally within
|
||||
* various IDF components. Users should never call this function from their
|
||||
@ -92,8 +103,10 @@
|
||||
*/
|
||||
void prvTaskPriorityRestore( prvTaskSavedPriority_t * pxSavedPriority );
|
||||
|
||||
#endif // ( INCLUDE_vTaskPrioritySet == 1)
|
||||
#endif /* INCLUDE_vTaskPrioritySet == 1 */
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
@ -25,20 +25,20 @@
|
||||
#include "freertos/event_groups.h"
|
||||
#include "esp_heap_caps.h"
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* SMP related API additions to FreeRTOS
|
||||
*
|
||||
* Todo: Move IDF FreeRTOS SMP related additions to this header as well (see
|
||||
* IDF-7201)
|
||||
* Todo: Add these SMP related additions to docs once they are combined with
|
||||
* IDF FreeRTOS.
|
||||
* -------------------------------------------------------------------------- */
|
||||
/* -------------------------------------------------- Task Creation ---------------------------------------------------
|
||||
* Task Creation APIs added by ESP-IDF
|
||||
*
|
||||
* Todo: Move IDF FreeRTOS SMP related additions to this header as well (see IDF-7201)
|
||||
* Todo: Add these SMP related additions to docs once they are combined with IDF FreeRTOS.
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#if CONFIG_FREERTOS_SMP
|
||||
#if ( CONFIG_FREERTOS_SMP && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
|
||||
|
||||
/**
|
||||
* @brief Create a new task that is pinned to a particular core
|
||||
@ -69,6 +69,9 @@
|
||||
TaskHandle_t * const pxCreatedTask,
|
||||
const BaseType_t xCoreID );
|
||||
|
||||
#endif /* ( CONFIG_FREERTOS_SMP && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) ) */
|
||||
|
||||
#if ( CONFIG_FREERTOS_SMP && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
|
||||
|
||||
/**
|
||||
* @brief Create a new static task that is pinned to a particular core
|
||||
@ -89,16 +92,22 @@
|
||||
* the task has no core affinity
|
||||
* @return The task handle if the task was created, NULL otherwise.
|
||||
*/
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const uint32_t ulStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
StackType_t * const puxStackBuffer,
|
||||
StaticTask_t * const pxTaskBuffer,
|
||||
const BaseType_t xCoreID );
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
TaskHandle_t xTaskCreateStaticPinnedToCore( TaskFunction_t pxTaskCode,
|
||||
const char * const pcName,
|
||||
const uint32_t ulStackDepth,
|
||||
void * const pvParameters,
|
||||
UBaseType_t uxPriority,
|
||||
StackType_t * const puxStackBuffer,
|
||||
StaticTask_t * const pxTaskBuffer,
|
||||
const BaseType_t xCoreID );
|
||||
|
||||
#endif /* ( CONFIG_FREERTOS_SMP && ( configSUPPORT_STATIC_ALLOCATION == 1 ) ) */
|
||||
|
||||
/* ------------------------------------------------- Task Utilities ----------------------------------------------------
|
||||
* Todo: Move IDF FreeRTOS SMP related additions to this header as well (see IDF-7201)
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#if CONFIG_FREERTOS_SMP
|
||||
|
||||
/**
|
||||
* @brief Get the handle of the task running on a certain core
|
||||
@ -115,6 +124,10 @@
|
||||
*/
|
||||
TaskHandle_t xTaskGetCurrentTaskHandleForCPU( BaseType_t xCoreID );
|
||||
|
||||
#endif /* CONFIG_FREERTOS_SMP */
|
||||
|
||||
#if CONFIG_FREERTOS_SMP
|
||||
|
||||
/**
|
||||
* @brief Get the handle of idle task for the given CPU.
|
||||
*
|
||||
@ -126,6 +139,10 @@
|
||||
*/
|
||||
TaskHandle_t xTaskGetIdleTaskHandleForCPU( BaseType_t xCoreID );
|
||||
|
||||
#endif /* CONFIG_FREERTOS_SMP */
|
||||
|
||||
#if CONFIG_FREERTOS_SMP
|
||||
|
||||
/**
|
||||
* @brief Get the current core affinity of a particular task
|
||||
*
|
||||
@ -141,26 +158,27 @@
|
||||
*/
|
||||
BaseType_t xTaskGetAffinity( TaskHandle_t xTask );
|
||||
|
||||
#endif // CONFIG_FREERTOS_SMP
|
||||
#endif /* CONFIG_FREERTOS_SMP */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* TLSP Deletion Callback related API additions
|
||||
/* --------------------------------------------- TLSP Deletion Callbacks -----------------------------------------------
|
||||
* TLSP Deletion Callback API Additions
|
||||
*
|
||||
* Todo: Move IDF FreeRTOS TLSP Deletion Callback related additions to this
|
||||
* header as well (see IDF-7201)
|
||||
* Todo: Add these SMP related additions to docs once they are combined with
|
||||
* IDF FreeRTOS.
|
||||
* -------------------------------------------------------------------------- */
|
||||
* Todo: Move IDF FreeRTOS TLSP Deletion Callback related additions to this header as well (see IDF-7201)
|
||||
* Todo: Add these SMP related additions to docs once they are combined with IDF FreeRTOS.
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
#if CONFIG_FREERTOS_SMP
|
||||
|
||||
#if ( CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
#if ( CONFIG_FREERTOS_SMP && CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
|
||||
/**
|
||||
* Prototype of local storage pointer deletion callback.
|
||||
*/
|
||||
typedef void (* TlsDeleteCallbackFunction_t)( int,
|
||||
void * );
|
||||
typedef void (* TlsDeleteCallbackFunction_t)( int,
|
||||
void * );
|
||||
|
||||
#endif /* ( CONFIG_FREERTOS_SMP && CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS ) */
|
||||
|
||||
|
||||
#if ( CONFIG_FREERTOS_SMP && CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS )
|
||||
|
||||
/**
|
||||
* Set local storage pointer and deletion callback.
|
||||
@ -184,25 +202,22 @@
|
||||
* @param pvDelCallback Function to call to dispose of the local storage
|
||||
* pointer when the task is deleted.
|
||||
*/
|
||||
void vTaskSetThreadLocalStoragePointerAndDelCallback( TaskHandle_t xTaskToSet,
|
||||
BaseType_t xIndex,
|
||||
void * pvValue,
|
||||
TlsDeleteCallbackFunction_t pvDelCallback );
|
||||
#endif // CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS
|
||||
void vTaskSetThreadLocalStoragePointerAndDelCallback( TaskHandle_t xTaskToSet,
|
||||
BaseType_t xIndex,
|
||||
void * pvValue,
|
||||
TlsDeleteCallbackFunction_t pvDelCallback );
|
||||
|
||||
#endif // CONFIG_FREERTOS_SMP
|
||||
#endif /* ( CONFIG_FREERTOS_SMP && CONFIG_FREERTOS_TLSP_DELETION_CALLBACKS ) */
|
||||
|
||||
/* -----------------------------------------------------------------------------
|
||||
* Creation With Memory Caps
|
||||
*
|
||||
* Helper functions to create various FreeRTOS objects (e.g., queues,
|
||||
* semaphores) with specific memory capabilities (e.g., MALLOC_CAP_INTERNAL).
|
||||
* -------------------------------------------------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
/* -------------------------------------------- Creation With Memory Caps ----------------------------------------------
|
||||
* Helper functions to create various FreeRTOS objects (e.g., queues, semaphores) with specific memory capabilities
|
||||
* (e.g., MALLOC_CAP_INTERNAL).
|
||||
* ------------------------------------------------------------------------------------------------------------------ */
|
||||
|
||||
/* ---------------------------------- Tasks --------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a pinned task where its stack has specific memory capabilities
|
||||
*
|
||||
@ -238,6 +253,10 @@
|
||||
const BaseType_t xCoreID,
|
||||
UBaseType_t uxMemoryCaps );
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a task where its stack has specific memory capabilities
|
||||
*
|
||||
@ -275,6 +294,10 @@
|
||||
return xTaskCreatePinnedToCoreWithCaps( pvTaskCode, pcName, usStackDepth, pvParameters, uxPriority, pvCreatedTask, tskNO_AFFINITY, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Deletes a task previously created using xTaskCreateWithCaps() or
|
||||
* xTaskCreatePinnedToCoreWithCaps()
|
||||
@ -283,8 +306,12 @@
|
||||
*/
|
||||
void vTaskDeleteWithCaps( TaskHandle_t xTaskToDelete );
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
/* ---------------------------------- Queue --------------------------------- */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a queue with specific memory capabilities
|
||||
*
|
||||
@ -304,6 +331,10 @@
|
||||
UBaseType_t uxItemSize,
|
||||
UBaseType_t uxMemoryCaps );
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Deletes a queue previously created using xQueueCreateWithCaps()
|
||||
*
|
||||
@ -311,15 +342,19 @@
|
||||
*/
|
||||
void vQueueDeleteWithCaps( QueueHandle_t xQueue );
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
/* -------------------------------- Semaphore ------------------------------- */
|
||||
|
||||
/** @cond */ /* Doxygen command to hide this from docs */
|
||||
SemaphoreHandle_t xSemaphoreCreateGenericWithCaps( UBaseType_t uxMaxCount,
|
||||
UBaseType_t uxInitialCount,
|
||||
const uint8_t ucQueueType,
|
||||
UBaseType_t uxMemoryCaps );
|
||||
SemaphoreHandle_t xSemaphoreCreateGenericWithCaps( UBaseType_t uxMaxCount,
|
||||
UBaseType_t uxInitialCount,
|
||||
const uint8_t ucQueueType,
|
||||
UBaseType_t uxMemoryCaps );
|
||||
/** @endcond */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a binary semaphore with specific memory capabilities
|
||||
*
|
||||
@ -338,6 +373,10 @@
|
||||
return xSemaphoreCreateGenericWithCaps( 0, 0, queueQUEUE_TYPE_BINARY_SEMAPHORE, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a counting semaphore with specific memory capabilities
|
||||
*
|
||||
@ -361,6 +400,10 @@
|
||||
return xSemaphoreCreateGenericWithCaps( uxMaxCount, uxInitialCount, queueQUEUE_TYPE_COUNTING_SEMAPHORE, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a mutex semaphore with specific memory capabilities
|
||||
*
|
||||
@ -379,6 +422,10 @@
|
||||
return xSemaphoreCreateGenericWithCaps( 0, 0, queueQUEUE_TYPE_MUTEX, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a recursive mutex with specific memory capabilities
|
||||
*
|
||||
@ -397,6 +444,10 @@
|
||||
return xSemaphoreCreateGenericWithCaps( 0, 0, queueQUEUE_TYPE_RECURSIVE_MUTEX, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Deletes a semaphore previously created using one of the
|
||||
* xSemaphoreCreate...WithCaps() functions
|
||||
@ -405,18 +456,22 @@
|
||||
*/
|
||||
void vSemaphoreDeleteWithCaps( SemaphoreHandle_t xSemaphore );
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
/* ------------------------ Stream & Message Buffers ------------------------ */
|
||||
|
||||
/** @cond */ /* Doxygen command to hide this from docs */
|
||||
StreamBufferHandle_t xStreamBufferGenericCreateWithCaps( size_t xBufferSizeBytes,
|
||||
size_t xTriggerLevelBytes,
|
||||
BaseType_t xIsMessageBuffer,
|
||||
UBaseType_t uxMemoryCaps );
|
||||
StreamBufferHandle_t xStreamBufferGenericCreateWithCaps( size_t xBufferSizeBytes,
|
||||
size_t xTriggerLevelBytes,
|
||||
BaseType_t xIsMessageBuffer,
|
||||
UBaseType_t uxMemoryCaps );
|
||||
|
||||
void vStreamBufferGenericDeleteWithCaps( StreamBufferHandle_t xStreamBuffer,
|
||||
BaseType_t xIsMessageBuffer );
|
||||
void vStreamBufferGenericDeleteWithCaps( StreamBufferHandle_t xStreamBuffer,
|
||||
BaseType_t xIsMessageBuffer );
|
||||
/** @endcond */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a stream buffer with specific memory capabilities
|
||||
*
|
||||
@ -441,6 +496,10 @@
|
||||
return xStreamBufferGenericCreateWithCaps( xBufferSizeBytes, xTriggerLevelBytes, pdFALSE, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Deletes a stream buffer previously created using
|
||||
* xStreamBufferCreateWithCaps()
|
||||
@ -452,6 +511,10 @@
|
||||
vStreamBufferGenericDeleteWithCaps( xStreamBuffer, pdFALSE );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates a message buffer with specific memory capabilities
|
||||
*
|
||||
@ -473,6 +536,10 @@
|
||||
return ( MessageBufferHandle_t ) xStreamBufferGenericCreateWithCaps( xBufferSizeBytes, ( size_t ) 0, pdTRUE, uxMemoryCaps );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Deletes a stream buffer previously created using
|
||||
* xMessageBufferCreateWithCaps()
|
||||
@ -484,8 +551,12 @@
|
||||
vStreamBufferGenericDeleteWithCaps( ( StreamBufferHandle_t ) xMessageBuffer, pdTRUE );
|
||||
}
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
/* ------------------------------ Event Groups ------------------------------ */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Creates an event group with specific memory capabilities
|
||||
*
|
||||
@ -501,6 +572,10 @@
|
||||
*/
|
||||
EventGroupHandle_t xEventGroupCreateWithCaps( UBaseType_t uxMemoryCaps );
|
||||
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
|
||||
/**
|
||||
* @brief Deletes an event group previously created using
|
||||
* xEventGroupCreateWithCaps()
|
||||
@ -509,8 +584,10 @@
|
||||
*/
|
||||
void vEventGroupDeleteWithCaps( EventGroupHandle_t xEventGroup );
|
||||
|
||||
#endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION == 1 */
|
||||
|
||||
/* *INDENT-OFF* */
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
}
|
||||
#endif
|
||||
/* *INDENT-ON* */
|
||||
|
@ -6,33 +6,35 @@ archive: libfreertos.a
|
||||
entries:
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
# esp_additions/private_include/freertos_tasks_c_additions.h
|
||||
# Placement Rules (FreeRTOS API Additions):
|
||||
# - Default: Place all functions in internal RAM.
|
||||
# - CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH: Place functions in flash if they are never called from an ISR
|
||||
# context (directly or indirectly).
|
||||
# Placement Rules (Task Snapshot):
|
||||
# - Default: Place all functions in internal RAM.
|
||||
# - CONFIG_FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH: Place functions in flash
|
||||
# - vTaskGetSnapshot is omitted on purpose as it is used to by the Task Watchdog (TWDT) interrupt handler, we want
|
||||
# to always keep it in IRAM
|
||||
# Placement Rules (FreeRTOS API Additions):
|
||||
# - Default: Place all functions in internal RAM.
|
||||
# - CONFIG_FREERTOS_PLACE_FUNCTIONS_INTO_FLASH: Place functions in flash if they are never called from an ISR
|
||||
# context (directly or indirectly).
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
|
||||
# Task Creation
|
||||
if FREERTOS_SMP = y:
|
||||
tasks:xTaskCreatePinnedToCore (default)
|
||||
tasks:xTaskCreateStaticPinnedToCore (default)
|
||||
# Task Utilities
|
||||
tasks:xTaskGetCurrentTaskHandleForCPU (default)
|
||||
tasks:xTaskGetIdleTaskHandleForCPU (default)
|
||||
tasks:xTaskGetAffinity (default)
|
||||
tasks:prvTaskPriorityRaise (default)
|
||||
tasks:prvTaskPriorityRestore (default)
|
||||
# TLSP Deletion Callbacks
|
||||
if FREERTOS_TLSP_DELETION_CALLBACKS = y:
|
||||
tasks:vTaskSetThreadLocalStoragePointerAndDelCallback (default)
|
||||
# Task Snapshot
|
||||
if FREERTOS_PLACE_SNAPSHOT_FUNS_INTO_FLASH = y:
|
||||
tasks:pxGetNextTaskList (default)
|
||||
tasks:pxTaskGetNext (default)
|
||||
tasks:uxTaskGetSnapshotAll (default)
|
||||
# FreeRTOS API Additions
|
||||
if FREERTOS_PLACE_FUNCTIONS_INTO_FLASH = y:
|
||||
if FREERTOS_SMP = y:
|
||||
tasks:xTaskCreatePinnedToCore (default)
|
||||
tasks:xTaskCreateStaticPinnedToCore (default)
|
||||
tasks:xTaskGetCurrentTaskHandleForCPU (default)
|
||||
tasks:xTaskGetIdleTaskHandleForCPU (default)
|
||||
tasks:xTaskGetAffinity (default)
|
||||
if FREERTOS_TLSP_DELETION_CALLBACKS = y:
|
||||
tasks:vTaskSetThreadLocalStoragePointerAndDelCallback (default)
|
||||
tasks:prvTaskPriorityRaise (default)
|
||||
tasks:prvTaskPriorityRestore (default)
|
||||
|
||||
# ------------------------------------------------------------------------------------------------------------------
|
||||
# idf_additions.c
|
||||
|
Loading…
x
Reference in New Issue
Block a user