vQueueAddToRegistry() now takes a const char * instead of a char *.

tmrCOMMAND_CHANGE_PERIOD_FROM_ISR constant added for the "FromISR" version of the software timer change period API function.
This commit is contained in:
Richard Barry 2014-01-28 12:32:03 +00:00
parent 0bf2e615b2
commit 51ea2639a9
5 changed files with 19 additions and 13 deletions

View file

@ -1514,7 +1514,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION
* preferably in ROM/Flash), not on the stack. * preferably in ROM/Flash), not on the stack.
*/ */
#if configQUEUE_REGISTRY_SIZE > 0 #if configQUEUE_REGISTRY_SIZE > 0
void vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
#endif #endif
/* /*

View file

@ -102,6 +102,7 @@ or interrupt version of the queue send function should be used. */
#define tmrCOMMAND_START_FROM_ISR ( ( BaseType_t ) 6 ) #define tmrCOMMAND_START_FROM_ISR ( ( BaseType_t ) 6 )
#define tmrCOMMAND_RESET_FROM_ISR ( ( BaseType_t ) 7 ) #define tmrCOMMAND_RESET_FROM_ISR ( ( BaseType_t ) 7 )
#define tmrCOMMAND_STOP_FROM_ISR ( ( BaseType_t ) 8 ) #define tmrCOMMAND_STOP_FROM_ISR ( ( BaseType_t ) 8 )
#define tmrCOMMAND_CHANGE_PERIOD_FROM_ISR ( ( BaseType_t ) 9 )
/** /**
@ -880,7 +881,7 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
* } * }
* @endverbatim * @endverbatim
*/ */
#define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U ) #define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD_FROM_ISR, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U )
/** /**
* BaseType_t xTimerResetFromISR( TimerHandle_t xTimer, * BaseType_t xTimerResetFromISR( TimerHandle_t xTimer,

View file

@ -352,12 +352,16 @@ uint32_t ulAPSR;
if( ( portICCBPR_BINARY_POINT_REGISTER & portBINARY_POINT_BITS ) <= portMAX_BINARY_POINT_VALUE ) if( ( portICCBPR_BINARY_POINT_REGISTER & portBINARY_POINT_BITS ) <= portMAX_BINARY_POINT_VALUE )
{ {
/* Start the timer that generates the tick ISR. Interrupts are /* Interrupts are turned off in the CPU itself to ensure tick does
turned off in the CPU itself to ensure the tick does not execute not execute while the scheduler is being started. Interrupts are
while the scheduler is being started. Interrupts are automatically automatically turned back on in the CPU when the first task starts
turned back on in the CPU when the first task starts executing. */ executing. */
portCPU_IRQ_DISABLE(); portCPU_IRQ_DISABLE();
/* Start the timer that generates the tick ISR. */
configSETUP_TICK_INTERRUPT(); configSETUP_TICK_INTERRUPT();
/* Start the first task executing. */
vPortRestoreTaskContext(); vPortRestoreTaskContext();
} }
} }

View file

@ -167,7 +167,7 @@ typedef struct QueueDefinition
more user friendly. */ more user friendly. */
typedef struct QUEUE_REGISTRY_ITEM typedef struct QUEUE_REGISTRY_ITEM
{ {
char *pcQueueName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ const char *pcQueueName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
QueueHandle_t xHandle; QueueHandle_t xHandle;
} QueueRegistryItem_t; } QueueRegistryItem_t;
@ -2143,7 +2143,7 @@ BaseType_t xReturn;
#if ( configQUEUE_REGISTRY_SIZE > 0 ) #if ( configQUEUE_REGISTRY_SIZE > 0 )
void vQueueAddToRegistry( QueueHandle_t xQueue, char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */ void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
{ {
UBaseType_t ux; UBaseType_t ux;

View file

@ -664,6 +664,7 @@ TickType_t xTimeNow;
break; break;
case tmrCOMMAND_CHANGE_PERIOD : case tmrCOMMAND_CHANGE_PERIOD :
case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR :
pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue; pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue;
configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) ); configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );