configSTACK_DEPTH_TYPE MPU_uxTaskGetStackHighWaterMark2( TaskHandle_t xTask );\r
void MPU_vTaskSetApplicationTaskTag( TaskHandle_t xTask, TaskHookFunction_t pxHookFunction );\r
TaskHookFunction_t MPU_xTaskGetApplicationTaskTag( TaskHandle_t xTask );\r
-TaskHookFunction_t MPU_xTaskGetApplicationTaskTagFromISR( TaskHandle_t xTask );\r
void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue );\r
void * MPU_pvTaskGetThreadLocalStoragePointer( TaskHandle_t xTaskToQuery, BaseType_t xIndex );\r
BaseType_t MPU_xTaskCallApplicationTaskHook( TaskHandle_t xTask, void *pvParameter );\r
TaskHandle_t MPU_xTimerGetTimerDaemonTaskHandle( void );\r
BaseType_t MPU_xTimerPendFunctionCall( PendedFunction_t xFunctionToPend, void *pvParameter1, uint32_t ulParameter2, TickType_t xTicksToWait );\r
const char * MPU_pcTimerGetName( TimerHandle_t xTimer );\r
+void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload );\r
TickType_t MPU_xTimerGetPeriod( TimerHandle_t xTimer );\r
TickType_t MPU_xTimerGetExpiryTime( TimerHandle_t xTimer );\r
BaseType_t MPU_xTimerCreateTimerTask( void );\r
\r
/* MPU versions of message/stream_buffer.h API functions. */\r
size_t MPU_xStreamBufferSend( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, TickType_t xTicksToWait );\r
-size_t MPU_xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken );\r
size_t MPU_xStreamBufferReceive( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, TickType_t xTicksToWait );\r
size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer );\r
-size_t MPU_xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken );\r
void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer );\r
BaseType_t MPU_xStreamBufferIsFull( StreamBufferHandle_t xStreamBuffer );\r
BaseType_t MPU_xStreamBufferIsEmpty( StreamBufferHandle_t xStreamBuffer );\r
#define uxTaskGetStackHighWaterMark2 MPU_uxTaskGetStackHighWaterMark2\r
#define vTaskSetApplicationTaskTag MPU_vTaskSetApplicationTaskTag\r
#define xTaskGetApplicationTaskTag MPU_xTaskGetApplicationTaskTag\r
- #define xTaskGetApplicationTaskTagFromISR MPU_xTaskGetApplicationTaskTagFromISR\r
#define vTaskSetThreadLocalStoragePointer MPU_vTaskSetThreadLocalStoragePointer\r
#define pvTaskGetThreadLocalStoragePointer MPU_pvTaskGetThreadLocalStoragePointer\r
#define xTaskCallApplicationTaskHook MPU_xTaskCallApplicationTaskHook\r
#define xTimerGetTimerDaemonTaskHandle MPU_xTimerGetTimerDaemonTaskHandle\r
#define xTimerPendFunctionCall MPU_xTimerPendFunctionCall\r
#define pcTimerGetName MPU_pcTimerGetName\r
+ #define vTimerSetReloadMode MPU_vTimerSetReloadMode\r
#define xTimerGetPeriod MPU_xTimerGetPeriod\r
#define xTimerGetExpiryTime MPU_xTimerGetExpiryTime\r
#define xTimerGenericCommand MPU_xTimerGenericCommand\r
/* Map standard message/stream_buffer.h API functions to the MPU\r
equivalents. */\r
#define xStreamBufferSend MPU_xStreamBufferSend\r
- #define xStreamBufferSendFromISR MPU_xStreamBufferSendFromISR\r
#define xStreamBufferReceive MPU_xStreamBufferReceive\r
#define xStreamBufferNextMessageLengthBytes MPU_xStreamBufferNextMessageLengthBytes\r
- #define xStreamBufferReceiveFromISR MPU_xStreamBufferReceiveFromISR\r
#define vStreamBufferDelete MPU_vStreamBufferDelete\r
#define xStreamBufferIsFull MPU_xStreamBufferIsFull\r
#define xStreamBufferIsEmpty MPU_xStreamBufferIsEmpty\r
*/\r
const char * pcTimerGetName( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
\r
+/**\r
+ * void vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload );\r
+ *\r
+ * Updates a timer to be either an autoreload timer, in which case the timer\r
+ * automatically resets itself each time it expires, or a one shot timer, in\r
+ * which case the timer will only expire once unless it is manually restarted.\r
+ *\r
+ * @param xTimer The handle of the timer being updated.\r
+ *\r
+ * @param uxAutoReload If uxAutoReload is set to pdTRUE then the timer will\r
+ * expire repeatedly with a frequency set by the timer's period (see the\r
+ * xTimerPeriodInTicks parameter of the xTimerCreate() API function). If\r
+ * uxAutoReload is set to pdFALSE then the timer will be a one-shot timer and\r
+ * enter the dormant state after it expires.\r
+ */\r
+void vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload ) PRIVILEGED_FUNCTION;\r
+\r
/**\r
* TickType_t xTimerGetPeriod( TimerHandle_t xTimer );\r
*\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
-#if ( configUSE_APPLICATION_TASK_TAG == 1 )\r
- TaskHookFunction_t MPU_xTaskGetApplicationTaskTagFromISR( TaskHandle_t xTask )\r
- {\r
- TaskHookFunction_t xReturn;\r
- BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
-\r
- xReturn = xTaskGetApplicationTaskTagFromISR( xTask );\r
- vPortResetPrivilege( xRunningPrivileged );\r
- return xReturn;\r
- }\r
-#endif\r
-/*-----------------------------------------------------------*/\r
-\r
#if ( configNUM_THREAD_LOCAL_STORAGE_POINTERS != 0 )\r
void MPU_vTaskSetThreadLocalStoragePointer( TaskHandle_t xTaskToSet, BaseType_t xIndex, void *pvValue )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-BaseType_t MPU_xQueuePeekFromISR( QueueHandle_t pxQueue, void * const pvBuffer )\r
-{\r
-BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
-BaseType_t xReturn;\r
-\r
- xReturn = xQueuePeekFromISR( pxQueue, pvBuffer );\r
- vPortResetPrivilege( xRunningPrivileged );\r
- return xReturn;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
TaskHandle_t MPU_xQueueGetMutexHolder( QueueHandle_t xSemaphore )\r
{\r
BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
#endif\r
/*-----------------------------------------------------------*/\r
\r
+#if( configUSE_TIMERS == 1 )\r
+ void MPU_vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload )\r
+ {\r
+ BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
+\r
+ vTimerSetReloadMode( xTimer, uxAutoReload );\r
+ vPortResetPrivilege( xRunningPrivileged );\r
+ }\r
+#endif\r
+/*-----------------------------------------------------------*/\r
+\r
#if( configUSE_TIMERS == 1 )\r
const char * MPU_pcTimerGetName( TimerHandle_t xTimer )\r
{\r
}\r
/*-----------------------------------------------------------*/\r
\r
-size_t MPU_xStreamBufferSendFromISR( StreamBufferHandle_t xStreamBuffer, const void *pvTxData, size_t xDataLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken )\r
-{\r
-size_t xReturn;\r
-BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
-\r
- xReturn = xStreamBufferSendFromISR( xStreamBuffer, pvTxData, xDataLengthBytes, pxHigherPriorityTaskWoken );\r
- vPortResetPrivilege( xRunningPrivileged );\r
-\r
- return xReturn;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
size_t MPU_xStreamBufferNextMessageLengthBytes( StreamBufferHandle_t xStreamBuffer )\r
{\r
size_t xReturn;\r
}\r
/*-----------------------------------------------------------*/\r
\r
-size_t MPU_xStreamBufferReceiveFromISR( StreamBufferHandle_t xStreamBuffer, void *pvRxData, size_t xBufferLengthBytes, BaseType_t * const pxHigherPriorityTaskWoken )\r
-{\r
-size_t xReturn;\r
-BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
-\r
- xReturn = xStreamBufferReceiveFromISR( xStreamBuffer, pvRxData, xBufferLengthBytes, pxHigherPriorityTaskWoken );\r
- vPortResetPrivilege( xRunningPrivileged );\r
-\r
- return xReturn;\r
-}\r
-/*-----------------------------------------------------------*/\r
-\r
void MPU_vStreamBufferDelete( StreamBufferHandle_t xStreamBuffer )\r
{\r
BaseType_t xRunningPrivileged = xPortRaisePrivilege();\r
}\r
/*-----------------------------------------------------------*/\r
\r
+void vTimerSetReloadMode( TimerHandle_t xTimer, const UBaseType_t uxAutoReload )\r
+{\r
+Timer_t * pxTimer = xTimer;\r
+\r
+ configASSERT( xTimer );\r
+ taskENTER_CRITICAL();\r
+ {\r
+ if( uxAutoReload != pdFALSE )\r
+ {\r
+ pxTimer->ucStatus |= tmrSTATUS_IS_AUTORELOAD;\r
+ }\r
+ else\r
+ {\r
+ pxTimer->ucStatus &= ~tmrSTATUS_IS_AUTORELOAD;\r
+ }\r
+ }\r
+ taskEXIT_CRITICAL();\r
+}\r
+/*-----------------------------------------------------------*/\r
+\r
TickType_t xTimerGetExpiryTime( TimerHandle_t xTimer )\r
{\r
Timer_t * pxTimer = xTimer;\r