mirror of
https://github.com/espressif/esp-idf.git
synced 2025-08-12 13:27:36 +00:00
freertos: Add GetStaticBuffer functions
This commit adds the various ...GetStaticBuffer() functions from upstream FreeRTOS. See https://github.com/FreeRTOS/FreeRTOS-Kernel/pull/641 for more details.
This commit is contained in:
@@ -512,6 +512,30 @@
|
||||
}
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
|
||||
BaseType_t xTimerGetStaticBuffer( TimerHandle_t xTimer,
|
||||
StaticTimer_t ** ppxTimerBuffer )
|
||||
{
|
||||
BaseType_t xReturn;
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
||||
configASSERT( ppxTimerBuffer != NULL );
|
||||
|
||||
if( ( pxTimer->ucStatus & tmrSTATUS_IS_STATICALLY_ALLOCATED ) != 0 )
|
||||
{
|
||||
*ppxTimerBuffer = ( StaticTimer_t * ) pxTimer;
|
||||
xReturn = pdTRUE;
|
||||
}
|
||||
else
|
||||
{
|
||||
xReturn = pdFALSE;
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
#endif /* configSUPPORT_STATIC_ALLOCATION */
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
const char * pcTimerGetName( TimerHandle_t xTimer ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
{
|
||||
Timer_t * pxTimer = xTimer;
|
||||
|
Reference in New Issue
Block a user