Add config option for event groups and stream buffers (#994)
* Add configUSE_EVENT_GROUPS in source files
* Add configUSE_EVENT_GROUPS macro in MPU wrapper files
* Add configUSE_EVENT_GROUPS macro in MPU port files for GCC and RVDS compilers
* Fix Formatting
* Add configUSE_STREAM_BUFFERS in source files
* Add configUSE_STREAM_BUFFERS macro in MPU wrapper files
* Add configUSE_STREAM_BUFFERS macro in MPU port files for GCC and RVDS compilers
* Update FreeRTOS.h post latest commit
* Update the ARM_CRx_MPU Port to account for the new configuration changes
* Formatting suggestions
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
* Code review suggestions
---------
Signed-off-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: joshzarr <joshzarr@amazon.com>
Co-authored-by: Gaurav Aggarwal <aggarg@amazon.com>
Co-authored-by: Soren Ptak <ptaksoren@gmail.com>
Co-authored-by: Gaurav-Aggarwal-AWS <33462878+aggarg@users.noreply.github.com>
diff --git a/event_groups.c b/event_groups.c
index 2118f04..1c0b487 100644
--- a/event_groups.c
+++ b/event_groups.c
@@ -30,7 +30,7 @@
#include <stdlib.h>
/* Defining MPU_WRAPPERS_INCLUDED_FROM_API_FILE prevents task.h from redefining
- * all the API functions to use the MPU wrappers. That should only be done when
+ * all the API functions to use the MPU wrappers. That should only be done when
* task.h is included from an application file. */
#define MPU_WRAPPERS_INCLUDED_FROM_API_FILE
@@ -45,19 +45,25 @@
* correct privileged Vs unprivileged linkage and placement. */
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
-typedef struct EventGroupDef_t
-{
- EventBits_t uxEventBits;
- List_t xTasksWaitingForBits; /**< List of tasks waiting for a bit to be set. */
+/* This entire source file will be skipped if the application is not configured
+ * to include event groups functionality. This #if is closed at the very bottom
+ * of this file. If you want to include event groups then ensure
+ * configUSE_EVENT_GROUPS is set to 1 in FreeRTOSConfig.h. */
+#if ( configUSE_EVENT_GROUPS == 1 )
- #if ( configUSE_TRACE_FACILITY == 1 )
- UBaseType_t uxEventGroupNumber;
- #endif
+ typedef struct EventGroupDef_t
+ {
+ EventBits_t uxEventBits;
+ List_t xTasksWaitingForBits; /**< List of tasks waiting for a bit to be set. */
- #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
- uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
- #endif
-} EventGroup_t;
+ #if ( configUSE_TRACE_FACILITY == 1 )
+ UBaseType_t uxEventGroupNumber;
+ #endif
+
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) )
+ uint8_t ucStaticallyAllocated; /**< Set to pdTRUE if the event group is statically allocated to ensure no attempt is made to free the memory. */
+ #endif
+ } EventGroup_t;
/*-----------------------------------------------------------*/
@@ -69,363 +75,207 @@
* wait condition is met if any of the bits set in uxBitsToWait for are also set
* in uxCurrentEventBits.
*/
-static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
- const EventBits_t uxBitsToWaitFor,
- const BaseType_t xWaitForAllBits ) PRIVILEGED_FUNCTION;
+ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
+ const EventBits_t uxBitsToWaitFor,
+ const BaseType_t xWaitForAllBits ) PRIVILEGED_FUNCTION;
/*-----------------------------------------------------------*/
-#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
- EventGroupHandle_t xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer )
- {
- EventGroup_t * pxEventBits;
-
- traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer );
-
- /* A StaticEventGroup_t object must be provided. */
- configASSERT( pxEventGroupBuffer );
-
- #if ( configASSERT_DEFINED == 1 )
+ EventGroupHandle_t xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer )
{
- /* Sanity check that the size of the structure used to declare a
- * variable of type StaticEventGroup_t equals the size of the real
- * event group structure. */
- volatile size_t xSize = sizeof( StaticEventGroup_t );
- configASSERT( xSize == sizeof( EventGroup_t ) );
- }
- #endif /* configASSERT_DEFINED */
+ EventGroup_t * pxEventBits;
- /* The user has provided a statically allocated event group - use it. */
- /* MISRA Ref 11.3.1 [Misaligned access] */
- /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
- /* coverity[misra_c_2012_rule_11_3_violation] */
- pxEventBits = ( EventGroup_t * ) pxEventGroupBuffer;
+ traceENTER_xEventGroupCreateStatic( pxEventGroupBuffer );
- if( pxEventBits != NULL )
- {
- pxEventBits->uxEventBits = 0;
- vListInitialise( &( pxEventBits->xTasksWaitingForBits ) );
+ /* A StaticEventGroup_t object must be provided. */
+ configASSERT( pxEventGroupBuffer );
- #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ #if ( configASSERT_DEFINED == 1 )
{
- /* Both static and dynamic allocation can be used, so note that
- * this event group was created statically in case the event group
- * is later deleted. */
- pxEventBits->ucStaticallyAllocated = pdTRUE;
+ /* Sanity check that the size of the structure used to declare a
+ * variable of type StaticEventGroup_t equals the size of the real
+ * event group structure. */
+ volatile size_t xSize = sizeof( StaticEventGroup_t );
+ configASSERT( xSize == sizeof( EventGroup_t ) );
}
- #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
+ #endif /* configASSERT_DEFINED */
- traceEVENT_GROUP_CREATE( pxEventBits );
- }
- else
- {
- /* xEventGroupCreateStatic should only ever be called with
- * pxEventGroupBuffer pointing to a pre-allocated (compile time
- * allocated) StaticEventGroup_t variable. */
- traceEVENT_GROUP_CREATE_FAILED();
- }
+ /* The user has provided a statically allocated event group - use it. */
+ /* MISRA Ref 11.3.1 [Misaligned access] */
+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
+ /* coverity[misra_c_2012_rule_11_3_violation] */
+ pxEventBits = ( EventGroup_t * ) pxEventGroupBuffer;
- traceRETURN_xEventGroupCreateStatic( pxEventBits );
-
- return pxEventBits;
- }
-
-#endif /* configSUPPORT_STATIC_ALLOCATION */
-/*-----------------------------------------------------------*/
-
-#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
-
- EventGroupHandle_t xEventGroupCreate( void )
- {
- EventGroup_t * pxEventBits;
-
- traceENTER_xEventGroupCreate();
-
- /* MISRA Ref 11.5.1 [Malloc memory assignment] */
- /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
- /* coverity[misra_c_2012_rule_11_5_violation] */
- pxEventBits = ( EventGroup_t * ) pvPortMalloc( sizeof( EventGroup_t ) );
-
- if( pxEventBits != NULL )
- {
- pxEventBits->uxEventBits = 0;
- vListInitialise( &( pxEventBits->xTasksWaitingForBits ) );
-
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ if( pxEventBits != NULL )
{
- /* Both static and dynamic allocation can be used, so note this
- * event group was allocated statically in case the event group is
- * later deleted. */
- pxEventBits->ucStaticallyAllocated = pdFALSE;
- }
- #endif /* configSUPPORT_STATIC_ALLOCATION */
+ pxEventBits->uxEventBits = 0;
+ vListInitialise( &( pxEventBits->xTasksWaitingForBits ) );
- traceEVENT_GROUP_CREATE( pxEventBits );
- }
- else
- {
- traceEVENT_GROUP_CREATE_FAILED();
- }
+ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ {
+ /* Both static and dynamic allocation can be used, so note that
+ * this event group was created statically in case the event group
+ * is later deleted. */
+ pxEventBits->ucStaticallyAllocated = pdTRUE;
+ }
+ #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
- traceRETURN_xEventGroupCreate( pxEventBits );
-
- return pxEventBits;
- }
-
-#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
-/*-----------------------------------------------------------*/
-
-EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait )
-{
- EventBits_t uxOriginalBitValue, uxReturn;
- EventGroup_t * pxEventBits = xEventGroup;
- BaseType_t xAlreadyYielded;
- BaseType_t xTimeoutOccurred = pdFALSE;
-
- traceENTER_xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
-
- configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
- configASSERT( uxBitsToWaitFor != 0 );
- #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
- {
- configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
- }
- #endif
-
- vTaskSuspendAll();
- {
- uxOriginalBitValue = pxEventBits->uxEventBits;
-
- ( void ) xEventGroupSetBits( xEventGroup, uxBitsToSet );
-
- if( ( ( uxOriginalBitValue | uxBitsToSet ) & uxBitsToWaitFor ) == uxBitsToWaitFor )
- {
- /* All the rendezvous bits are now set - no need to block. */
- uxReturn = ( uxOriginalBitValue | uxBitsToSet );
-
- /* Rendezvous always clear the bits. They will have been cleared
- * already unless this is the only task in the rendezvous. */
- pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
-
- xTicksToWait = 0;
- }
- else
- {
- if( xTicksToWait != ( TickType_t ) 0 )
- {
- traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor );
-
- /* Store the bits that the calling task is waiting for in the
- * task's event list item so the kernel knows when a match is
- * found. Then enter the blocked state. */
- vTaskPlaceOnUnorderedEventList( &( pxEventBits->xTasksWaitingForBits ), ( uxBitsToWaitFor | eventCLEAR_EVENTS_ON_EXIT_BIT | eventWAIT_FOR_ALL_BITS ), xTicksToWait );
-
- /* This assignment is obsolete as uxReturn will get set after
- * the task unblocks, but some compilers mistakenly generate a
- * warning about uxReturn being returned without being set if the
- * assignment is omitted. */
- uxReturn = 0;
+ traceEVENT_GROUP_CREATE( pxEventBits );
}
else
{
- /* The rendezvous bits were not set, but no block time was
- * specified - just return the current event bit value. */
- uxReturn = pxEventBits->uxEventBits;
- xTimeoutOccurred = pdTRUE;
+ /* xEventGroupCreateStatic should only ever be called with
+ * pxEventGroupBuffer pointing to a pre-allocated (compile time
+ * allocated) StaticEventGroup_t variable. */
+ traceEVENT_GROUP_CREATE_FAILED();
}
- }
- }
- xAlreadyYielded = xTaskResumeAll();
- if( xTicksToWait != ( TickType_t ) 0 )
- {
- if( xAlreadyYielded == pdFALSE )
- {
- taskYIELD_WITHIN_API();
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
+ traceRETURN_xEventGroupCreateStatic( pxEventBits );
+
+ return pxEventBits;
}
- /* The task blocked to wait for its required bits to be set - at this
- * point either the required bits were set or the block time expired. If
- * the required bits were set they will have been stored in the task's
- * event list item, and they should now be retrieved then cleared. */
- uxReturn = uxTaskResetEventItemValue();
+ #endif /* configSUPPORT_STATIC_ALLOCATION */
+/*-----------------------------------------------------------*/
- if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
+ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+
+ EventGroupHandle_t xEventGroupCreate( void )
{
- /* The task timed out, just return the current event bit value. */
- taskENTER_CRITICAL();
+ EventGroup_t * pxEventBits;
+
+ traceENTER_xEventGroupCreate();
+
+ /* MISRA Ref 11.5.1 [Malloc memory assignment] */
+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
+ /* coverity[misra_c_2012_rule_11_5_violation] */
+ pxEventBits = ( EventGroup_t * ) pvPortMalloc( sizeof( EventGroup_t ) );
+
+ if( pxEventBits != NULL )
{
- uxReturn = pxEventBits->uxEventBits;
+ pxEventBits->uxEventBits = 0;
+ vListInitialise( &( pxEventBits->xTasksWaitingForBits ) );
- /* Although the task got here because it timed out before the
- * bits it was waiting for were set, it is possible that since it
- * unblocked another task has set the bits. If this is the case
- * then it needs to clear the bits before exiting. */
- if( ( uxReturn & uxBitsToWaitFor ) == uxBitsToWaitFor )
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
{
- pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
+ /* Both static and dynamic allocation can be used, so note this
+ * event group was allocated statically in case the event group is
+ * later deleted. */
+ pxEventBits->ucStaticallyAllocated = pdFALSE;
+ }
+ #endif /* configSUPPORT_STATIC_ALLOCATION */
+
+ traceEVENT_GROUP_CREATE( pxEventBits );
+ }
+ else
+ {
+ traceEVENT_GROUP_CREATE_FAILED();
+ }
+
+ traceRETURN_xEventGroupCreate( pxEventBits );
+
+ return pxEventBits;
+ }
+
+ #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
+/*-----------------------------------------------------------*/
+
+ EventBits_t xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait )
+ {
+ EventBits_t uxOriginalBitValue, uxReturn;
+ EventGroup_t * pxEventBits = xEventGroup;
+ BaseType_t xAlreadyYielded;
+ BaseType_t xTimeoutOccurred = pdFALSE;
+
+ traceENTER_xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
+
+ configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
+ configASSERT( uxBitsToWaitFor != 0 );
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
+ {
+ configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
+ }
+ #endif
+
+ vTaskSuspendAll();
+ {
+ uxOriginalBitValue = pxEventBits->uxEventBits;
+
+ ( void ) xEventGroupSetBits( xEventGroup, uxBitsToSet );
+
+ if( ( ( uxOriginalBitValue | uxBitsToSet ) & uxBitsToWaitFor ) == uxBitsToWaitFor )
+ {
+ /* All the rendezvous bits are now set - no need to block. */
+ uxReturn = ( uxOriginalBitValue | uxBitsToSet );
+
+ /* Rendezvous always clear the bits. They will have been cleared
+ * already unless this is the only task in the rendezvous. */
+ pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
+
+ xTicksToWait = 0;
+ }
+ else
+ {
+ if( xTicksToWait != ( TickType_t ) 0 )
+ {
+ traceEVENT_GROUP_SYNC_BLOCK( xEventGroup, uxBitsToSet, uxBitsToWaitFor );
+
+ /* Store the bits that the calling task is waiting for in the
+ * task's event list item so the kernel knows when a match is
+ * found. Then enter the blocked state. */
+ vTaskPlaceOnUnorderedEventList( &( pxEventBits->xTasksWaitingForBits ), ( uxBitsToWaitFor | eventCLEAR_EVENTS_ON_EXIT_BIT | eventWAIT_FOR_ALL_BITS ), xTicksToWait );
+
+ /* This assignment is obsolete as uxReturn will get set after
+ * the task unblocks, but some compilers mistakenly generate a
+ * warning about uxReturn being returned without being set if the
+ * assignment is omitted. */
+ uxReturn = 0;
}
else
{
- mtCOVERAGE_TEST_MARKER();
+ /* The rendezvous bits were not set, but no block time was
+ * specified - just return the current event bit value. */
+ uxReturn = pxEventBits->uxEventBits;
+ xTimeoutOccurred = pdTRUE;
}
}
- taskEXIT_CRITICAL();
-
- xTimeoutOccurred = pdTRUE;
}
- else
+ xAlreadyYielded = xTaskResumeAll();
+
+ if( xTicksToWait != ( TickType_t ) 0 )
{
- /* The task unblocked because the bits were set. */
- }
-
- /* Control bits might be set as the task had blocked should not be
- * returned. */
- uxReturn &= ~eventEVENT_BITS_CONTROL_BYTES;
- }
-
- traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred );
-
- /* Prevent compiler warnings when trace macros are not used. */
- ( void ) xTimeoutOccurred;
-
- traceRETURN_xEventGroupSync( uxReturn );
-
- return uxReturn;
-}
-/*-----------------------------------------------------------*/
-
-EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToWaitFor,
- const BaseType_t xClearOnExit,
- const BaseType_t xWaitForAllBits,
- TickType_t xTicksToWait )
-{
- EventGroup_t * pxEventBits = xEventGroup;
- EventBits_t uxReturn, uxControlBits = 0;
- BaseType_t xWaitConditionMet, xAlreadyYielded;
- BaseType_t xTimeoutOccurred = pdFALSE;
-
- traceENTER_xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
-
- /* Check the user is not attempting to wait on the bits used by the kernel
- * itself, and that at least one bit is being requested. */
- configASSERT( xEventGroup );
- configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
- configASSERT( uxBitsToWaitFor != 0 );
- #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
- {
- configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
- }
- #endif
-
- vTaskSuspendAll();
- {
- const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
-
- /* Check to see if the wait condition is already met or not. */
- xWaitConditionMet = prvTestWaitCondition( uxCurrentEventBits, uxBitsToWaitFor, xWaitForAllBits );
-
- if( xWaitConditionMet != pdFALSE )
- {
- /* The wait condition has already been met so there is no need to
- * block. */
- uxReturn = uxCurrentEventBits;
- xTicksToWait = ( TickType_t ) 0;
-
- /* Clear the wait bits if requested to do so. */
- if( xClearOnExit != pdFALSE )
+ if( xAlreadyYielded == pdFALSE )
{
- pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
- else if( xTicksToWait == ( TickType_t ) 0 )
- {
- /* The wait condition has not been met, but no block time was
- * specified, so just return the current value. */
- uxReturn = uxCurrentEventBits;
- xTimeoutOccurred = pdTRUE;
- }
- else
- {
- /* The task is going to block to wait for its required bits to be
- * set. uxControlBits are used to remember the specified behaviour of
- * this call to xEventGroupWaitBits() - for use when the event bits
- * unblock the task. */
- if( xClearOnExit != pdFALSE )
- {
- uxControlBits |= eventCLEAR_EVENTS_ON_EXIT_BIT;
+ taskYIELD_WITHIN_API();
}
else
{
mtCOVERAGE_TEST_MARKER();
}
- if( xWaitForAllBits != pdFALSE )
- {
- uxControlBits |= eventWAIT_FOR_ALL_BITS;
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
+ /* The task blocked to wait for its required bits to be set - at this
+ * point either the required bits were set or the block time expired. If
+ * the required bits were set they will have been stored in the task's
+ * event list item, and they should now be retrieved then cleared. */
+ uxReturn = uxTaskResetEventItemValue();
- /* Store the bits that the calling task is waiting for in the
- * task's event list item so the kernel knows when a match is
- * found. Then enter the blocked state. */
- vTaskPlaceOnUnorderedEventList( &( pxEventBits->xTasksWaitingForBits ), ( uxBitsToWaitFor | uxControlBits ), xTicksToWait );
-
- /* This is obsolete as it will get set after the task unblocks, but
- * some compilers mistakenly generate a warning about the variable
- * being returned without being set if it is not done. */
- uxReturn = 0;
-
- traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor );
- }
- }
- xAlreadyYielded = xTaskResumeAll();
-
- if( xTicksToWait != ( TickType_t ) 0 )
- {
- if( xAlreadyYielded == pdFALSE )
- {
- taskYIELD_WITHIN_API();
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
-
- /* The task blocked to wait for its required bits to be set - at this
- * point either the required bits were set or the block time expired. If
- * the required bits were set they will have been stored in the task's
- * event list item, and they should now be retrieved then cleared. */
- uxReturn = uxTaskResetEventItemValue();
-
- if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
- {
- taskENTER_CRITICAL();
+ if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
{
/* The task timed out, just return the current event bit value. */
- uxReturn = pxEventBits->uxEventBits;
-
- /* It is possible that the event bits were updated between this
- * task leaving the Blocked state and running again. */
- if( prvTestWaitCondition( uxReturn, uxBitsToWaitFor, xWaitForAllBits ) != pdFALSE )
+ taskENTER_CRITICAL();
{
- if( xClearOnExit != pdFALSE )
+ uxReturn = pxEventBits->uxEventBits;
+
+ /* Although the task got here because it timed out before the
+ * bits it was waiting for were set, it is possible that since it
+ * unblocked another task has set the bits. If this is the case
+ * then it needs to clear the bits before exiting. */
+ if( ( uxReturn & uxBitsToWaitFor ) == uxBitsToWaitFor )
{
pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
}
@@ -434,437 +284,598 @@
mtCOVERAGE_TEST_MARKER();
}
}
+ taskEXIT_CRITICAL();
+
+ xTimeoutOccurred = pdTRUE;
+ }
+ else
+ {
+ /* The task unblocked because the bits were set. */
+ }
+
+ /* Control bits might be set as the task had blocked should not be
+ * returned. */
+ uxReturn &= ~eventEVENT_BITS_CONTROL_BYTES;
+ }
+
+ traceEVENT_GROUP_SYNC_END( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTimeoutOccurred );
+
+ /* Prevent compiler warnings when trace macros are not used. */
+ ( void ) xTimeoutOccurred;
+
+ traceRETURN_xEventGroupSync( uxReturn );
+
+ return uxReturn;
+ }
+/*-----------------------------------------------------------*/
+
+ EventBits_t xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToWaitFor,
+ const BaseType_t xClearOnExit,
+ const BaseType_t xWaitForAllBits,
+ TickType_t xTicksToWait )
+ {
+ EventGroup_t * pxEventBits = xEventGroup;
+ EventBits_t uxReturn, uxControlBits = 0;
+ BaseType_t xWaitConditionMet, xAlreadyYielded;
+ BaseType_t xTimeoutOccurred = pdFALSE;
+
+ traceENTER_xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
+
+ /* Check the user is not attempting to wait on the bits used by the kernel
+ * itself, and that at least one bit is being requested. */
+ configASSERT( xEventGroup );
+ configASSERT( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
+ configASSERT( uxBitsToWaitFor != 0 );
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
+ {
+ configASSERT( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0 ) ) );
+ }
+ #endif
+
+ vTaskSuspendAll();
+ {
+ const EventBits_t uxCurrentEventBits = pxEventBits->uxEventBits;
+
+ /* Check to see if the wait condition is already met or not. */
+ xWaitConditionMet = prvTestWaitCondition( uxCurrentEventBits, uxBitsToWaitFor, xWaitForAllBits );
+
+ if( xWaitConditionMet != pdFALSE )
+ {
+ /* The wait condition has already been met so there is no need to
+ * block. */
+ uxReturn = uxCurrentEventBits;
+ xTicksToWait = ( TickType_t ) 0;
+
+ /* Clear the wait bits if requested to do so. */
+ if( xClearOnExit != pdFALSE )
+ {
+ pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+ }
+ else if( xTicksToWait == ( TickType_t ) 0 )
+ {
+ /* The wait condition has not been met, but no block time was
+ * specified, so just return the current value. */
+ uxReturn = uxCurrentEventBits;
+ xTimeoutOccurred = pdTRUE;
+ }
+ else
+ {
+ /* The task is going to block to wait for its required bits to be
+ * set. uxControlBits are used to remember the specified behaviour of
+ * this call to xEventGroupWaitBits() - for use when the event bits
+ * unblock the task. */
+ if( xClearOnExit != pdFALSE )
+ {
+ uxControlBits |= eventCLEAR_EVENTS_ON_EXIT_BIT;
+ }
else
{
mtCOVERAGE_TEST_MARKER();
}
- xTimeoutOccurred = pdTRUE;
- }
- taskEXIT_CRITICAL();
- }
- else
- {
- /* The task unblocked because the bits were set. */
- }
-
- /* The task blocked so control bits may have been set. */
- uxReturn &= ~eventEVENT_BITS_CONTROL_BYTES;
- }
-
- traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred );
-
- /* Prevent compiler warnings when trace macros are not used. */
- ( void ) xTimeoutOccurred;
-
- traceRETURN_xEventGroupWaitBits( uxReturn );
-
- return uxReturn;
-}
-/*-----------------------------------------------------------*/
-
-EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear )
-{
- EventGroup_t * pxEventBits = xEventGroup;
- EventBits_t uxReturn;
-
- traceENTER_xEventGroupClearBits( xEventGroup, uxBitsToClear );
-
- /* Check the user is not attempting to clear the bits used by the kernel
- * itself. */
- configASSERT( xEventGroup );
- configASSERT( ( uxBitsToClear & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
-
- taskENTER_CRITICAL();
- {
- traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear );
-
- /* The value returned is the event group value prior to the bits being
- * cleared. */
- uxReturn = pxEventBits->uxEventBits;
-
- /* Clear the bits. */
- pxEventBits->uxEventBits &= ~uxBitsToClear;
- }
- taskEXIT_CRITICAL();
-
- traceRETURN_xEventGroupClearBits( uxReturn );
-
- return uxReturn;
-}
-/*-----------------------------------------------------------*/
-
-#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
-
- BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear )
- {
- BaseType_t xReturn;
-
- traceENTER_xEventGroupClearBitsFromISR( xEventGroup, uxBitsToClear );
-
- traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear );
- xReturn = xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL );
-
- traceRETURN_xEventGroupClearBitsFromISR( xReturn );
-
- return xReturn;
- }
-
-#endif /* if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
-/*-----------------------------------------------------------*/
-
-EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
-{
- UBaseType_t uxSavedInterruptStatus;
- EventGroup_t const * const pxEventBits = xEventGroup;
- EventBits_t uxReturn;
-
- traceENTER_xEventGroupGetBitsFromISR( xEventGroup );
-
- uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
- {
- uxReturn = pxEventBits->uxEventBits;
- }
- taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
-
- traceRETURN_xEventGroupGetBitsFromISR( uxReturn );
-
- return uxReturn;
-}
-/*-----------------------------------------------------------*/
-
-EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet )
-{
- ListItem_t * pxListItem;
- ListItem_t * pxNext;
- ListItem_t const * pxListEnd;
- List_t const * pxList;
- EventBits_t uxBitsToClear = 0, uxBitsWaitedFor, uxControlBits;
- EventGroup_t * pxEventBits = xEventGroup;
- BaseType_t xMatchFound = pdFALSE;
-
- traceENTER_xEventGroupSetBits( xEventGroup, uxBitsToSet );
-
- /* Check the user is not attempting to set the bits used by the kernel
- * itself. */
- configASSERT( xEventGroup );
- configASSERT( ( uxBitsToSet & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
-
- pxList = &( pxEventBits->xTasksWaitingForBits );
- pxListEnd = listGET_END_MARKER( pxList );
- vTaskSuspendAll();
- {
- traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );
-
- pxListItem = listGET_HEAD_ENTRY( pxList );
-
- /* Set the bits. */
- pxEventBits->uxEventBits |= uxBitsToSet;
-
- /* See if the new bit value should unblock any tasks. */
- while( pxListItem != pxListEnd )
- {
- pxNext = listGET_NEXT( pxListItem );
- uxBitsWaitedFor = listGET_LIST_ITEM_VALUE( pxListItem );
- xMatchFound = pdFALSE;
-
- /* Split the bits waited for from the control bits. */
- uxControlBits = uxBitsWaitedFor & eventEVENT_BITS_CONTROL_BYTES;
- uxBitsWaitedFor &= ~eventEVENT_BITS_CONTROL_BYTES;
-
- if( ( uxControlBits & eventWAIT_FOR_ALL_BITS ) == ( EventBits_t ) 0 )
- {
- /* Just looking for single bit being set. */
- if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) != ( EventBits_t ) 0 )
+ if( xWaitForAllBits != pdFALSE )
{
+ uxControlBits |= eventWAIT_FOR_ALL_BITS;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+
+ /* Store the bits that the calling task is waiting for in the
+ * task's event list item so the kernel knows when a match is
+ * found. Then enter the blocked state. */
+ vTaskPlaceOnUnorderedEventList( &( pxEventBits->xTasksWaitingForBits ), ( uxBitsToWaitFor | uxControlBits ), xTicksToWait );
+
+ /* This is obsolete as it will get set after the task unblocks, but
+ * some compilers mistakenly generate a warning about the variable
+ * being returned without being set if it is not done. */
+ uxReturn = 0;
+
+ traceEVENT_GROUP_WAIT_BITS_BLOCK( xEventGroup, uxBitsToWaitFor );
+ }
+ }
+ xAlreadyYielded = xTaskResumeAll();
+
+ if( xTicksToWait != ( TickType_t ) 0 )
+ {
+ if( xAlreadyYielded == pdFALSE )
+ {
+ taskYIELD_WITHIN_API();
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+
+ /* The task blocked to wait for its required bits to be set - at this
+ * point either the required bits were set or the block time expired. If
+ * the required bits were set they will have been stored in the task's
+ * event list item, and they should now be retrieved then cleared. */
+ uxReturn = uxTaskResetEventItemValue();
+
+ if( ( uxReturn & eventUNBLOCKED_DUE_TO_BIT_SET ) == ( EventBits_t ) 0 )
+ {
+ taskENTER_CRITICAL();
+ {
+ /* The task timed out, just return the current event bit value. */
+ uxReturn = pxEventBits->uxEventBits;
+
+ /* It is possible that the event bits were updated between this
+ * task leaving the Blocked state and running again. */
+ if( prvTestWaitCondition( uxReturn, uxBitsToWaitFor, xWaitForAllBits ) != pdFALSE )
+ {
+ if( xClearOnExit != pdFALSE )
+ {
+ pxEventBits->uxEventBits &= ~uxBitsToWaitFor;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+
+ xTimeoutOccurred = pdTRUE;
+ }
+ taskEXIT_CRITICAL();
+ }
+ else
+ {
+ /* The task unblocked because the bits were set. */
+ }
+
+ /* The task blocked so control bits may have been set. */
+ uxReturn &= ~eventEVENT_BITS_CONTROL_BYTES;
+ }
+
+ traceEVENT_GROUP_WAIT_BITS_END( xEventGroup, uxBitsToWaitFor, xTimeoutOccurred );
+
+ /* Prevent compiler warnings when trace macros are not used. */
+ ( void ) xTimeoutOccurred;
+
+ traceRETURN_xEventGroupWaitBits( uxReturn );
+
+ return uxReturn;
+ }
+/*-----------------------------------------------------------*/
+
+ EventBits_t xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear )
+ {
+ EventGroup_t * pxEventBits = xEventGroup;
+ EventBits_t uxReturn;
+
+ traceENTER_xEventGroupClearBits( xEventGroup, uxBitsToClear );
+
+ /* Check the user is not attempting to clear the bits used by the kernel
+ * itself. */
+ configASSERT( xEventGroup );
+ configASSERT( ( uxBitsToClear & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
+
+ taskENTER_CRITICAL();
+ {
+ traceEVENT_GROUP_CLEAR_BITS( xEventGroup, uxBitsToClear );
+
+ /* The value returned is the event group value prior to the bits being
+ * cleared. */
+ uxReturn = pxEventBits->uxEventBits;
+
+ /* Clear the bits. */
+ pxEventBits->uxEventBits &= ~uxBitsToClear;
+ }
+ taskEXIT_CRITICAL();
+
+ traceRETURN_xEventGroupClearBits( uxReturn );
+
+ return uxReturn;
+ }
+/*-----------------------------------------------------------*/
+
+ #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
+
+ BaseType_t xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear )
+ {
+ BaseType_t xReturn;
+
+ traceENTER_xEventGroupClearBitsFromISR( xEventGroup, uxBitsToClear );
+
+ traceEVENT_GROUP_CLEAR_BITS_FROM_ISR( xEventGroup, uxBitsToClear );
+ xReturn = xTimerPendFunctionCallFromISR( vEventGroupClearBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToClear, NULL );
+
+ traceRETURN_xEventGroupClearBitsFromISR( xReturn );
+
+ return xReturn;
+ }
+
+ #endif /* if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
+/*-----------------------------------------------------------*/
+
+ EventBits_t xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup )
+ {
+ UBaseType_t uxSavedInterruptStatus;
+ EventGroup_t const * const pxEventBits = xEventGroup;
+ EventBits_t uxReturn;
+
+ traceENTER_xEventGroupGetBitsFromISR( xEventGroup );
+
+ uxSavedInterruptStatus = taskENTER_CRITICAL_FROM_ISR();
+ {
+ uxReturn = pxEventBits->uxEventBits;
+ }
+ taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus );
+
+ traceRETURN_xEventGroupGetBitsFromISR( uxReturn );
+
+ return uxReturn;
+ }
+/*-----------------------------------------------------------*/
+
+ EventBits_t xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet )
+ {
+ ListItem_t * pxListItem;
+ ListItem_t * pxNext;
+ ListItem_t const * pxListEnd;
+ List_t const * pxList;
+ EventBits_t uxBitsToClear = 0, uxBitsWaitedFor, uxControlBits;
+ EventGroup_t * pxEventBits = xEventGroup;
+ BaseType_t xMatchFound = pdFALSE;
+
+ traceENTER_xEventGroupSetBits( xEventGroup, uxBitsToSet );
+
+ /* Check the user is not attempting to set the bits used by the kernel
+ * itself. */
+ configASSERT( xEventGroup );
+ configASSERT( ( uxBitsToSet & eventEVENT_BITS_CONTROL_BYTES ) == 0 );
+
+ pxList = &( pxEventBits->xTasksWaitingForBits );
+ pxListEnd = listGET_END_MARKER( pxList );
+ vTaskSuspendAll();
+ {
+ traceEVENT_GROUP_SET_BITS( xEventGroup, uxBitsToSet );
+
+ pxListItem = listGET_HEAD_ENTRY( pxList );
+
+ /* Set the bits. */
+ pxEventBits->uxEventBits |= uxBitsToSet;
+
+ /* See if the new bit value should unblock any tasks. */
+ while( pxListItem != pxListEnd )
+ {
+ pxNext = listGET_NEXT( pxListItem );
+ uxBitsWaitedFor = listGET_LIST_ITEM_VALUE( pxListItem );
+ xMatchFound = pdFALSE;
+
+ /* Split the bits waited for from the control bits. */
+ uxControlBits = uxBitsWaitedFor & eventEVENT_BITS_CONTROL_BYTES;
+ uxBitsWaitedFor &= ~eventEVENT_BITS_CONTROL_BYTES;
+
+ if( ( uxControlBits & eventWAIT_FOR_ALL_BITS ) == ( EventBits_t ) 0 )
+ {
+ /* Just looking for single bit being set. */
+ if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) != ( EventBits_t ) 0 )
+ {
+ xMatchFound = pdTRUE;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+ }
+ else if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) == uxBitsWaitedFor )
+ {
+ /* All bits are set. */
xMatchFound = pdTRUE;
}
else
{
- mtCOVERAGE_TEST_MARKER();
+ /* Need all bits to be set, but not all the bits were set. */
}
+
+ if( xMatchFound != pdFALSE )
+ {
+ /* The bits match. Should the bits be cleared on exit? */
+ if( ( uxControlBits & eventCLEAR_EVENTS_ON_EXIT_BIT ) != ( EventBits_t ) 0 )
+ {
+ uxBitsToClear |= uxBitsWaitedFor;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
+
+ /* Store the actual event flag value in the task's event list
+ * item before removing the task from the event list. The
+ * eventUNBLOCKED_DUE_TO_BIT_SET bit is set so the task knows
+ * that is was unblocked due to its required bits matching, rather
+ * than because it timed out. */
+ vTaskRemoveFromUnorderedEventList( pxListItem, pxEventBits->uxEventBits | eventUNBLOCKED_DUE_TO_BIT_SET );
+ }
+
+ /* Move onto the next list item. Note pxListItem->pxNext is not
+ * used here as the list item may have been removed from the event list
+ * and inserted into the ready/pending reading list. */
+ pxListItem = pxNext;
}
- else if( ( uxBitsWaitedFor & pxEventBits->uxEventBits ) == uxBitsWaitedFor )
+
+ /* Clear any bits that matched when the eventCLEAR_EVENTS_ON_EXIT_BIT
+ * bit was set in the control word. */
+ pxEventBits->uxEventBits &= ~uxBitsToClear;
+ }
+ ( void ) xTaskResumeAll();
+
+ traceRETURN_xEventGroupSetBits( pxEventBits->uxEventBits );
+
+ return pxEventBits->uxEventBits;
+ }
+/*-----------------------------------------------------------*/
+
+ void vEventGroupDelete( EventGroupHandle_t xEventGroup )
+ {
+ EventGroup_t * pxEventBits = xEventGroup;
+ const List_t * pxTasksWaitingForBits;
+
+ traceENTER_vEventGroupDelete( xEventGroup );
+
+ configASSERT( pxEventBits );
+
+ pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
+
+ vTaskSuspendAll();
+ {
+ traceEVENT_GROUP_DELETE( xEventGroup );
+
+ while( listCURRENT_LIST_LENGTH( pxTasksWaitingForBits ) > ( UBaseType_t ) 0 )
{
- /* All bits are set. */
- xMatchFound = pdTRUE;
+ /* Unblock the task, returning 0 as the event list is being deleted
+ * and cannot therefore have any bits set. */
+ configASSERT( pxTasksWaitingForBits->xListEnd.pxNext != ( const ListItem_t * ) &( pxTasksWaitingForBits->xListEnd ) );
+ vTaskRemoveFromUnorderedEventList( pxTasksWaitingForBits->xListEnd.pxNext, eventUNBLOCKED_DUE_TO_BIT_SET );
+ }
+ }
+ ( void ) xTaskResumeAll();
+
+ #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
+ {
+ /* The event group can only have been allocated dynamically - free
+ * it again. */
+ vPortFree( pxEventBits );
+ }
+ #elif ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
+ {
+ /* The event group could have been allocated statically or
+ * dynamically, so check before attempting to free the memory. */
+ if( pxEventBits->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
+ {
+ vPortFree( pxEventBits );
}
else
{
- /* Need all bits to be set, but not all the bits were set. */
+ mtCOVERAGE_TEST_MARKER();
}
+ }
+ #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
- if( xMatchFound != pdFALSE )
+ traceRETURN_vEventGroupDelete();
+ }
+/*-----------------------------------------------------------*/
+
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ BaseType_t xEventGroupGetStaticBuffer( EventGroupHandle_t xEventGroup,
+ StaticEventGroup_t ** ppxEventGroupBuffer )
+ {
+ BaseType_t xReturn;
+ EventGroup_t * pxEventBits = xEventGroup;
+
+ traceENTER_xEventGroupGetStaticBuffer( xEventGroup, ppxEventGroupBuffer );
+
+ configASSERT( pxEventBits );
+ configASSERT( ppxEventGroupBuffer );
+
+ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
{
- /* The bits match. Should the bits be cleared on exit? */
- if( ( uxControlBits & eventCLEAR_EVENTS_ON_EXIT_BIT ) != ( EventBits_t ) 0 )
+ /* Check if the event group was statically allocated. */
+ if( pxEventBits->ucStaticallyAllocated == ( uint8_t ) pdTRUE )
{
- uxBitsToClear |= uxBitsWaitedFor;
+ /* MISRA Ref 11.3.1 [Misaligned access] */
+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
+ /* coverity[misra_c_2012_rule_11_3_violation] */
+ *ppxEventGroupBuffer = ( StaticEventGroup_t * ) pxEventBits;
+ xReturn = pdTRUE;
}
else
{
- mtCOVERAGE_TEST_MARKER();
+ xReturn = pdFALSE;
}
-
- /* Store the actual event flag value in the task's event list
- * item before removing the task from the event list. The
- * eventUNBLOCKED_DUE_TO_BIT_SET bit is set so the task knows
- * that is was unblocked due to its required bits matching, rather
- * than because it timed out. */
- vTaskRemoveFromUnorderedEventList( pxListItem, pxEventBits->uxEventBits | eventUNBLOCKED_DUE_TO_BIT_SET );
}
-
- /* Move onto the next list item. Note pxListItem->pxNext is not
- * used here as the list item may have been removed from the event list
- * and inserted into the ready/pending reading list. */
- pxListItem = pxNext;
- }
-
- /* Clear any bits that matched when the eventCLEAR_EVENTS_ON_EXIT_BIT
- * bit was set in the control word. */
- pxEventBits->uxEventBits &= ~uxBitsToClear;
- }
- ( void ) xTaskResumeAll();
-
- traceRETURN_xEventGroupSetBits( pxEventBits->uxEventBits );
-
- return pxEventBits->uxEventBits;
-}
-/*-----------------------------------------------------------*/
-
-void vEventGroupDelete( EventGroupHandle_t xEventGroup )
-{
- EventGroup_t * pxEventBits = xEventGroup;
- const List_t * pxTasksWaitingForBits;
-
- traceENTER_vEventGroupDelete( xEventGroup );
-
- configASSERT( pxEventBits );
-
- pxTasksWaitingForBits = &( pxEventBits->xTasksWaitingForBits );
-
- vTaskSuspendAll();
- {
- traceEVENT_GROUP_DELETE( xEventGroup );
-
- while( listCURRENT_LIST_LENGTH( pxTasksWaitingForBits ) > ( UBaseType_t ) 0 )
- {
- /* Unblock the task, returning 0 as the event list is being deleted
- * and cannot therefore have any bits set. */
- configASSERT( pxTasksWaitingForBits->xListEnd.pxNext != ( const ListItem_t * ) &( pxTasksWaitingForBits->xListEnd ) );
- vTaskRemoveFromUnorderedEventList( pxTasksWaitingForBits->xListEnd.pxNext, eventUNBLOCKED_DUE_TO_BIT_SET );
- }
- }
- ( void ) xTaskResumeAll();
-
- #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 0 ) )
- {
- /* The event group can only have been allocated dynamically - free
- * it again. */
- vPortFree( pxEventBits );
- }
- #elif ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configSUPPORT_STATIC_ALLOCATION == 1 ) )
- {
- /* The event group could have been allocated statically or
- * dynamically, so check before attempting to free the memory. */
- if( pxEventBits->ucStaticallyAllocated == ( uint8_t ) pdFALSE )
- {
- vPortFree( pxEventBits );
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
- #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
-
- traceRETURN_vEventGroupDelete();
-}
-/*-----------------------------------------------------------*/
-
-#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
- BaseType_t xEventGroupGetStaticBuffer( EventGroupHandle_t xEventGroup,
- StaticEventGroup_t ** ppxEventGroupBuffer )
- {
- BaseType_t xReturn;
- EventGroup_t * pxEventBits = xEventGroup;
-
- traceENTER_xEventGroupGetStaticBuffer( xEventGroup, ppxEventGroupBuffer );
-
- configASSERT( pxEventBits );
- configASSERT( ppxEventGroupBuffer );
-
- #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
- {
- /* Check if the event group was statically allocated. */
- if( pxEventBits->ucStaticallyAllocated == ( uint8_t ) pdTRUE )
+ #else /* configSUPPORT_DYNAMIC_ALLOCATION */
{
+ /* Event group must have been statically allocated. */
/* MISRA Ref 11.3.1 [Misaligned access] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
/* coverity[misra_c_2012_rule_11_3_violation] */
*ppxEventGroupBuffer = ( StaticEventGroup_t * ) pxEventBits;
xReturn = pdTRUE;
}
- else
- {
- xReturn = pdFALSE;
- }
- }
- #else /* configSUPPORT_DYNAMIC_ALLOCATION */
- {
- /* Event group must have been statically allocated. */
- /* MISRA Ref 11.3.1 [Misaligned access] */
- /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-113 */
- /* coverity[misra_c_2012_rule_11_3_violation] */
- *ppxEventGroupBuffer = ( StaticEventGroup_t * ) pxEventBits;
- xReturn = pdTRUE;
- }
- #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
+ #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
- traceRETURN_xEventGroupGetStaticBuffer( xReturn );
+ traceRETURN_xEventGroupGetStaticBuffer( xReturn );
- return xReturn;
- }
-#endif /* configSUPPORT_STATIC_ALLOCATION */
+ return xReturn;
+ }
+ #endif /* configSUPPORT_STATIC_ALLOCATION */
/*-----------------------------------------------------------*/
/* For internal use only - execute a 'set bits' command that was pended from
* an interrupt. */
-void vEventGroupSetBitsCallback( void * pvEventGroup,
- uint32_t ulBitsToSet )
-{
- traceENTER_vEventGroupSetBitsCallback( pvEventGroup, ulBitsToSet );
+ void vEventGroupSetBitsCallback( void * pvEventGroup,
+ uint32_t ulBitsToSet )
+ {
+ traceENTER_vEventGroupSetBitsCallback( pvEventGroup, ulBitsToSet );
- /* MISRA Ref 11.5.4 [Callback function parameter] */
- /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
- /* coverity[misra_c_2012_rule_11_5_violation] */
- ( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet );
+ /* MISRA Ref 11.5.4 [Callback function parameter] */
+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
+ /* coverity[misra_c_2012_rule_11_5_violation] */
+ ( void ) xEventGroupSetBits( pvEventGroup, ( EventBits_t ) ulBitsToSet );
- traceRETURN_vEventGroupSetBitsCallback();
-}
+ traceRETURN_vEventGroupSetBitsCallback();
+ }
/*-----------------------------------------------------------*/
/* For internal use only - execute a 'clear bits' command that was pended from
* an interrupt. */
-void vEventGroupClearBitsCallback( void * pvEventGroup,
- uint32_t ulBitsToClear )
-{
- traceENTER_vEventGroupClearBitsCallback( pvEventGroup, ulBitsToClear );
-
- /* MISRA Ref 11.5.4 [Callback function parameter] */
- /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
- /* coverity[misra_c_2012_rule_11_5_violation] */
- ( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear );
-
- traceRETURN_vEventGroupClearBitsCallback();
-}
-/*-----------------------------------------------------------*/
-
-static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
- const EventBits_t uxBitsToWaitFor,
- const BaseType_t xWaitForAllBits )
-{
- BaseType_t xWaitConditionMet = pdFALSE;
-
- if( xWaitForAllBits == pdFALSE )
+ void vEventGroupClearBitsCallback( void * pvEventGroup,
+ uint32_t ulBitsToClear )
{
- /* Task only has to wait for one bit within uxBitsToWaitFor to be
- * set. Is one already set? */
- if( ( uxCurrentEventBits & uxBitsToWaitFor ) != ( EventBits_t ) 0 )
- {
- xWaitConditionMet = pdTRUE;
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
- else
- {
- /* Task has to wait for all the bits in uxBitsToWaitFor to be set.
- * Are they set already? */
- if( ( uxCurrentEventBits & uxBitsToWaitFor ) == uxBitsToWaitFor )
- {
- xWaitConditionMet = pdTRUE;
- }
- else
- {
- mtCOVERAGE_TEST_MARKER();
- }
- }
+ traceENTER_vEventGroupClearBitsCallback( pvEventGroup, ulBitsToClear );
- return xWaitConditionMet;
-}
-/*-----------------------------------------------------------*/
-
-#if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
-
- BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- BaseType_t * pxHigherPriorityTaskWoken )
- {
- BaseType_t xReturn;
-
- traceENTER_xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken );
-
- traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet );
- xReturn = xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken );
-
- traceRETURN_xEventGroupSetBitsFromISR( xReturn );
-
- return xReturn;
- }
-
-#endif /* if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
-/*-----------------------------------------------------------*/
-
-#if ( configUSE_TRACE_FACILITY == 1 )
-
- UBaseType_t uxEventGroupGetNumber( void * xEventGroup )
- {
- UBaseType_t xReturn;
-
- /* MISRA Ref 11.5.2 [Opaque pointer] */
+ /* MISRA Ref 11.5.4 [Callback function parameter] */
/* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
/* coverity[misra_c_2012_rule_11_5_violation] */
- EventGroup_t const * pxEventBits = ( EventGroup_t * ) xEventGroup;
+ ( void ) xEventGroupClearBits( pvEventGroup, ( EventBits_t ) ulBitsToClear );
- traceENTER_uxEventGroupGetNumber( xEventGroup );
+ traceRETURN_vEventGroupClearBitsCallback();
+ }
+/*-----------------------------------------------------------*/
- if( xEventGroup == NULL )
+ static BaseType_t prvTestWaitCondition( const EventBits_t uxCurrentEventBits,
+ const EventBits_t uxBitsToWaitFor,
+ const BaseType_t xWaitForAllBits )
+ {
+ BaseType_t xWaitConditionMet = pdFALSE;
+
+ if( xWaitForAllBits == pdFALSE )
{
- xReturn = 0;
+ /* Task only has to wait for one bit within uxBitsToWaitFor to be
+ * set. Is one already set? */
+ if( ( uxCurrentEventBits & uxBitsToWaitFor ) != ( EventBits_t ) 0 )
+ {
+ xWaitConditionMet = pdTRUE;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
}
else
{
- xReturn = pxEventBits->uxEventGroupNumber;
+ /* Task has to wait for all the bits in uxBitsToWaitFor to be set.
+ * Are they set already? */
+ if( ( uxCurrentEventBits & uxBitsToWaitFor ) == uxBitsToWaitFor )
+ {
+ xWaitConditionMet = pdTRUE;
+ }
+ else
+ {
+ mtCOVERAGE_TEST_MARKER();
+ }
}
- traceRETURN_uxEventGroupGetNumber( xReturn );
-
- return xReturn;
+ return xWaitConditionMet;
}
-
-#endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/
-#if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
- void vEventGroupSetNumber( void * xEventGroup,
- UBaseType_t uxEventGroupNumber )
- {
- traceENTER_vEventGroupSetNumber( xEventGroup, uxEventGroupNumber );
+ BaseType_t xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ BaseType_t * pxHigherPriorityTaskWoken )
+ {
+ BaseType_t xReturn;
- /* MISRA Ref 11.5.2 [Opaque pointer] */
- /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
- /* coverity[misra_c_2012_rule_11_5_violation] */
- ( ( EventGroup_t * ) xEventGroup )->uxEventGroupNumber = uxEventGroupNumber;
+ traceENTER_xEventGroupSetBitsFromISR( xEventGroup, uxBitsToSet, pxHigherPriorityTaskWoken );
- traceRETURN_vEventGroupSetNumber();
- }
+ traceEVENT_GROUP_SET_BITS_FROM_ISR( xEventGroup, uxBitsToSet );
+ xReturn = xTimerPendFunctionCallFromISR( vEventGroupSetBitsCallback, ( void * ) xEventGroup, ( uint32_t ) uxBitsToSet, pxHigherPriorityTaskWoken );
-#endif /* configUSE_TRACE_FACILITY */
+ traceRETURN_xEventGroupSetBitsFromISR( xReturn );
+
+ return xReturn;
+ }
+
+ #endif /* if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
/*-----------------------------------------------------------*/
+
+ #if ( configUSE_TRACE_FACILITY == 1 )
+
+ UBaseType_t uxEventGroupGetNumber( void * xEventGroup )
+ {
+ UBaseType_t xReturn;
+
+ /* MISRA Ref 11.5.2 [Opaque pointer] */
+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
+ /* coverity[misra_c_2012_rule_11_5_violation] */
+ EventGroup_t const * pxEventBits = ( EventGroup_t * ) xEventGroup;
+
+ traceENTER_uxEventGroupGetNumber( xEventGroup );
+
+ if( xEventGroup == NULL )
+ {
+ xReturn = 0;
+ }
+ else
+ {
+ xReturn = pxEventBits->uxEventGroupNumber;
+ }
+
+ traceRETURN_uxEventGroupGetNumber( xReturn );
+
+ return xReturn;
+ }
+
+ #endif /* configUSE_TRACE_FACILITY */
+/*-----------------------------------------------------------*/
+
+ #if ( configUSE_TRACE_FACILITY == 1 )
+
+ void vEventGroupSetNumber( void * xEventGroup,
+ UBaseType_t uxEventGroupNumber )
+ {
+ traceENTER_vEventGroupSetNumber( xEventGroup, uxEventGroupNumber );
+
+ /* MISRA Ref 11.5.2 [Opaque pointer] */
+ /* More details at: https://github.com/FreeRTOS/FreeRTOS-Kernel/blob/main/MISRA.md#rule-115 */
+ /* coverity[misra_c_2012_rule_11_5_violation] */
+ ( ( EventGroup_t * ) xEventGroup )->uxEventGroupNumber = uxEventGroupNumber;
+
+ traceRETURN_vEventGroupSetNumber();
+ }
+
+ #endif /* configUSE_TRACE_FACILITY */
+/*-----------------------------------------------------------*/
+
+/* This entire source file will be skipped if the application is not configured
+ * to include event groups functionality. If you want to include event groups
+ * then ensure configUSE_EVENT_GROUPS is set to 1 in FreeRTOSConfig.h. */
+#endif /* configUSE_EVENT_GROUPS == 1 */
diff --git a/include/FreeRTOS.h b/include/FreeRTOS.h
index 8dcb407..6961184 100644
--- a/include/FreeRTOS.h
+++ b/include/FreeRTOS.h
@@ -318,6 +318,14 @@
#define configUSE_TIMERS 0
#endif
+#ifndef configUSE_EVENT_GROUPS
+ #define configUSE_EVENT_GROUPS 1
+#endif
+
+#ifndef configUSE_STREAM_BUFFERS
+ #define configUSE_STREAM_BUFFERS 1
+#endif
+
#ifndef configUSE_DAEMON_TASK_STARTUP_HOOK
#define configUSE_DAEMON_TASK_STARTUP_HOOK 0
#endif
diff --git a/include/event_groups.h b/include/event_groups.h
index f565211..8ff2679 100644
--- a/include/event_groups.h
+++ b/include/event_groups.h
@@ -139,6 +139,9 @@
* each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type
* is used to store event bits within an event group.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupCreate()
+ * to be available.
+ *
* @return If the event group was created then a handle to the event group is
* returned. If there was insufficient FreeRTOS heap available to create the
* event group then NULL is returned. See https://www.FreeRTOS.org/a00111.html
@@ -196,6 +199,9 @@
* each event group has 56 usable bits (bit 0 to bit 53). The EventBits_t type
* is used to store event bits within an event group.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupCreateStatic()
+ * to be available.
+ *
* @param pxEventGroupBuffer pxEventGroupBuffer must point to a variable of type
* StaticEventGroup_t, which will be then be used to hold the event group's data
* structures, removing the need for the memory to be allocated dynamically.
@@ -238,6 +244,9 @@
*
* This function cannot be called from an interrupt.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupWaitBits()
+ * to be available.
+ *
* @param xEventGroup The event group in which the bits are being tested. The
* event group must have previously been created using a call to
* xEventGroupCreate().
@@ -331,6 +340,9 @@
* Clear bits within an event group. This function cannot be called from an
* interrupt.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupClearBits()
+ * to be available.
+ *
* @param xEventGroup The event group in which the bits are to be cleared.
*
* @param uxBitsToClear A bitwise value that indicates the bit or bits to clear
@@ -461,6 +473,9 @@
* Setting bits in an event group will automatically unblock tasks that are
* blocked waiting for the bits.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupSetBits()
+ * to be available.
+ *
* @param xEventGroup The event group in which the bits are to be set.
*
* @param uxBitsToSet A bitwise value that indicates the bit or bits to set.
@@ -625,6 +640,9 @@
* this case all the bits specified by uxBitsToWait will be automatically
* cleared before the function returns.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupSync()
+ * to be available.
+ *
* @param xEventGroup The event group in which the bits are being tested. The
* event group must have previously been created using a call to
* xEventGroupCreate().
@@ -743,6 +761,9 @@
* Returns the current value of the bits in an event group. This function
* cannot be used from an interrupt.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupGetBits()
+ * to be available.
+ *
* @param xEventGroup The event group being queried.
*
* @return The event group bits at the time xEventGroupGetBits() was called.
@@ -760,6 +781,9 @@
*
* A version of xEventGroupGetBits() that can be called from an ISR.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupGetBitsFromISR()
+ * to be available.
+ *
* @param xEventGroup The event group being queried.
*
* @return The event group bits at the time xEventGroupGetBitsFromISR() was called.
@@ -779,6 +803,9 @@
* xEventGroupCreate(). Tasks that are blocked on the event group will be
* unblocked and obtain 0 as the event group's value.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for vEventGroupDelete()
+ * to be available.
+ *
* @param xEventGroup The event group being deleted.
*/
void vEventGroupDelete( EventGroupHandle_t xEventGroup ) PRIVILEGED_FUNCTION;
@@ -793,6 +820,9 @@
* Retrieve a pointer to a statically created event groups's data structure
* buffer. It is the same buffer that is supplied at the time of creation.
*
+ * The configUSE_EVENT_GROUPS configuration constant must be set to 1 for xEventGroupGetStaticBuffer()
+ * to be available.
+ *
* @param xEventGroup The event group for which to retrieve the buffer.
*
* @param ppxEventGroupBuffer Used to return a pointer to the event groups's
diff --git a/include/message_buffer.h b/include/message_buffer.h
index fb5a6c0..1b1356c 100644
--- a/include/message_buffer.h
+++ b/include/message_buffer.h
@@ -100,6 +100,8 @@
*
* configSUPPORT_DYNAMIC_ALLOCATION must be set to 1 or left undefined in
* FreeRTOSConfig.h for xMessageBufferCreate() to be available.
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferCreate() to be available.
*
* @param xBufferSizeBytes The total number of bytes (not messages) the message
* buffer will be able to hold at any one time. When a message is written to
@@ -168,12 +170,15 @@
*
* @code{c}
* MessageBufferHandle_t xMessageBufferCreateStatic( size_t xBufferSizeBytes,
- * uint8_t *pucMessageBufferStorageArea,
- * StaticMessageBuffer_t *pxStaticMessageBuffer );
+ * uint8_t *pucMessageBufferStorageArea,
+ * StaticMessageBuffer_t *pxStaticMessageBuffer );
* @endcode
* Creates a new message buffer using statically allocated memory. See
* xMessageBufferCreate() for a version that uses dynamically allocated memory.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferCreateStatic() to be available.
+ *
* @param xBufferSizeBytes The size, in bytes, of the buffer pointed to by the
* pucMessageBufferStorageArea parameter. When a message is written to the
* message buffer an additional sizeof( size_t ) bytes are also written to store
@@ -258,6 +263,9 @@
* buffer and storage area buffer. These are the same buffers that are supplied
* at the time of creation.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferGetStaticBuffers() to be available.
+ *
* @param xMessageBuffer The message buffer for which to retrieve the buffers.
*
* @param ppucMessageBufferStorageArea Used to return a pointer to the
@@ -281,9 +289,9 @@
*
* @code{c}
* size_t xMessageBufferSend( MessageBufferHandle_t xMessageBuffer,
- * const void *pvTxData,
- * size_t xDataLengthBytes,
- * TickType_t xTicksToWait );
+ * const void *pvTxData,
+ * size_t xDataLengthBytes,
+ * TickType_t xTicksToWait );
* @endcode
*
* Sends a discrete message to the message buffer. The message can be any
@@ -309,6 +317,9 @@
* xMessageBufferSendFromISR() to write to a message buffer from an interrupt
* service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferSend() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer to which a message is
* being sent.
*
@@ -381,9 +392,9 @@
*
* @code{c}
* size_t xMessageBufferSendFromISR( MessageBufferHandle_t xMessageBuffer,
- * const void *pvTxData,
- * size_t xDataLengthBytes,
- * BaseType_t *pxHigherPriorityTaskWoken );
+ * const void *pvTxData,
+ * size_t xDataLengthBytes,
+ * BaseType_t *pxHigherPriorityTaskWoken );
* @endcode
*
* Interrupt safe version of the API function that sends a discrete message to
@@ -409,6 +420,9 @@
* xMessageBufferSendFromISR() to write to a message buffer from an interrupt
* service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferSendFromISR() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer to which a message is
* being sent.
*
@@ -486,9 +500,9 @@
*
* @code{c}
* size_t xMessageBufferReceive( MessageBufferHandle_t xMessageBuffer,
- * void *pvRxData,
- * size_t xBufferLengthBytes,
- * TickType_t xTicksToWait );
+ * void *pvRxData,
+ * size_t xBufferLengthBytes,
+ * TickType_t xTicksToWait );
* @endcode
*
* Receives a discrete message from a message buffer. Messages can be of
@@ -513,6 +527,9 @@
* xMessageBufferReceiveFromISR() to read from a message buffer from an
* interrupt service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferReceive() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer from which a message
* is being received.
*
@@ -576,9 +593,9 @@
*
* @code{c}
* size_t xMessageBufferReceiveFromISR( MessageBufferHandle_t xMessageBuffer,
- * void *pvRxData,
- * size_t xBufferLengthBytes,
- * BaseType_t *pxHigherPriorityTaskWoken );
+ * void *pvRxData,
+ * size_t xBufferLengthBytes,
+ * BaseType_t *pxHigherPriorityTaskWoken );
* @endcode
*
* An interrupt safe version of the API function that receives a discrete
@@ -604,6 +621,9 @@
* xMessageBufferReceiveFromISR() to read from a message buffer from an
* interrupt service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferReceiveFromISR() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer from which a message
* is being received.
*
@@ -687,6 +707,9 @@
* A message buffer handle must not be used after the message buffer has been
* deleted.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * vMessageBufferDelete() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer to be deleted.
*
*/
@@ -703,6 +726,9 @@
* cannot accept any more messages, of any size, until space is made available
* by a message being removed from the message buffer.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferIsFull() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return If the message buffer referenced by xMessageBuffer is full then
@@ -719,6 +745,9 @@
*
* Tests to see if a message buffer is empty (does not contain any messages).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferIsEmpty() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return If the message buffer referenced by xMessageBuffer is empty then
@@ -739,6 +768,9 @@
*
* A message buffer can only be reset if there are no tasks blocked on it.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferReset() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer being reset.
*
* @return If the message buffer was reset then pdPASS is returned. If the
@@ -760,6 +792,9 @@
* @endcode
* Returns the number of bytes of free space in the message buffer.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferSpaceAvailable() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return The number of bytes that can be written to the message buffer before
@@ -786,6 +821,9 @@
* Useful if xMessageBufferReceive() returned 0 because the size of the buffer
* passed into xMessageBufferReceive() was too small to hold the next message.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferNextLengthBytes() to be available.
+ *
* @param xMessageBuffer The handle of the message buffer being queried.
*
* @return The length (in bytes) of the next message in the message buffer, or 0
@@ -817,6 +855,9 @@
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferSendCompletedFromISR() to be available.
+ *
* @param xMessageBuffer The handle of the stream buffer to which data was
* written.
*
@@ -858,6 +899,9 @@
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xMessageBufferReceiveCompletedFromISR() to be available.
+ *
* @param xMessageBuffer The handle of the stream buffer from which data was
* read.
*
diff --git a/include/stream_buffer.h b/include/stream_buffer.h
index d3ed9af..94a0e0c 100644
--- a/include/stream_buffer.h
+++ b/include/stream_buffer.h
@@ -91,6 +91,8 @@
*
* configSUPPORT_DYNAMIC_ALLOCATION must be set to 1 or left undefined in
* FreeRTOSConfig.h for xStreamBufferCreate() to be available.
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferCreate() to be available.
*
* @param xBufferSizeBytes The total number of bytes the stream buffer will be
* able to hold at any one time.
@@ -167,15 +169,17 @@
*
* @code{c}
* StreamBufferHandle_t xStreamBufferCreateStatic( size_t xBufferSizeBytes,
- * size_t xTriggerLevelBytes,
- * uint8_t *pucStreamBufferStorageArea,
- * StaticStreamBuffer_t *pxStaticStreamBuffer );
+ * size_t xTriggerLevelBytes,
+ * uint8_t *pucStreamBufferStorageArea,
+ * StaticStreamBuffer_t *pxStaticStreamBuffer );
* @endcode
* Creates a new stream buffer using statically allocated memory. See
* xStreamBufferCreate() for a version that uses dynamically allocated memory.
*
* configSUPPORT_STATIC_ALLOCATION must be set to 1 in FreeRTOSConfig.h for
- * xStreamBufferCreateStatic() to be available.
+ * xStreamBufferCreateStatic() to be available. configUSE_STREAM_BUFFERS must be
+ * set to 1 in for FreeRTOSConfig.h for xStreamBufferCreateStatic() to be
+ * available.
*
* @param xBufferSizeBytes The size, in bytes, of the buffer pointed to by the
* pucStreamBufferStorageArea parameter.
@@ -273,6 +277,9 @@
* buffer and storage area buffer. These are the same buffers that are supplied
* at the time of creation.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferGetStaticBuffers() to be available.
+ *
* @param xStreamBuffer The stream buffer for which to retrieve the buffers.
*
* @param ppucStreamBufferStorageArea Used to return a pointer to the stream
@@ -297,9 +304,9 @@
*
* @code{c}
* size_t xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- * const void *pvTxData,
- * size_t xDataLengthBytes,
- * TickType_t xTicksToWait );
+ * const void *pvTxData,
+ * size_t xDataLengthBytes,
+ * TickType_t xTicksToWait );
* @endcode
*
* Sends bytes to a stream buffer. The bytes are copied into the stream buffer.
@@ -323,6 +330,9 @@
* xStreamBufferSendFromISR() to write to a stream buffer from an interrupt
* service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferSend() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer to which a stream is
* being sent.
*
@@ -394,9 +404,9 @@
*
* @code{c}
* size_t xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
- * const void *pvTxData,
- * size_t xDataLengthBytes,
- * BaseType_t *pxHigherPriorityTaskWoken );
+ * const void *pvTxData,
+ * size_t xDataLengthBytes,
+ * BaseType_t *pxHigherPriorityTaskWoken );
* @endcode
*
* Interrupt safe version of the API function that sends a stream of bytes to
@@ -421,6 +431,9 @@
* xStreamBufferSendFromISR() to write to a stream buffer from an interrupt
* service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferSendFromISR() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer to which a stream is
* being sent.
*
@@ -495,9 +508,9 @@
*
* @code{c}
* size_t xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- * void *pvRxData,
- * size_t xBufferLengthBytes,
- * TickType_t xTicksToWait );
+ * void *pvRxData,
+ * size_t xBufferLengthBytes,
+ * TickType_t xTicksToWait );
* @endcode
*
* Receives bytes from a stream buffer.
@@ -521,6 +534,9 @@
* xStreamBufferReceiveFromISR() to read from a stream buffer from an
* interrupt service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferReceive() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer from which bytes are to
* be received.
*
@@ -584,9 +600,9 @@
*
* @code{c}
* size_t xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer,
- * void *pvRxData,
- * size_t xBufferLengthBytes,
- * BaseType_t *pxHigherPriorityTaskWoken );
+ * void *pvRxData,
+ * size_t xBufferLengthBytes,
+ * BaseType_t *pxHigherPriorityTaskWoken );
* @endcode
*
* An interrupt safe version of the API function that receives bytes from a
@@ -596,6 +612,9 @@
* Use xStreamBufferReceiveFromISR() to read bytes from a stream buffer from an
* interrupt service routine (ISR).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferReceiveFromISR() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer from which a stream
* is being received.
*
@@ -680,6 +699,9 @@
* A stream buffer handle must not be used after the stream buffer has been
* deleted.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * vStreamBufferDelete() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer to be deleted.
*
* \defgroup vStreamBufferDelete vStreamBufferDelete
@@ -697,6 +719,9 @@
* Queries a stream buffer to see if it is full. A stream buffer is full if it
* does not have any free space, and therefore cannot accept any more data.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferIsFull() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return If the stream buffer is full then pdTRUE is returned. Otherwise
@@ -717,6 +742,9 @@
* Queries a stream buffer to see if it is empty. A stream buffer is empty if
* it does not contain any data.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferIsEmpty() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return If the stream buffer is empty then pdTRUE is returned. Otherwise
@@ -739,6 +767,9 @@
* are no tasks blocked waiting to either send to or receive from the stream
* buffer.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferReset() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer being reset.
*
* @return If the stream buffer is reset then pdPASS is returned. If there was
@@ -761,6 +792,9 @@
* equal to the amount of data that can be sent to the stream buffer before it
* is full.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferSpacesAvailable() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return The number of bytes that can be written to the stream buffer before
@@ -782,6 +816,9 @@
* the number of bytes that can be read from the stream buffer before the stream
* buffer would be empty.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferBytesAvailable() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer being queried.
*
* @return The number of bytes that can be read from the stream buffer before
@@ -816,6 +853,9 @@
* A trigger level is set when the stream buffer is created, and can be modified
* using xStreamBufferSetTriggerLevel().
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferSetTriggerLevel() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer being updated.
*
* @param xTriggerLevel The new trigger level for the stream buffer.
@@ -850,6 +890,9 @@
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferSendCompletedFromISR() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer to which data was
* written.
*
@@ -891,6 +934,9 @@
* See the example implemented in FreeRTOS/Demo/Minimal/MessageBufferAMP.c for
* additional information.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * xStreamBufferReceiveCompletedFromISR() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer from which data was
* read.
*
@@ -924,6 +970,9 @@
* vStreamBufferSetStreamBufferNotificationIndex, this function returns the
* default value (tskDEFAULT_INDEX_TO_NOTIFY).
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * uxStreamBufferGetStreamBufferNotificationIndex() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer for which the task
* notification index is retrieved.
*
@@ -951,6 +1000,9 @@
* before attempting to send or receive data from the stream buffer to avoid
* inconsistencies.
*
+ * configUSE_STREAM_BUFFERS must be set to 1 in for FreeRTOSConfig.h for
+ * vStreamBufferSetStreamBufferNotificationIndex() to be available.
+ *
* @param xStreamBuffer The handle of the stream buffer for which the task
* notification index is set.
*
diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c
index fb167a6..1fb6789 100644
--- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c
+++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23/mpu_wrappers_v2_asm.c
@@ -1690,117 +1690,133 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1826,10 +1842,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1857,221 +1873,253 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c
index fb167a6..1fb6789 100644
--- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c
+++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM23_NTZ/mpu_wrappers_v2_asm.c
@@ -1690,117 +1690,133 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1826,10 +1842,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1857,221 +1873,253 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c
index 4f66448..02229d9 100644
--- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c
+++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,130 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1782,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1812,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c
index 4f66448..6642c9e 100644
--- a/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c
+++ b/portable/ARMv8M/non_secure/portable/GCC/ARM_CM33_NTZ/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,129 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1781,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1811,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/Common/mpu_wrappers.c b/portable/Common/mpu_wrappers.c
index 03ca77c..85facbd 100644
--- a/portable/Common/mpu_wrappers.c
+++ b/portable/Common/mpu_wrappers.c
@@ -1952,7 +1952,7 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) )
EventGroupHandle_t MPU_xEventGroupCreate( void ) /* FREERTOS_SYSTEM_CALL */
{
EventGroupHandle_t xReturn;
@@ -1975,10 +1975,10 @@
return xReturn;
}
- #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
+ #endif /* #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) )
EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer ) /* FREERTOS_SYSTEM_CALL */
{
EventGroupHandle_t xReturn;
@@ -2001,377 +2001,407 @@
return xReturn;
}
- #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
+ #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToWaitFor,
+ const BaseType_t xClearOnExit,
+ const BaseType_t xWaitForAllBits,
+ TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
+ {
+ EventBits_t xReturn;
+
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
+
+ xReturn = xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
+ }
+
+ return xReturn;
+ }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+/*-----------------------------------------------------------*/
+
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* FREERTOS_SYSTEM_CALL */
+ {
+ EventBits_t xReturn;
+
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
+
+ xReturn = xEventGroupClearBits( xEventGroup, uxBitsToClear );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xEventGroupClearBits( xEventGroup, uxBitsToClear );
+ }
+
+ return xReturn;
+ }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+/*-----------------------------------------------------------*/
+
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* FREERTOS_SYSTEM_CALL */
+ {
+ EventBits_t xReturn;
+
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
+
+ xReturn = xEventGroupSetBits( xEventGroup, uxBitsToSet );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xEventGroupSetBits( xEventGroup, uxBitsToSet );
+ }
+
+ return xReturn;
+ }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+/*-----------------------------------------------------------*/
+
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
const EventBits_t uxBitsToWaitFor,
- const BaseType_t xClearOnExit,
- const BaseType_t xWaitForAllBits,
TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
- {
- EventBits_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ EventBits_t xReturn;
- xReturn = xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xEventGroupWaitBits( xEventGroup, uxBitsToWaitFor, xClearOnExit, xWaitForAllBits, xTicksToWait );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* FREERTOS_SYSTEM_CALL */
- {
- EventBits_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- xReturn = xEventGroupClearBits( xEventGroup, uxBitsToClear );
- portMEMORY_BARRIER();
+ vEventGroupDelete( xEventGroup );
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ vEventGroupDelete( xEventGroup );
+ }
}
- else
- {
- xReturn = xEventGroupClearBits( xEventGroup, uxBitsToClear );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* FREERTOS_SYSTEM_CALL */
- {
- EventBits_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ size_t xReturn;
- xReturn = xEventGroupSetBits( xEventGroup, uxBitsToSet );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferSend( xStreamBuffer, pvTxData, xDataLengthBytes, xTicksToWait );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferSend( xStreamBuffer, pvTxData, xDataLengthBytes, xTicksToWait );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xEventGroupSetBits( xEventGroup, uxBitsToSet );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
- {
- EventBits_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ size_t xReturn;
- xReturn = xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferNextMessageLengthBytes( xStreamBuffer );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferNextMessageLengthBytes( xStreamBuffer );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xEventGroupSync( xEventGroup, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup ) /* FREERTOS_SYSTEM_CALL */
- {
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ size_t xReturn;
- vEventGroupDelete( xEventGroup );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferReceive( xStreamBuffer, pvRxData, xBufferLengthBytes, xTicksToWait );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferReceive( xStreamBuffer, pvRxData, xBufferLengthBytes, xTicksToWait );
+ }
+
+ return xReturn;
}
- else
- {
- vEventGroupDelete( xEventGroup );
- }
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
- {
- size_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- xReturn = xStreamBufferSend( xStreamBuffer, pvTxData, xDataLengthBytes, xTicksToWait );
- portMEMORY_BARRIER();
+ vStreamBufferDelete( xStreamBuffer );
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ vStreamBufferDelete( xStreamBuffer );
+ }
}
- else
- {
- xReturn = xStreamBufferSend( xStreamBuffer, pvTxData, xDataLengthBytes, xTicksToWait );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- size_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ BaseType_t xReturn;
- xReturn = xStreamBufferNextMessageLengthBytes( xStreamBuffer );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferIsFull( xStreamBuffer );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferIsFull( xStreamBuffer );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xStreamBufferNextMessageLengthBytes( xStreamBuffer );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
- {
- size_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ BaseType_t xReturn;
- xReturn = xStreamBufferReceive( xStreamBuffer, pvRxData, xBufferLengthBytes, xTicksToWait );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferIsEmpty( xStreamBuffer );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferIsEmpty( xStreamBuffer );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xStreamBufferReceive( xStreamBuffer, pvRxData, xBufferLengthBytes, xTicksToWait );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ BaseType_t MPU_xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ BaseType_t xReturn;
- vStreamBufferDelete( xStreamBuffer );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferReset( xStreamBuffer );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferReset( xStreamBuffer );
+ }
+
+ return xReturn;
}
- else
- {
- vStreamBufferDelete( xStreamBuffer );
- }
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- BaseType_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ size_t xReturn;
- xReturn = xStreamBufferIsFull( xStreamBuffer );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
+ xReturn = xStreamBufferSpacesAvailable( xStreamBuffer );
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferSpacesAvailable( xStreamBuffer );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xStreamBufferIsFull( xStreamBuffer );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- BaseType_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ size_t xReturn;
- xReturn = xStreamBufferIsEmpty( xStreamBuffer );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferBytesAvailable( xStreamBuffer );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferBytesAvailable( xStreamBuffer );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xStreamBufferIsEmpty( xStreamBuffer );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- BaseType_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* FREERTOS_SYSTEM_CALL */
{
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
+ BaseType_t xReturn;
- xReturn = xStreamBufferReset( xStreamBuffer );
- portMEMORY_BARRIER();
+ if( portIS_PRIVILEGED() == pdFALSE )
+ {
+ portRAISE_PRIVILEGE();
+ portMEMORY_BARRIER();
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
+ xReturn = xStreamBufferSetTriggerLevel( xStreamBuffer, xTriggerLevel );
+ portMEMORY_BARRIER();
+
+ portRESET_PRIVILEGE();
+ portMEMORY_BARRIER();
+ }
+ else
+ {
+ xReturn = xStreamBufferSetTriggerLevel( xStreamBuffer, xTriggerLevel );
+ }
+
+ return xReturn;
}
- else
- {
- xReturn = xStreamBufferReset( xStreamBuffer );
- }
-
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- size_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
- {
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
- xReturn = xStreamBufferSpacesAvailable( xStreamBuffer );
- portMEMORY_BARRIER();
-
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
- }
- else
- {
- xReturn = xStreamBufferSpacesAvailable( xStreamBuffer );
- }
-
- return xReturn;
- }
-/*-----------------------------------------------------------*/
-
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
- {
- size_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
- {
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
-
- xReturn = xStreamBufferBytesAvailable( xStreamBuffer );
- portMEMORY_BARRIER();
-
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
- }
- else
- {
- xReturn = xStreamBufferBytesAvailable( xStreamBuffer );
- }
-
- return xReturn;
- }
-/*-----------------------------------------------------------*/
-
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* FREERTOS_SYSTEM_CALL */
- {
- BaseType_t xReturn;
-
- if( portIS_PRIVILEGED() == pdFALSE )
- {
- portRAISE_PRIVILEGE();
- portMEMORY_BARRIER();
-
- xReturn = xStreamBufferSetTriggerLevel( xStreamBuffer, xTriggerLevel );
- portMEMORY_BARRIER();
-
- portRESET_PRIVILEGE();
- portMEMORY_BARRIER();
- }
- else
- {
- xReturn = xStreamBufferSetTriggerLevel( xStreamBuffer, xTriggerLevel );
- }
-
- return xReturn;
- }
-/*-----------------------------------------------------------*/
-
- #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) )
StreamBufferHandle_t MPU_xStreamBufferGenericCreate( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
BaseType_t xIsMessageBuffer,
@@ -2422,10 +2452,10 @@
return xReturn;
}
- #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
+ #endif /* #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) )
StreamBufferHandle_t MPU_xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
BaseType_t xIsMessageBuffer,
@@ -2482,7 +2512,7 @@
return xReturn;
}
- #endif /* configSUPPORT_STATIC_ALLOCATION */
+ #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) ) */
/*-----------------------------------------------------------*/
diff --git a/portable/Common/mpu_wrappers_v2.c b/portable/Common/mpu_wrappers_v2.c
index 99256e3..a7ab666 100644
--- a/portable/Common/mpu_wrappers_v2.c
+++ b/portable/Common/mpu_wrappers_v2.c
@@ -215,22 +215,27 @@
#define MPU_GetTaskHandleAtIndex( lIndex ) ( TaskHandle_t ) MPU_GetHandleAtIndex( ( lIndex ), KERNEL_OBJECT_TYPE_TASK )
#define MPU_GetIndexForTaskHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) ( xHandle ), KERNEL_OBJECT_TYPE_TASK )
+ #if ( configUSE_EVENT_GROUPS == 1 )
/*
* Wrappers to keep all the casting in one place for Event Group APIs.
*/
- #define MPU_StoreEventGroupHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( ( lIndex ), ( OpaqueObjectHandle_t ) ( xHandle ), NULL, KERNEL_OBJECT_TYPE_EVENT_GROUP )
- #define MPU_GetEventGroupHandleAtIndex( lIndex ) ( EventGroupHandle_t ) MPU_GetHandleAtIndex( ( lIndex ), KERNEL_OBJECT_TYPE_EVENT_GROUP )
- #define MPU_GetIndexForEventGroupHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) ( xHandle ), KERNEL_OBJECT_TYPE_EVENT_GROUP )
+ #define MPU_StoreEventGroupHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( ( lIndex ), ( OpaqueObjectHandle_t ) ( xHandle ), NULL, KERNEL_OBJECT_TYPE_EVENT_GROUP )
+ #define MPU_GetEventGroupHandleAtIndex( lIndex ) ( EventGroupHandle_t ) MPU_GetHandleAtIndex( ( lIndex ), KERNEL_OBJECT_TYPE_EVENT_GROUP )
+ #define MPU_GetIndexForEventGroupHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) ( xHandle ), KERNEL_OBJECT_TYPE_EVENT_GROUP )
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+
+ #if ( configUSE_STREAM_BUFFERS == 1 )
/*
* Wrappers to keep all the casting in one place for Stream Buffer APIs.
*/
- #define MPU_StoreStreamBufferHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( ( lIndex ), ( OpaqueObjectHandle_t ) ( xHandle), NULL, KERNEL_OBJECT_TYPE_STREAM_BUFFER )
- #define MPU_GetStreamBufferHandleAtIndex( lIndex ) ( StreamBufferHandle_t ) MPU_GetHandleAtIndex( ( lIndex ), KERNEL_OBJECT_TYPE_STREAM_BUFFER )
- #define MPU_GetIndexForStreamBufferHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) ( xHandle ), KERNEL_OBJECT_TYPE_STREAM_BUFFER )
+ #define MPU_StoreStreamBufferHandleAtIndex( lIndex, xHandle ) MPU_StoreHandleAndDataAtIndex( ( lIndex ), ( OpaqueObjectHandle_t ) ( xHandle), NULL, KERNEL_OBJECT_TYPE_STREAM_BUFFER )
+ #define MPU_GetStreamBufferHandleAtIndex( lIndex ) ( StreamBufferHandle_t ) MPU_GetHandleAtIndex( ( lIndex ), KERNEL_OBJECT_TYPE_STREAM_BUFFER )
+ #define MPU_GetIndexForStreamBufferHandle( xHandle ) MPU_GetIndexForHandle( ( OpaqueObjectHandle_t ) ( xHandle ), KERNEL_OBJECT_TYPE_STREAM_BUFFER )
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
#if ( configUSE_TIMERS == 1 )
-
/*
* Wrappers to keep all the casting in one place for Timer APIs.
*/
@@ -3867,53 +3872,99 @@
/* MPU wrappers for event group APIs. */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToWaitFor,
- const BaseType_t xClearOnExit,
- const BaseType_t xWaitForAllBits,
- TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
- {
- EventBits_t xReturn = 0;
- xEventGroupWaitBitsParams_t xParams;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- xParams.xEventGroup = xEventGroup;
- xParams.uxBitsToWaitFor = uxBitsToWaitFor;
- xParams.xClearOnExit = xClearOnExit;
- xParams.xWaitForAllBits = xWaitForAllBits;
- xParams.xTicksToWait = xTicksToWait;
-
- xReturn = MPU_xEventGroupWaitBitsEntry( &( xParams ) );
-
- return xReturn;
- }
-
- EventBits_t MPU_xEventGroupWaitBitsImpl( const xEventGroupWaitBitsParams_t * pxParams ) PRIVILEGED_FUNCTION;
-
- EventBits_t MPU_xEventGroupWaitBitsImpl( const xEventGroupWaitBitsParams_t * pxParams ) /* PRIVILEGED_FUNCTION */
- {
- EventBits_t xReturn = 0;
- EventGroupHandle_t xInternalEventGroupHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
- BaseType_t xAreParamsReadable = pdFALSE;
-
- if( pxParams != NULL )
+ EventBits_t MPU_xEventGroupWaitBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToWaitFor,
+ const BaseType_t xClearOnExit,
+ const BaseType_t xWaitForAllBits,
+ TickType_t xTicksToWait ) /* FREERTOS_SYSTEM_CALL */
{
- xAreParamsReadable = xPortIsAuthorizedToAccessBuffer( pxParams,
- sizeof( xEventGroupWaitBitsParams_t ),
- tskMPU_READ_PERMISSION );
+ EventBits_t xReturn = 0;
+ xEventGroupWaitBitsParams_t xParams;
+
+ xParams.xEventGroup = xEventGroup;
+ xParams.uxBitsToWaitFor = uxBitsToWaitFor;
+ xParams.xClearOnExit = xClearOnExit;
+ xParams.xWaitForAllBits = xWaitForAllBits;
+ xParams.xTicksToWait = xTicksToWait;
+
+ xReturn = MPU_xEventGroupWaitBitsEntry( &( xParams ) );
+
+ return xReturn;
}
- if( xAreParamsReadable == pdTRUE )
+ EventBits_t MPU_xEventGroupWaitBitsImpl( const xEventGroupWaitBitsParams_t * pxParams ) PRIVILEGED_FUNCTION;
+
+ EventBits_t MPU_xEventGroupWaitBitsImpl( const xEventGroupWaitBitsParams_t * pxParams ) /* PRIVILEGED_FUNCTION */
{
- if( ( ( pxParams->uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0U ) &&
- ( pxParams->uxBitsToWaitFor != 0U )
- #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
- && ( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( pxParams->xTicksToWait != 0U ) ) )
- #endif
- )
+ EventBits_t xReturn = 0;
+ EventGroupHandle_t xInternalEventGroupHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
+ BaseType_t xAreParamsReadable = pdFALSE;
+
+ if( pxParams != NULL )
{
- lIndex = ( int32_t ) ( pxParams->xEventGroup );
+ xAreParamsReadable = xPortIsAuthorizedToAccessBuffer( pxParams,
+ sizeof( xEventGroupWaitBitsParams_t ),
+ tskMPU_READ_PERMISSION );
+ }
+
+ if( xAreParamsReadable == pdTRUE )
+ {
+ if( ( ( pxParams->uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0U ) &&
+ ( pxParams->uxBitsToWaitFor != 0U )
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
+ && ( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( pxParams->xTicksToWait != 0U ) ) )
+ #endif
+ )
+ {
+ lIndex = ( int32_t ) ( pxParams->xEventGroup );
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ {
+ xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xCallingTaskIsAuthorizedToAccessEventGroup == pdTRUE )
+ {
+ xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalEventGroupHandle != NULL )
+ {
+ xReturn = xEventGroupWaitBits( xInternalEventGroupHandle,
+ pxParams->uxBitsToWaitFor,
+ pxParams->xClearOnExit,
+ pxParams->xWaitForAllBits,
+ pxParams->xTicksToWait );
+ }
+ }
+ }
+ }
+ }
+
+ return xReturn;
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+/*-----------------------------------------------------------*/
+
+ #if ( configUSE_EVENT_GROUPS == 1 )
+
+ EventBits_t MPU_xEventGroupClearBitsImpl( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
+
+ EventBits_t MPU_xEventGroupClearBitsImpl( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* PRIVILEGED_FUNCTION */
+ {
+ EventBits_t xReturn = 0;
+ EventGroupHandle_t xInternalEventGroupHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
+
+ if( ( uxBitsToClear & eventEVENT_BITS_CONTROL_BYTES ) == 0U )
+ {
+ lIndex = ( int32_t ) xEventGroup;
if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
@@ -3925,136 +3976,106 @@
if( xInternalEventGroupHandle != NULL )
{
- xReturn = xEventGroupWaitBits( xInternalEventGroupHandle,
- pxParams->uxBitsToWaitFor,
- pxParams->xClearOnExit,
- pxParams->xWaitForAllBits,
- pxParams->xTicksToWait );
+ xReturn = xEventGroupClearBits( xInternalEventGroupHandle, uxBitsToClear );
}
}
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBitsImpl( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBitsImpl( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* PRIVILEGED_FUNCTION */
- {
- EventBits_t xReturn = 0;
- EventGroupHandle_t xInternalEventGroupHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
+ EventBits_t MPU_xEventGroupSetBitsImpl( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) PRIVILEGED_FUNCTION;
- if( ( uxBitsToClear & eventEVENT_BITS_CONTROL_BYTES ) == 0U )
+ EventBits_t MPU_xEventGroupSetBitsImpl( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* PRIVILEGED_FUNCTION */
{
- lIndex = ( int32_t ) xEventGroup;
+ EventBits_t xReturn = 0;
+ EventGroupHandle_t xInternalEventGroupHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ if( ( uxBitsToSet & eventEVENT_BITS_CONTROL_BYTES ) == 0U )
{
- xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ lIndex = ( int32_t ) xEventGroup;
- if( xCallingTaskIsAuthorizedToAccessEventGroup == pdTRUE )
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalEventGroupHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessEventGroup == pdTRUE )
{
- xReturn = xEventGroupClearBits( xInternalEventGroupHandle, uxBitsToClear );
+ xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalEventGroupHandle != NULL )
+ {
+ xReturn = xEventGroupSetBits( xInternalEventGroupHandle, uxBitsToSet );
+ }
}
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBitsImpl( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBitsImpl( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* PRIVILEGED_FUNCTION */
- {
- EventBits_t xReturn = 0;
- EventGroupHandle_t xInternalEventGroupHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
+ EventBits_t MPU_xEventGroupSyncImpl( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
- if( ( uxBitsToSet & eventEVENT_BITS_CONTROL_BYTES ) == 0U )
+ EventBits_t MPU_xEventGroupSyncImpl( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
{
- lIndex = ( int32_t ) xEventGroup;
+ EventBits_t xReturn = 0;
+ EventGroupHandle_t xInternalEventGroupHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ if( ( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0U ) &&
+ ( uxBitsToWaitFor != 0U )
+ #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
+ && ( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0U ) ) )
+ #endif
+ )
{
- xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ lIndex = ( int32_t ) xEventGroup;
- if( xCallingTaskIsAuthorizedToAccessEventGroup == pdTRUE )
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalEventGroupHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessEventGroup == pdTRUE )
{
- xReturn = xEventGroupSetBits( xInternalEventGroupHandle, uxBitsToSet );
+ xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalEventGroupHandle != NULL )
+ {
+ xReturn = xEventGroupSync( xInternalEventGroupHandle, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
+ }
}
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSyncImpl( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
-
- EventBits_t MPU_xEventGroupSyncImpl( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
- {
- EventBits_t xReturn = 0;
- EventGroupHandle_t xInternalEventGroupHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessEventGroup = pdFALSE;
-
- if( ( ( uxBitsToWaitFor & eventEVENT_BITS_CONTROL_BYTES ) == 0U ) &&
- ( uxBitsToWaitFor != 0U )
- #if ( ( INCLUDE_xTaskGetSchedulerState == 1 ) || ( configUSE_TIMERS == 1 ) )
- && ( !( ( xTaskGetSchedulerState() == taskSCHEDULER_SUSPENDED ) && ( xTicksToWait != 0U ) ) )
- #endif
- )
- {
- lIndex = ( int32_t ) xEventGroup;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
- {
- xCallingTaskIsAuthorizedToAccessEventGroup = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
-
- if( xCallingTaskIsAuthorizedToAccessEventGroup == pdTRUE )
- {
- xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
-
- if( xInternalEventGroupHandle != NULL )
- {
- xReturn = xEventGroupSync( xInternalEventGroupHandle, uxBitsToSet, uxBitsToWaitFor, xTicksToWait );
- }
- }
- }
- }
-
- return xReturn;
- }
-/*-----------------------------------------------------------*/
-
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumberImpl( void * xEventGroup ) PRIVILEGED_FUNCTION;
@@ -4085,10 +4106,10 @@
return xReturn;
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumberImpl( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) PRIVILEGED_FUNCTION;
@@ -4118,7 +4139,7 @@
}
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
/* Privileged only wrappers for Event Group APIs. These are needed so that
@@ -4126,7 +4147,7 @@
* with all the APIs. */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) )
EventGroupHandle_t MPU_xEventGroupCreate( void ) /* PRIVILEGED_FUNCTION */
{
@@ -4154,10 +4175,10 @@
return xExternalEventGroupHandle;
}
- #endif /* if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) */
+ #endif /* #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) )
EventGroupHandle_t MPU_xEventGroupCreateStatic( StaticEventGroup_t * pxEventGroupBuffer ) /* PRIVILEGED_FUNCTION */
{
@@ -4185,30 +4206,34 @@
return xExternalEventGroupHandle;
}
- #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
+ #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) ) */
/*-----------------------------------------------------------*/
- void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup ) /* PRIVILEGED_FUNCTION */
- {
- EventGroupHandle_t xInternalEventGroupHandle = NULL;
- int32_t lIndex;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- lIndex = ( int32_t ) xEventGroup;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ void MPU_vEventGroupDelete( EventGroupHandle_t xEventGroup ) /* PRIVILEGED_FUNCTION */
{
- xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ EventGroupHandle_t xInternalEventGroupHandle = NULL;
+ int32_t lIndex;
- if( xInternalEventGroupHandle != NULL )
+ lIndex = ( int32_t ) xEventGroup;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- vEventGroupDelete( xInternalEventGroupHandle );
- MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalEventGroupHandle != NULL )
+ {
+ vEventGroupDelete( xInternalEventGroupHandle );
+ MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ }
}
}
- }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) )
BaseType_t MPU_xEventGroupGetStaticBuffer( EventGroupHandle_t xEventGroup,
StaticEventGroup_t ** ppxEventGroupBuffer ) /* PRIVILEGED_FUNCTION */
@@ -4232,10 +4257,10 @@
return xReturn;
}
- #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
+ #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_EVENT_GROUPS == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
BaseType_t MPU_xEventGroupClearBitsFromISR( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToClear ) /* PRIVILEGED_FUNCTION */
@@ -4259,10 +4284,10 @@
return xReturn;
}
- #endif /* #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) )
BaseType_t MPU_xEventGroupSetBitsFromISR( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet,
@@ -4287,309 +4312,345 @@
return xReturn;
}
- #endif /* #if ( ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) && ( INCLUDE_xTimerPendFunctionCall == 1 ) && ( configUSE_TIMERS == 1 ) ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ) /* PRIVILEGED_FUNCTION */
- {
- EventBits_t xReturn = 0;
- EventGroupHandle_t xInternalEventGroupHandle = NULL;
- int32_t lIndex;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- lIndex = ( int32_t ) xEventGroup;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ EventBits_t MPU_xEventGroupGetBitsFromISR( EventGroupHandle_t xEventGroup ) /* PRIVILEGED_FUNCTION */
{
- xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ EventBits_t xReturn = 0;
+ EventGroupHandle_t xInternalEventGroupHandle = NULL;
+ int32_t lIndex;
- if( xInternalEventGroupHandle != NULL )
+ lIndex = ( int32_t ) xEventGroup;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xReturn = xEventGroupGetBitsFromISR( xInternalEventGroupHandle );
+ xInternalEventGroupHandle = MPU_GetEventGroupHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalEventGroupHandle != NULL )
+ {
+ xReturn = xEventGroupGetBitsFromISR( xInternalEventGroupHandle );
+ }
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
/*-----------------------------------------------------------*/
/* MPU wrappers for stream buffer APIs. */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSendImpl( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSendImpl( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
- {
- size_t xReturn = 0;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xIsTxDataBufferReadable = pdFALSE;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ size_t MPU_xStreamBufferSendImpl( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
- if( pvTxData != NULL )
+ size_t MPU_xStreamBufferSendImpl( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
{
- xIsTxDataBufferReadable = xPortIsAuthorizedToAccessBuffer( pvTxData,
- xDataLengthBytes,
- tskMPU_READ_PERMISSION );
+ size_t xReturn = 0;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xIsTxDataBufferReadable = pdFALSE;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xIsTxDataBufferReadable == pdTRUE )
+ if( pvTxData != NULL )
{
- lIndex = ( int32_t ) xStreamBuffer;
+ xIsTxDataBufferReadable = xPortIsAuthorizedToAccessBuffer( pvTxData,
+ xDataLengthBytes,
+ tskMPU_READ_PERMISSION );
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ if( xIsTxDataBufferReadable == pdTRUE )
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ lIndex = ( int32_t ) xStreamBuffer;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferSend( xInternalStreamBufferHandle, pvTxData, xDataLengthBytes, xTicksToWait );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferSend( xInternalStreamBufferHandle, pvTxData, xDataLengthBytes, xTicksToWait );
+ }
}
}
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceiveImpl( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceiveImpl( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
- {
- size_t xReturn = 0;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xIsRxDataBufferWriteable = pdFALSE;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ size_t MPU_xStreamBufferReceiveImpl( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) PRIVILEGED_FUNCTION;
- if( pvRxData != NULL )
+ size_t MPU_xStreamBufferReceiveImpl( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* PRIVILEGED_FUNCTION */
{
- xIsRxDataBufferWriteable = xPortIsAuthorizedToAccessBuffer( pvRxData,
- xBufferLengthBytes,
- tskMPU_WRITE_PERMISSION );
+ size_t xReturn = 0;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xIsRxDataBufferWriteable = pdFALSE;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xIsRxDataBufferWriteable == pdTRUE )
+ if( pvRxData != NULL )
{
- lIndex = ( int32_t ) xStreamBuffer;
+ xIsRxDataBufferWriteable = xPortIsAuthorizedToAccessBuffer( pvRxData,
+ xBufferLengthBytes,
+ tskMPU_WRITE_PERMISSION );
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ if( xIsRxDataBufferWriteable == pdTRUE )
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ lIndex = ( int32_t ) xStreamBuffer;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferReceive( xInternalStreamBufferHandle, pvRxData, xBufferLengthBytes, xTicksToWait );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferReceive( xInternalStreamBufferHandle, pvRxData, xBufferLengthBytes, xTicksToWait );
+ }
}
}
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFullImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFullImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- BaseType_t xReturn = pdFALSE;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ BaseType_t MPU_xStreamBufferIsFullImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ BaseType_t MPU_xStreamBufferIsFullImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ BaseType_t xReturn = pdFALSE;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferIsFull( xInternalStreamBufferHandle );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferIsFull( xInternalStreamBufferHandle );
+ }
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmptyImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmptyImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- BaseType_t xReturn = pdFALSE;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ BaseType_t MPU_xStreamBufferIsEmptyImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ BaseType_t MPU_xStreamBufferIsEmptyImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ BaseType_t xReturn = pdFALSE;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferIsEmpty( xInternalStreamBufferHandle );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferIsEmpty( xInternalStreamBufferHandle );
+ }
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- size_t xReturn = 0;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ size_t MPU_xStreamBufferSpacesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ size_t MPU_xStreamBufferSpacesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ size_t xReturn = 0;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferSpacesAvailable( xInternalStreamBufferHandle );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferSpacesAvailable( xInternalStreamBufferHandle );
+ }
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- size_t xReturn = 0;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ size_t MPU_xStreamBufferBytesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ size_t MPU_xStreamBufferBytesAvailableImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ size_t xReturn = 0;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferBytesAvailable( xInternalStreamBufferHandle );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferBytesAvailable( xInternalStreamBufferHandle );
+ }
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevelImpl( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevelImpl( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* PRIVILEGED_FUNCTION */
- {
- BaseType_t xReturn = pdFALSE;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ BaseType_t MPU_xStreamBufferSetTriggerLevelImpl( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) PRIVILEGED_FUNCTION;
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ BaseType_t MPU_xStreamBufferSetTriggerLevelImpl( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* PRIVILEGED_FUNCTION */
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ BaseType_t xReturn = pdFALSE;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferSetTriggerLevel( xInternalStreamBufferHandle, xTriggerLevel );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferSetTriggerLevel( xInternalStreamBufferHandle, xTriggerLevel );
+ }
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytesImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytesImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- size_t xReturn = 0;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
- BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
+ size_t MPU_xStreamBufferNextMessageLengthBytesImpl( StreamBufferHandle_t xStreamBuffer ) PRIVILEGED_FUNCTION;
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ size_t MPU_xStreamBufferNextMessageLengthBytesImpl( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
{
- xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ size_t xReturn = 0;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
+ BaseType_t xCallingTaskIsAuthorizedToAccessStreamBuffer = pdFALSE;
- if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ xCallingTaskIsAuthorizedToAccessStreamBuffer = xPortIsAuthorizedToAccessKernelObject( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- if( xInternalStreamBufferHandle != NULL )
+ if( xCallingTaskIsAuthorizedToAccessStreamBuffer == pdTRUE )
{
- xReturn = xStreamBufferNextMessageLengthBytes( xInternalStreamBufferHandle );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferNextMessageLengthBytes( xInternalStreamBufferHandle );
+ }
}
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
/* Privileged only wrappers for Stream Buffer APIs. These are needed so that
@@ -4597,7 +4658,7 @@
* with all the APIs. */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) )
StreamBufferHandle_t MPU_xStreamBufferGenericCreate( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
@@ -4649,10 +4710,10 @@
return xExternalStreamBufferHandle;
}
- #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
+ #endif /* #if ( ( configSUPPORT_DYNAMIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) )
StreamBufferHandle_t MPU_xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
@@ -4708,53 +4769,61 @@
return xExternalStreamBufferHandle;
}
- #endif /* configSUPPORT_STATIC_ALLOCATION */
+ #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) ) */
/*-----------------------------------------------------------*/
- void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
- if( xInternalStreamBufferHandle != NULL )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- vStreamBufferDelete( xInternalStreamBufferHandle );
- }
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
- }
- }
-/*-----------------------------------------------------------*/
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ vStreamBufferDelete( xInternalStreamBufferHandle );
+ }
- BaseType_t MPU_xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
- {
- BaseType_t xReturn = pdFALSE;
- 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 = xStreamBufferReset( xInternalStreamBufferHandle );
+ MPU_SetIndexFreeInKernelObjectPool( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
}
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+
+ BaseType_t MPU_xStreamBufferReset( StreamBufferHandle_t xStreamBuffer ) /* PRIVILEGED_FUNCTION */
+ {
+ BaseType_t xReturn = pdFALSE;
+ 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 = xStreamBufferReset( xInternalStreamBufferHandle );
+ }
+ }
+
+ return xReturn;
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
+/*-----------------------------------------------------------*/
+
+ #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) )
BaseType_t MPU_xStreamBufferGetStaticBuffers( StreamBufferHandle_t xStreamBuffers,
uint8_t * ppucStreamBufferStorageArea,
@@ -4779,9 +4848,11 @@
return xReturn;
}
- #endif /* if ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
+ #endif /* #if ( ( configSUPPORT_STATIC_ALLOCATION == 1 ) && ( configUSE_STREAM_BUFFERS == 1 ) ) */
/*-----------------------------------------------------------*/
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer,
const void * pvTxData,
size_t xDataLengthBytes,
@@ -4805,8 +4876,12 @@
return xReturn;
}
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer,
void * pvRxData,
size_t xBufferLengthBytes,
@@ -4830,52 +4905,62 @@
return xReturn;
}
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer,
- BaseType_t * pxHigherPriorityTaskWoken ) /* PRIVILEGED_FUNCTION */
- {
- BaseType_t xReturn = pdFALSE;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ BaseType_t MPU_xStreamBufferSendCompletedFromISR( StreamBufferHandle_t xStreamBuffer,
+ BaseType_t * pxHigherPriorityTaskWoken ) /* PRIVILEGED_FUNCTION */
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ BaseType_t xReturn = pdFALSE;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
- if( xInternalStreamBufferHandle != NULL )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xReturn = xStreamBufferSendCompletedFromISR( xInternalStreamBufferHandle, pxHigherPriorityTaskWoken );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferSendCompletedFromISR( xInternalStreamBufferHandle, pxHigherPriorityTaskWoken );
+ }
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuffer,
- BaseType_t * pxHigherPriorityTaskWoken ) /*PRIVILEGED_FUNCTION */
- {
- BaseType_t xReturn = pdFALSE;
- StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
- int32_t lIndex;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- lIndex = ( int32_t ) xStreamBuffer;
-
- if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
+ BaseType_t MPU_xStreamBufferReceiveCompletedFromISR( StreamBufferHandle_t xStreamBuffer,
+ BaseType_t * pxHigherPriorityTaskWoken ) /*PRIVILEGED_FUNCTION */
{
- xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+ BaseType_t xReturn = pdFALSE;
+ StreamBufferHandle_t xInternalStreamBufferHandle = NULL;
+ int32_t lIndex;
- if( xInternalStreamBufferHandle != NULL )
+ lIndex = ( int32_t ) xStreamBuffer;
+
+ if( IS_EXTERNAL_INDEX_VALID( lIndex ) != pdFALSE )
{
- xReturn = xStreamBufferReceiveCompletedFromISR( xInternalStreamBufferHandle, pxHigherPriorityTaskWoken );
+ xInternalStreamBufferHandle = MPU_GetStreamBufferHandleAtIndex( CONVERT_TO_INTERNAL_INDEX( lIndex ) );
+
+ if( xInternalStreamBufferHandle != NULL )
+ {
+ xReturn = xStreamBufferReceiveCompletedFromISR( xInternalStreamBufferHandle, pxHigherPriorityTaskWoken );
+ }
}
+
+ return xReturn;
}
- return xReturn;
- }
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
@@ -4909,7 +4994,11 @@
( UBaseType_t ) 0, /* SYSTEM_CALL_xTimerGenericCommandFromTask. */
#endif
- ( UBaseType_t ) MPU_xEventGroupWaitBitsImpl, /* SYSTEM_CALL_xEventGroupWaitBits. */
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ ( UBaseType_t ) MPU_xEventGroupWaitBitsImpl, /* SYSTEM_CALL_xEventGroupWaitBits. */
+ #else
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xEventGroupWaitBits. */
+ #endif
/* The system calls above this line take 5 parameters. */
@@ -5104,26 +5193,46 @@
( UBaseType_t ) 0, /* SYSTEM_CALL_xTimerGetExpiryTime. */
#endif
- ( UBaseType_t ) MPU_xEventGroupClearBitsImpl, /* SYSTEM_CALL_xEventGroupClearBits. */
- ( UBaseType_t ) MPU_xEventGroupSetBitsImpl, /* SYSTEM_CALL_xEventGroupSetBits. */
- ( UBaseType_t ) MPU_xEventGroupSyncImpl, /* SYSTEM_CALL_xEventGroupSync. */
+ #if ( configUSE_EVENT_GROUPS == 1 )
+ ( UBaseType_t ) MPU_xEventGroupClearBitsImpl, /* SYSTEM_CALL_xEventGroupClearBits. */
+ ( UBaseType_t ) MPU_xEventGroupSetBitsImpl, /* SYSTEM_CALL_xEventGroupSetBits. */
+ ( UBaseType_t ) MPU_xEventGroupSyncImpl, /* SYSTEM_CALL_xEventGroupSync. */
- #if ( configUSE_TRACE_FACILITY == 1 )
- ( UBaseType_t ) MPU_uxEventGroupGetNumberImpl, /* SYSTEM_CALL_uxEventGroupGetNumber. */
- ( UBaseType_t ) MPU_vEventGroupSetNumberImpl, /* SYSTEM_CALL_vEventGroupSetNumber. */
+ #if ( configUSE_TRACE_FACILITY == 1 )
+ ( UBaseType_t ) MPU_uxEventGroupGetNumberImpl, /* SYSTEM_CALL_uxEventGroupGetNumber. */
+ ( UBaseType_t ) MPU_vEventGroupSetNumberImpl, /* SYSTEM_CALL_vEventGroupSetNumber. */
+ #else
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_uxEventGroupGetNumber. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_vEventGroupSetNumber. */
+ #endif
#else
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xEventGroupClearBits. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xEventGroupSetBits. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xEventGroupSync. */
( UBaseType_t ) 0, /* SYSTEM_CALL_uxEventGroupGetNumber. */
( UBaseType_t ) 0, /* SYSTEM_CALL_vEventGroupSetNumber. */
#endif
- ( UBaseType_t ) MPU_xStreamBufferSendImpl, /* SYSTEM_CALL_xStreamBufferSend. */
- ( UBaseType_t ) MPU_xStreamBufferReceiveImpl, /* SYSTEM_CALL_xStreamBufferReceive. */
- ( UBaseType_t ) MPU_xStreamBufferIsFullImpl, /* SYSTEM_CALL_xStreamBufferIsFull. */
- ( UBaseType_t ) MPU_xStreamBufferIsEmptyImpl, /* SYSTEM_CALL_xStreamBufferIsEmpty. */
- ( UBaseType_t ) MPU_xStreamBufferSpacesAvailableImpl, /* SYSTEM_CALL_xStreamBufferSpacesAvailable. */
- ( UBaseType_t ) MPU_xStreamBufferBytesAvailableImpl, /* SYSTEM_CALL_xStreamBufferBytesAvailable. */
- ( UBaseType_t ) MPU_xStreamBufferSetTriggerLevelImpl, /* SYSTEM_CALL_xStreamBufferSetTriggerLevel. */
- ( UBaseType_t ) MPU_xStreamBufferNextMessageLengthBytesImpl /* SYSTEM_CALL_xStreamBufferNextMessageLengthBytes. */
+ #if ( configUSE_STREAM_BUFFERS == 1 )
+ ( UBaseType_t ) MPU_xStreamBufferSendImpl, /* SYSTEM_CALL_xStreamBufferSend. */
+ ( UBaseType_t ) MPU_xStreamBufferReceiveImpl, /* SYSTEM_CALL_xStreamBufferReceive. */
+ ( UBaseType_t ) MPU_xStreamBufferIsFullImpl, /* SYSTEM_CALL_xStreamBufferIsFull. */
+ ( UBaseType_t ) MPU_xStreamBufferIsEmptyImpl, /* SYSTEM_CALL_xStreamBufferIsEmpty. */
+ ( UBaseType_t ) MPU_xStreamBufferSpacesAvailableImpl, /* SYSTEM_CALL_xStreamBufferSpacesAvailable. */
+ ( UBaseType_t ) MPU_xStreamBufferBytesAvailableImpl, /* SYSTEM_CALL_xStreamBufferBytesAvailable. */
+ ( UBaseType_t ) MPU_xStreamBufferSetTriggerLevelImpl, /* SYSTEM_CALL_xStreamBufferSetTriggerLevel. */
+ ( UBaseType_t ) MPU_xStreamBufferNextMessageLengthBytesImpl /* SYSTEM_CALL_xStreamBufferNextMessageLengthBytes. */
+ #else
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferSend. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferReceive. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferIsFull. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferIsEmpty. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferSpacesAvailable. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferBytesAvailable. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferSetTriggerLevel. */
+ ( UBaseType_t ) 0, /* SYSTEM_CALL_xStreamBufferNextMessageLengthBytes. */
+ #endif
+
};
/*-----------------------------------------------------------*/
diff --git a/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c
index fb167a6..1fb6789 100644
--- a/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM23/non_secure/mpu_wrappers_v2_asm.c
@@ -1690,117 +1690,133 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1826,10 +1842,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1857,221 +1873,253 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c
index fb167a6..1fb6789 100644
--- a/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM23_NTZ/non_secure/mpu_wrappers_v2_asm.c
@@ -1690,117 +1690,133 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1826,10 +1842,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1857,221 +1873,253 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0, r1} \n"
- " mrs r0, control \n"
- " movs r1, #1 \n"
- " tst r0, r1 \n"
- " pop {r0, r1} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0, r1} \n"
+ " mrs r0, control \n"
+ " movs r1, #1 \n"
+ " tst r0, r1 \n"
+ " pop {r0, r1} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..6642c9e 100644
--- a/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM33/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,129 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1781,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1811,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..6642c9e 100644
--- a/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM33_NTZ/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,129 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1781,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1811,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..02229d9 100644
--- a/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM35P/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,130 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1782,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1812,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..6642c9e 100644
--- a/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM35P_NTZ/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,129 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1781,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1811,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c
index feb3e34..71bb660 100644
--- a/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM3_MPU/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,133 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1785,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1815,253 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* configUSE_MPU_WRAPPERS_V1 == 0 */
diff --git a/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
index feb3e34..71bb660 100644
--- a/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,133 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1785,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1815,253 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " pop {r0} \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " pop {r0} \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* configUSE_MPU_WRAPPERS_V1 == 0 */
diff --git a/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..02229d9 100644
--- a/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM55/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,130 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1782,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1812,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..6642c9e 100644
--- a/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM55_NTZ/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,129 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1781,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1811,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..02229d9 100644
--- a/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM85/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,130 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
+
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1782,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1812,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c b/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c
index 4f66448..6642c9e 100644
--- a/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c
+++ b/portable/GCC/ARM_CM85_NTZ/non_secure/mpu_wrappers_v2_asm.c
@@ -1634,113 +1634,129 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupWaitBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupWaitBits_Unpriv \n"
- " MPU_xEventGroupWaitBits_Priv: \n"
- " b MPU_xEventGroupWaitBitsImpl \n"
- " MPU_xEventGroupWaitBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupWaitBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupWaitBits_Unpriv \n"
+ " MPU_xEventGroupWaitBits_Priv: \n"
+ " b MPU_xEventGroupWaitBitsImpl \n"
+ " MPU_xEventGroupWaitBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupWaitBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupClearBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupClearBits_Unpriv \n"
- " MPU_xEventGroupClearBits_Priv: \n"
- " b MPU_xEventGroupClearBitsImpl \n"
- " MPU_xEventGroupClearBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToClear ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupClearBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupClearBits_Unpriv \n"
+ " MPU_xEventGroupClearBits_Priv: \n"
+ " b MPU_xEventGroupClearBitsImpl \n"
+ " MPU_xEventGroupClearBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupClearBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSetBitsImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSetBits_Unpriv \n"
- " MPU_xEventGroupSetBits_Priv: \n"
- " b MPU_xEventGroupSetBitsImpl \n"
- " MPU_xEventGroupSetBits_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSetBitsImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSetBits_Unpriv \n"
+ " MPU_xEventGroupSetBits_Priv: \n"
+ " b MPU_xEventGroupSetBitsImpl \n"
+ " MPU_xEventGroupSetBits_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSetBits ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_EVENT_GROUPS == 1 )
- EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
- const EventBits_t uxBitsToSet,
- const EventBits_t uxBitsToWaitFor,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xEventGroupSyncImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xEventGroupSync_Unpriv \n"
- " MPU_xEventGroupSync_Priv: \n"
- " b MPU_xEventGroupSyncImpl \n"
- " MPU_xEventGroupSync_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
- );
- }
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
+ const EventBits_t uxBitsToSet,
+ const EventBits_t uxBitsToWaitFor,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xEventGroupSyncImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xEventGroupSync_Unpriv \n"
+ " MPU_xEventGroupSync_Priv: \n"
+ " b MPU_xEventGroupSyncImpl \n"
+ " MPU_xEventGroupSync_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xEventGroupSync ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1765,10 +1781,10 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- #if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
@@ -1795,213 +1811,245 @@
);
}
- #endif /*( configUSE_TRACE_FACILITY == 1 )*/
+ #endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
- const void * pvTxData,
- size_t xDataLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSendImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSend_Unpriv \n"
- " MPU_xStreamBufferSend_Priv: \n"
- " b MPU_xStreamBufferSendImpl \n"
- " MPU_xStreamBufferSend_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
+ const void * pvTxData,
+ size_t xDataLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSendImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSend_Unpriv \n"
+ " MPU_xStreamBufferSend_Priv: \n"
+ " b MPU_xStreamBufferSendImpl \n"
+ " MPU_xStreamBufferSend_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSend ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
- void * pvRxData,
- size_t xBufferLengthBytes,
- TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferReceiveImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferReceive_Unpriv \n"
- " MPU_xStreamBufferReceive_Priv: \n"
- " b MPU_xStreamBufferReceiveImpl \n"
- " MPU_xStreamBufferReceive_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
+ void * pvRxData,
+ size_t xBufferLengthBytes,
+ TickType_t xTicksToWait ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferReceiveImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferReceive_Unpriv \n"
+ " MPU_xStreamBufferReceive_Priv: \n"
+ " b MPU_xStreamBufferReceiveImpl \n"
+ " MPU_xStreamBufferReceive_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferReceive ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsFullImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsFull_Unpriv \n"
- " MPU_xStreamBufferIsFull_Priv: \n"
- " b MPU_xStreamBufferIsFullImpl \n"
- " MPU_xStreamBufferIsFull_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsFullImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsFull_Unpriv \n"
+ " MPU_xStreamBufferIsFull_Priv: \n"
+ " b MPU_xStreamBufferIsFullImpl \n"
+ " MPU_xStreamBufferIsFull_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsFull ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferIsEmptyImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
- " MPU_xStreamBufferIsEmpty_Priv: \n"
- " b MPU_xStreamBufferIsEmptyImpl \n"
- " MPU_xStreamBufferIsEmpty_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferIsEmptyImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferIsEmpty_Unpriv \n"
+ " MPU_xStreamBufferIsEmpty_Priv: \n"
+ " b MPU_xStreamBufferIsEmptyImpl \n"
+ " MPU_xStreamBufferIsEmpty_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferIsEmpty ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
- " MPU_xStreamBufferSpacesAvailable_Priv: \n"
- " b MPU_xStreamBufferSpacesAvailableImpl \n"
- " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSpacesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSpacesAvailable_Unpriv \n"
+ " MPU_xStreamBufferSpacesAvailable_Priv: \n"
+ " b MPU_xStreamBufferSpacesAvailableImpl \n"
+ " MPU_xStreamBufferSpacesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSpacesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferBytesAvailableImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
- " MPU_xStreamBufferBytesAvailable_Priv: \n"
- " b MPU_xStreamBufferBytesAvailableImpl \n"
- " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferBytesAvailableImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferBytesAvailable_Unpriv \n"
+ " MPU_xStreamBufferBytesAvailable_Priv: \n"
+ " b MPU_xStreamBufferBytesAvailableImpl \n"
+ " MPU_xStreamBufferBytesAvailable_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferBytesAvailable ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
- size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
- " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
- " b MPU_xStreamBufferSetTriggerLevelImpl \n"
- " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
- );
- }
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
+ size_t xTriggerLevel ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferSetTriggerLevel_Unpriv \n"
+ " MPU_xStreamBufferSetTriggerLevel_Priv: \n"
+ " b MPU_xStreamBufferSetTriggerLevelImpl \n"
+ " MPU_xStreamBufferSetTriggerLevel_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferSetTriggerLevel ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+ #if ( configUSE_STREAM_BUFFERS == 1 )
- size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
- {
- __asm volatile
- (
- " .syntax unified \n"
- " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " \n"
- " push {r0} \n"
- " mrs r0, control \n"
- " tst r0, #1 \n"
- " pop {r0} \n"
- " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
- " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
- " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
- " svc %0 \n"
- " \n"
- : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
- );
- }
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) __attribute__( ( naked ) ) FREERTOS_SYSTEM_CALL;
+
+ size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* __attribute__ (( naked )) FREERTOS_SYSTEM_CALL */
+ {
+ __asm volatile
+ (
+ " .syntax unified \n"
+ " .extern MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " \n"
+ " push {r0} \n"
+ " mrs r0, control \n"
+ " tst r0, #1 \n"
+ " pop {r0} \n"
+ " bne MPU_xStreamBufferNextMessageLengthBytes_Unpriv \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Priv: \n"
+ " b MPU_xStreamBufferNextMessageLengthBytesImpl \n"
+ " MPU_xStreamBufferNextMessageLengthBytes_Unpriv: \n"
+ " svc %0 \n"
+ " \n"
+ : : "i" ( SYSTEM_CALL_xStreamBufferNextMessageLengthBytes ) : "memory"
+ );
+ }
+
+ #endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* ( configENABLE_MPU == 1 ) && ( configUSE_MPU_WRAPPERS_V1 == 0 ) */
diff --git a/portable/GCC/ARM_CRx_MPU/mpu_wrappers_v2_asm.S b/portable/GCC/ARM_CRx_MPU/mpu_wrappers_v2_asm.S
index 8d0f769..142486a 100644
--- a/portable/GCC/ARM_CRx_MPU/mpu_wrappers_v2_asm.S
+++ b/portable/GCC/ARM_CRx_MPU/mpu_wrappers_v2_asm.S
@@ -201,111 +201,119 @@
/* ----------------------------------------------------------------------------------- */
-.extern MPU_xEventGroupWaitBitsImpl
-.align 4
-.global MPU_xEventGroupWaitBitsEntry
-.type MPU_xEventGroupWaitBitsEntry, function
-MPU_xEventGroupWaitBitsEntry:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupWaitBits, MPU_xEventGroupWaitBitsImpl
+#if ( configUSE_EVENT_GROUPS == 1 )
+
+ .extern MPU_xEventGroupWaitBitsImpl
+ .align 4
+ .global MPU_xEventGroupWaitBitsEntry
+ .type MPU_xEventGroupWaitBitsEntry, function
+ MPU_xEventGroupWaitBitsEntry:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupWaitBits, MPU_xEventGroupWaitBitsImpl
+
+ /* ----------------------------------------------------------------------------------- */
+
+ .extern MPU_xEventGroupClearBitsImpl
+ .align 4
+ .global MPU_xEventGroupClearBits
+ .type MPU_xEventGroupClearBits, function
+ MPU_xEventGroupClearBits:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupClearBits, MPU_xEventGroupClearBitsImpl
+
+ /* ----------------------------------------------------------------------------------- */
+
+ .extern MPU_xEventGroupSetBitsImpl
+ .align 4
+ .global MPU_xEventGroupSetBits
+ .type MPU_xEventGroupSetBits, function
+ MPU_xEventGroupSetBits:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupSetBits, MPU_xEventGroupSetBitsImpl
+
+ /* ----------------------------------------------------------------------------------- */
+
+ .extern MPU_xEventGroupSyncImpl
+ .align 4
+ .global MPU_xEventGroupSync
+ .type MPU_xEventGroupSync, function
+ MPU_xEventGroupSync:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupSync, MPU_xEventGroupSyncImpl
+
+#endif /* if ( configUSE_EVENT_GROUPS == 1 ) */
/* ----------------------------------------------------------------------------------- */
-.extern MPU_xEventGroupClearBitsImpl
-.align 4
-.global MPU_xEventGroupClearBits
-.type MPU_xEventGroupClearBits, function
-MPU_xEventGroupClearBits:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupClearBits, MPU_xEventGroupClearBitsImpl
+#if ( configUSE_STREAM_BUFFERS == 1 )
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferSendImpl
+ .align 4
+ .global MPU_xStreamBufferSend
+ .type MPU_xStreamBufferSend, function
+ MPU_xStreamBufferSend:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSend, MPU_xStreamBufferSendImpl
-.extern MPU_xEventGroupSetBitsImpl
-.align 4
-.global MPU_xEventGroupSetBits
-.type MPU_xEventGroupSetBits, function
-MPU_xEventGroupSetBits:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupSetBits, MPU_xEventGroupSetBitsImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferReceiveImpl
+ .align 4
+ .global MPU_xStreamBufferReceive
+ .type MPU_xStreamBufferReceive, function
+ MPU_xStreamBufferReceive:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferReceive, MPU_xStreamBufferReceiveImpl
-.extern MPU_xEventGroupSyncImpl
-.align 4
-.global MPU_xEventGroupSync
-.type MPU_xEventGroupSync, function
-MPU_xEventGroupSync:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xEventGroupSync, MPU_xEventGroupSyncImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferIsFullImpl
+ .align 4
+ .global MPU_xStreamBufferIsFull
+ .type MPU_xStreamBufferIsFull, function
+ MPU_xStreamBufferIsFull:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferIsFull, MPU_xStreamBufferIsFullImpl
-.extern MPU_xStreamBufferSendImpl
-.align 4
-.global MPU_xStreamBufferSend
-.type MPU_xStreamBufferSend, function
-MPU_xStreamBufferSend:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSend, MPU_xStreamBufferSendImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferIsEmptyImpl
+ .align 4
+ .global MPU_xStreamBufferIsEmpty
+ .type MPU_xStreamBufferIsEmpty, function
+ MPU_xStreamBufferIsEmpty:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferIsEmpty, MPU_xStreamBufferIsEmptyImpl
-.extern MPU_xStreamBufferReceiveImpl
-.align 4
-.global MPU_xStreamBufferReceive
-.type MPU_xStreamBufferReceive, function
-MPU_xStreamBufferReceive:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferReceive, MPU_xStreamBufferReceiveImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferSpacesAvailableImpl
+ .align 4
+ .global MPU_xStreamBufferSpacesAvailable
+ .type MPU_xStreamBufferSpacesAvailable, function
+ MPU_xStreamBufferSpacesAvailable:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSpacesAvailable, MPU_xStreamBufferSpacesAvailableImpl
-.extern MPU_xStreamBufferIsFullImpl
-.align 4
-.global MPU_xStreamBufferIsFull
-.type MPU_xStreamBufferIsFull, function
-MPU_xStreamBufferIsFull:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferIsFull, MPU_xStreamBufferIsFullImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferBytesAvailableImpl
+ .align 4
+ .global MPU_xStreamBufferBytesAvailable
+ .type MPU_xStreamBufferBytesAvailable, function
+ MPU_xStreamBufferBytesAvailable:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferBytesAvailable, MPU_xStreamBufferBytesAvailableImpl
-.extern MPU_xStreamBufferIsEmptyImpl
-.align 4
-.global MPU_xStreamBufferIsEmpty
-.type MPU_xStreamBufferIsEmpty, function
-MPU_xStreamBufferIsEmpty:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferIsEmpty, MPU_xStreamBufferIsEmptyImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferSetTriggerLevelImpl
+ .align 4
+ .global MPU_xStreamBufferSetTriggerLevel
+ .type MPU_xStreamBufferSetTriggerLevel, function
+ MPU_xStreamBufferSetTriggerLevel:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSetTriggerLevel, MPU_xStreamBufferSetTriggerLevelImpl
-.extern MPU_xStreamBufferSpacesAvailableImpl
-.align 4
-.global MPU_xStreamBufferSpacesAvailable
-.type MPU_xStreamBufferSpacesAvailable, function
-MPU_xStreamBufferSpacesAvailable:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSpacesAvailable, MPU_xStreamBufferSpacesAvailableImpl
+ /* ----------------------------------------------------------------------------------- */
-/* ----------------------------------------------------------------------------------- */
+ .extern MPU_xStreamBufferNextMessageLengthBytesImpl
+ .align 4
+ .global MPU_xStreamBufferNextMessageLengthBytes
+ .type MPU_xStreamBufferNextMessageLengthBytes, function
+ MPU_xStreamBufferNextMessageLengthBytes:
+ INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferNextMessageLengthBytes, MPU_xStreamBufferNextMessageLengthBytesImpl
-.extern MPU_xStreamBufferBytesAvailableImpl
-.align 4
-.global MPU_xStreamBufferBytesAvailable
-.type MPU_xStreamBufferBytesAvailable, function
-MPU_xStreamBufferBytesAvailable:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferBytesAvailable, MPU_xStreamBufferBytesAvailableImpl
-
-/* ----------------------------------------------------------------------------------- */
-
-.extern MPU_xStreamBufferSetTriggerLevelImpl
-.align 4
-.global MPU_xStreamBufferSetTriggerLevel
-.type MPU_xStreamBufferSetTriggerLevel, function
-MPU_xStreamBufferSetTriggerLevel:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferSetTriggerLevel, MPU_xStreamBufferSetTriggerLevelImpl
-
-/* ----------------------------------------------------------------------------------- */
-
-.extern MPU_xStreamBufferNextMessageLengthBytesImpl
-.align 4
-.global MPU_xStreamBufferNextMessageLengthBytes
-.type MPU_xStreamBufferNextMessageLengthBytes, function
-MPU_xStreamBufferNextMessageLengthBytes:
- INVOKE_SYSTEM_CALL #SYSTEM_CALL_xStreamBufferNextMessageLengthBytes, MPU_xStreamBufferNextMessageLengthBytesImpl
+#endif /* if ( configUSE_STREAM_BUFFERS == 1 ) */
/* ----------------------------------------------------------------------------------- */
@@ -392,8 +400,11 @@
MPU_uxTaskGetSystemState:
INVOKE_SYSTEM_CALL #SYSTEM_CALL_uxTaskGetSystemState, MPU_uxTaskGetSystemStateImpl
- /* ------------------------------------------------------------------------------- */
+#endif /* if ( configUSE_TRACE_FACILITY == 1 ) */
+/* ------------------------------------------------------------------------------- */
+
+#if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
.extern MPU_uxEventGroupGetNumberImpl
.align 4
.global MPU_uxEventGroupGetNumber
@@ -403,6 +414,8 @@
/* ------------------------------------------------------------------------------- */
+
+
.extern MPU_vEventGroupSetNumberImpl
.align 4
.global MPU_vEventGroupSetNumber
@@ -412,7 +425,7 @@
/* ------------------------------------------------------------------------------- */
-#endif /* if ( configUSE_TRACE_FACILITY == 1 ) */
+#endif /* if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/* ------------------------------------------------------------------------------- */
diff --git a/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c b/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
index 3a41d8d..82dd5f4 100644
--- a/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
+++ b/portable/RVDS/ARM_CM4_MPU/mpu_wrappers_v2_asm.c
@@ -1354,6 +1354,8 @@
#endif /* if ( configUSE_TIMERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_EVENT_GROUPS == 1 )
+
EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) FREERTOS_SYSTEM_CALL;
__asm EventBits_t MPU_xEventGroupWaitBitsEntry( const xEventGroupWaitBitsParams_t * pxParams ) /* FREERTOS_SYSTEM_CALL */
@@ -1371,8 +1373,12 @@
MPU_xEventGroupWaitBits_Unpriv
svc #SYSTEM_CALL_xEventGroupWaitBits
}
+
+#endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_EVENT_GROUPS == 1 )
+
EventBits_t MPU_xEventGroupClearBits( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToClear ) FREERTOS_SYSTEM_CALL;
@@ -1392,8 +1398,12 @@
MPU_xEventGroupClearBits_Unpriv
svc #SYSTEM_CALL_xEventGroupClearBits
}
+
+#endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_EVENT_GROUPS == 1 )
+
EventBits_t MPU_xEventGroupSetBits( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet ) FREERTOS_SYSTEM_CALL;
@@ -1413,8 +1423,12 @@
MPU_xEventGroupSetBits_Unpriv
svc #SYSTEM_CALL_xEventGroupSetBits
}
+
+#endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_EVENT_GROUPS == 1 )
+
EventBits_t MPU_xEventGroupSync( EventGroupHandle_t xEventGroup,
const EventBits_t uxBitsToSet,
const EventBits_t uxBitsToWaitFor,
@@ -1438,9 +1452,11 @@
MPU_xEventGroupSync_Unpriv
svc #SYSTEM_CALL_xEventGroupSync
}
+
+#endif /* #if ( configUSE_EVENT_GROUPS == 1 ) */
/*-----------------------------------------------------------*/
-#if ( configUSE_TRACE_FACILITY == 1 )
+#if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
UBaseType_t MPU_uxEventGroupGetNumber( void * xEventGroup ) FREERTOS_SYSTEM_CALL;
@@ -1460,10 +1476,10 @@
svc #SYSTEM_CALL_uxEventGroupGetNumber
}
-#endif /*( configUSE_TRACE_FACILITY == 1 )*/
+#endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
-#if ( configUSE_TRACE_FACILITY == 1 )
+#if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) )
void MPU_vEventGroupSetNumber( void * xEventGroup,
UBaseType_t uxEventGroupNumber ) FREERTOS_SYSTEM_CALL;
@@ -1485,9 +1501,11 @@
svc #SYSTEM_CALL_vEventGroupSetNumber
}
-#endif /*( configUSE_TRACE_FACILITY == 1 )*/
+#endif /* #if ( ( configUSE_EVENT_GROUPS == 1 ) && ( configUSE_TRACE_FACILITY == 1 ) ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer,
const void * pvTxData,
size_t xDataLengthBytes,
@@ -1511,8 +1529,12 @@
MPU_xStreamBufferSend_Unpriv
svc #SYSTEM_CALL_xStreamBufferSend
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer,
void * pvRxData,
size_t xBufferLengthBytes,
@@ -1536,8 +1558,12 @@
MPU_xStreamBufferReceive_Unpriv
svc #SYSTEM_CALL_xStreamBufferReceive
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
__asm BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
@@ -1555,8 +1581,12 @@
MPU_xStreamBufferIsFull_Unpriv
svc #SYSTEM_CALL_xStreamBufferIsFull
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
__asm BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
@@ -1574,8 +1604,12 @@
MPU_xStreamBufferIsEmpty_Unpriv
svc #SYSTEM_CALL_xStreamBufferIsEmpty
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
__asm size_t MPU_xStreamBufferSpacesAvailable( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
@@ -1593,8 +1627,12 @@
MPU_xStreamBufferSpacesAvailable_Unpriv
svc #SYSTEM_CALL_xStreamBufferSpacesAvailable
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
__asm size_t MPU_xStreamBufferBytesAvailable( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
@@ -1612,8 +1650,12 @@
MPU_xStreamBufferBytesAvailable_Unpriv
svc #SYSTEM_CALL_xStreamBufferBytesAvailable
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
BaseType_t MPU_xStreamBufferSetTriggerLevel( StreamBufferHandle_t xStreamBuffer,
size_t xTriggerLevel ) FREERTOS_SYSTEM_CALL;
@@ -1633,8 +1675,12 @@
MPU_xStreamBufferSetTriggerLevel_Unpriv
svc #SYSTEM_CALL_xStreamBufferSetTriggerLevel
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) FREERTOS_SYSTEM_CALL;
__asm size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer ) /* FREERTOS_SYSTEM_CALL */
@@ -1652,6 +1698,8 @@
MPU_xStreamBufferNextMessageLengthBytes_Unpriv
svc #SYSTEM_CALL_xStreamBufferNextMessageLengthBytes
}
+
+#endif /* #if ( configUSE_STREAM_BUFFERS == 1 ) */
/*-----------------------------------------------------------*/
#endif /* configUSE_MPU_WRAPPERS_V1 == 0 */
diff --git a/stream_buffer.c b/stream_buffer.c
index 2c357c6..44354fb 100644
--- a/stream_buffer.c
+++ b/stream_buffer.c
@@ -52,11 +52,17 @@
* correct privileged Vs unprivileged linkage and placement. */
#undef MPU_WRAPPERS_INCLUDED_FROM_API_FILE
+/* This entire source file will be skipped if the application is not configured
+ * to include stream buffer functionality. This #if is closed at the very bottom
+ * of this file. If you want to include stream buffers then ensure
+ * configUSE_STREAM_BUFFERS is set to 1 in FreeRTOSConfig.h. */
+#if ( configUSE_STREAM_BUFFERS == 1 )
+
/* If the user has not provided application specific Rx notification macros,
* or #defined the notification macros away, then provide default implementations
* that uses task notifications. */
-#ifndef sbRECEIVE_COMPLETED
- #define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
+ #ifndef sbRECEIVE_COMPLETED
+ #define sbRECEIVE_COMPLETED( pxStreamBuffer ) \
do \
{ \
vTaskSuspendAll(); \
@@ -72,13 +78,13 @@
} \
( void ) xTaskResumeAll(); \
} while( 0 )
-#endif /* sbRECEIVE_COMPLETED */
+ #endif /* sbRECEIVE_COMPLETED */
/* If user has provided a per-instance receive complete callback, then
* invoke the callback else use the receive complete macro which is provided by default for all instances.
*/
-#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
- #define prvRECEIVE_COMPLETED( pxStreamBuffer ) \
+ #if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
+ #define prvRECEIVE_COMPLETED( pxStreamBuffer ) \
do { \
if( ( pxStreamBuffer )->pxReceiveCompletedCallback != NULL ) \
{ \
@@ -89,13 +95,13 @@
sbRECEIVE_COMPLETED( ( pxStreamBuffer ) ); \
} \
} while( 0 )
-#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
- #define prvRECEIVE_COMPLETED( pxStreamBuffer ) sbRECEIVE_COMPLETED( ( pxStreamBuffer ) )
-#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #define prvRECEIVE_COMPLETED( pxStreamBuffer ) sbRECEIVE_COMPLETED( ( pxStreamBuffer ) )
+ #endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
-#ifndef sbRECEIVE_COMPLETED_FROM_ISR
- #define sbRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
- pxHigherPriorityTaskWoken ) \
+ #ifndef sbRECEIVE_COMPLETED_FROM_ISR
+ #define sbRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
+ pxHigherPriorityTaskWoken ) \
do { \
UBaseType_t uxSavedInterruptStatus; \
\
@@ -113,11 +119,11 @@
} \
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus ); \
} while( 0 )
-#endif /* sbRECEIVE_COMPLETED_FROM_ISR */
+ #endif /* sbRECEIVE_COMPLETED_FROM_ISR */
-#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
- #define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
- pxHigherPriorityTaskWoken ) \
+ #if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
+ #define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, \
+ pxHigherPriorityTaskWoken ) \
do { \
if( ( pxStreamBuffer )->pxReceiveCompletedCallback != NULL ) \
{ \
@@ -128,17 +134,17 @@
sbRECEIVE_COMPLETED_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) ); \
} \
} while( 0 )
-#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
- #define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
+ #else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #define prvRECEIVE_COMPLETED_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
sbRECEIVE_COMPLETED_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) )
-#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
/* If the user has not provided an application specific Tx notification macro,
* or #defined the notification macro away, then provide a default
* implementation that uses task notifications.
*/
-#ifndef sbSEND_COMPLETED
- #define sbSEND_COMPLETED( pxStreamBuffer ) \
+ #ifndef sbSEND_COMPLETED
+ #define sbSEND_COMPLETED( pxStreamBuffer ) \
vTaskSuspendAll(); \
{ \
if( ( pxStreamBuffer )->xTaskWaitingToReceive != NULL ) \
@@ -151,13 +157,13 @@
} \
} \
( void ) xTaskResumeAll()
-#endif /* sbSEND_COMPLETED */
+ #endif /* sbSEND_COMPLETED */
/* If user has provided a per-instance send completed callback, then
* invoke the callback else use the send complete macro which is provided by default for all instances.
*/
-#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
- #define prvSEND_COMPLETED( pxStreamBuffer ) \
+ #if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
+ #define prvSEND_COMPLETED( pxStreamBuffer ) \
do { \
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
{ \
@@ -168,13 +174,13 @@
sbSEND_COMPLETED( ( pxStreamBuffer ) ); \
} \
} while( 0 )
-#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
- #define prvSEND_COMPLETED( pxStreamBuffer ) sbSEND_COMPLETED( ( pxStreamBuffer ) )
-#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #define prvSEND_COMPLETED( pxStreamBuffer ) sbSEND_COMPLETED( ( pxStreamBuffer ) )
+ #endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
-#ifndef sbSEND_COMPLETE_FROM_ISR
- #define sbSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
+ #ifndef sbSEND_COMPLETE_FROM_ISR
+ #define sbSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
do { \
UBaseType_t uxSavedInterruptStatus; \
\
@@ -192,11 +198,11 @@
} \
taskEXIT_CRITICAL_FROM_ISR( uxSavedInterruptStatus ); \
} while( 0 )
-#endif /* sbSEND_COMPLETE_FROM_ISR */
+ #endif /* sbSEND_COMPLETE_FROM_ISR */
-#if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
- #define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
+ #if ( configUSE_SB_COMPLETED_CALLBACK == 1 )
+ #define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
do { \
if( ( pxStreamBuffer )->pxSendCompletedCallback != NULL ) \
{ \
@@ -207,17 +213,17 @@
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) ); \
} \
} while( 0 )
-#else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
- #define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
+ #else /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #define prvSEND_COMPLETE_FROM_ISR( pxStreamBuffer, pxHigherPriorityTaskWoken ) \
sbSEND_COMPLETE_FROM_ISR( ( pxStreamBuffer ), ( pxHigherPriorityTaskWoken ) )
-#endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
+ #endif /* if ( configUSE_SB_COMPLETED_CALLBACK == 1 ) */
/* The number of bytes used to hold the length of a message in the buffer. */
-#define sbBYTES_TO_STORE_MESSAGE_LENGTH ( sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) )
+ #define sbBYTES_TO_STORE_MESSAGE_LENGTH ( sizeof( configMESSAGE_BUFFER_LENGTH_TYPE ) )
/* Bits stored in the ucFlags field of the stream buffer. */
-#define sbFLAGS_IS_MESSAGE_BUFFER ( ( uint8_t ) 1 ) /* Set if the stream buffer was created as a message buffer, in which case it holds discrete messages rather than a stream. */
-#define sbFLAGS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 2 ) /* Set if the stream buffer was created using statically allocated memory. */
+ #define sbFLAGS_IS_MESSAGE_BUFFER ( ( uint8_t ) 1 ) /* Set if the stream buffer was created as a message buffer, in which case it holds discrete messages rather than a stream. */
+ #define sbFLAGS_IS_STATICALLY_ALLOCATED ( ( uint8_t ) 2 ) /* Set if the stream buffer was created using statically allocated memory. */
/*-----------------------------------------------------------*/
@@ -320,7 +326,7 @@
StreamBufferCallbackFunction_t pxReceiveCompletedCallback ) PRIVILEGED_FUNCTION;
/*-----------------------------------------------------------*/
-#if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
+ #if ( configSUPPORT_DYNAMIC_ALLOCATION == 1 )
StreamBufferHandle_t xStreamBufferGenericCreate( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
BaseType_t xIsMessageBuffer,
@@ -406,10 +412,10 @@
/* coverity[misra_c_2012_rule_11_5_violation] */
return ( StreamBufferHandle_t ) pvAllocatedMemory;
}
-#endif /* configSUPPORT_DYNAMIC_ALLOCATION */
+ #endif /* configSUPPORT_DYNAMIC_ALLOCATION */
/*-----------------------------------------------------------*/
-#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
StreamBufferHandle_t xStreamBufferGenericCreateStatic( size_t xBufferSizeBytes,
size_t xTriggerLevelBytes,
@@ -497,10 +503,10 @@
return xReturn;
}
-#endif /* ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
+ #endif /* ( configSUPPORT_STATIC_ALLOCATION == 1 ) */
/*-----------------------------------------------------------*/
-#if ( configSUPPORT_STATIC_ALLOCATION == 1 )
+ #if ( configSUPPORT_STATIC_ALLOCATION == 1 )
BaseType_t xStreamBufferGetStaticBuffers( StreamBufferHandle_t xStreamBuffer,
uint8_t ** ppucStreamBufferStorageArea,
StaticStreamBuffer_t ** ppxStaticStreamBuffer )
@@ -532,7 +538,7 @@
return xReturn;
}
-#endif /* configSUPPORT_STATIC_ALLOCATION */
+ #endif /* configSUPPORT_STATIC_ALLOCATION */
/*-----------------------------------------------------------*/
void vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer )
@@ -1461,7 +1467,7 @@
static size_t prvBytesInBuffer( const StreamBuffer_t * const pxStreamBuffer )
{
-/* Returns the distance between xTail and xHead. */
+ /* Returns the distance between xTail and xHead. */
size_t xCount;
xCount = pxStreamBuffer->xLength + pxStreamBuffer->xHead;
@@ -1496,7 +1502,7 @@
/* The value written just has to be identifiable when looking at the
* memory. Don't use 0xA5 as that is the stack fill value and could
* result in confusion as to what is actually being observed. */
- #define STREAM_BUFFER_BUFFER_WRITE_VALUE ( 0x55 )
+ #define STREAM_BUFFER_BUFFER_WRITE_VALUE ( 0x55 )
configASSERT( memset( pucBuffer, ( int ) STREAM_BUFFER_BUFFER_WRITE_VALUE, xBufferSizeBytes ) == pucBuffer );
}
#endif
@@ -1564,7 +1570,7 @@
}
/*-----------------------------------------------------------*/
-#if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( configUSE_TRACE_FACILITY == 1 )
UBaseType_t uxStreamBufferGetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer )
{
@@ -1575,10 +1581,10 @@
return xStreamBuffer->uxStreamBufferNumber;
}
-#endif /* configUSE_TRACE_FACILITY */
+ #endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/
-#if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( configUSE_TRACE_FACILITY == 1 )
void vStreamBufferSetStreamBufferNumber( StreamBufferHandle_t xStreamBuffer,
UBaseType_t uxStreamBufferNumber )
@@ -1590,10 +1596,10 @@
traceRETURN_vStreamBufferSetStreamBufferNumber();
}
-#endif /* configUSE_TRACE_FACILITY */
+ #endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/
-#if ( configUSE_TRACE_FACILITY == 1 )
+ #if ( configUSE_TRACE_FACILITY == 1 )
uint8_t ucStreamBufferGetStreamBufferType( StreamBufferHandle_t xStreamBuffer )
{
@@ -1604,5 +1610,11 @@
return( ( uint8_t ) ( xStreamBuffer->ucFlags & sbFLAGS_IS_MESSAGE_BUFFER ) );
}
-#endif /* configUSE_TRACE_FACILITY */
+ #endif /* configUSE_TRACE_FACILITY */
/*-----------------------------------------------------------*/
+
+/* This entire source file will be skipped if the application is not configured
+ * to include stream buffer functionality. This #if is closed at the very bottom
+ * of this file. If you want to include stream buffers then ensure
+ * configUSE_STREAM_BUFFERS is set to 1 in FreeRTOSConfig.h. */
+#endif /* configUSE_STREAM_BUFFERS == 1 */