mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-19 17:48:33 -04:00
Add MPU wrapper from xStreamBufferResetFromISR (#1034)
* Add MPU wrapper from xStreamBufferResetFromISR in V10.6.x * Code review suggestions Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> --------- Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com> Co-authored-by: chinglee-iot <61685396+chinglee-iot@users.noreply.github.com> Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
This commit is contained in:
parent
9bfd0abb55
commit
5a72344c9a
3 changed files with 29 additions and 0 deletions
|
@ -4962,6 +4962,33 @@
|
|||
|
||||
#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
#if ( configUSE_STREAM_BUFFERS == 1 )
|
||||
|
||||
BaseType_t MPU_xStreamBufferResetFromISR( StreamBufferHandle_t xStreamBuffer ) /*PRIVILEGED_FUNCTION */
|
||||
{
|
||||
BaseType_t xReturn = pdFAIL;
|
||||
StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
|
||||
int32_t lIndex;
|
||||
|
||||
lIndex = ( int32_t ) xStreamBuffer;
|
||||
|
||||
if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
|
||||
{
|
||||
xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
|
||||
|
||||
if( xInternalStreamBufferHandle != NULL )
|
||||
{
|
||||
xReturn = xStreamBufferResetFromISR( xInternalStreamBufferHandle );
|
||||
}
|
||||
}
|
||||
|
||||
return xReturn;
|
||||
}
|
||||
|
||||
#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
|
||||
|
||||
/*-----------------------------------------------------------*/
|
||||
|
||||
/* Functions that the application writer wants to execute in privileged mode
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue