]> git.sur5r.net Git - freertos/commitdiff
vQueueAddToRegistry() now takes a const char * instead of a char *.
authorrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 28 Jan 2014 12:32:03 +0000 (12:32 +0000)
committerrtel <rtel@1d2547de-c912-0410-9cb9-b8ca96c0e9e2>
Tue, 28 Jan 2014 12:32:03 +0000 (12:32 +0000)
tmrCOMMAND_CHANGE_PERIOD_FROM_ISR constant added for the "FromISR" version of the software timer change period API function.

git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@2183 1d2547de-c912-0410-9cb9-b8ca96c0e9e2

FreeRTOS/Source/include/queue.h
FreeRTOS/Source/include/timers.h
FreeRTOS/Source/portable/GCC/ARM_CA9/port.c
FreeRTOS/Source/queue.c
FreeRTOS/Source/timers.c

index 8a83ef258a96827d36a0bc53b33a723b31991eff..d559e2dca1793121ea2ef49228db7e5aa6a8888a 100644 (file)
@@ -1514,7 +1514,7 @@ BaseType_t xQueueGiveMutexRecursive( QueueHandle_t pxMutex ) PRIVILEGED_FUNCTION
  * preferably in ROM/Flash), not on the stack.\r
  */\r
 #if configQUEUE_REGISTRY_SIZE > 0\r
-       void vQueueAddToRegistry( QueueHandle_t xQueue, char *pcName ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+       void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcName ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
 #endif\r
 \r
 /*\r
index b25144eb09487567d6c2a253e6d15a37b5c5aead..3faf36d6ebe537af18a5f0311b67571a158de507 100644 (file)
@@ -102,6 +102,7 @@ or interrupt version of the queue send function should be used. */
 #define tmrCOMMAND_START_FROM_ISR                              ( ( BaseType_t ) 6 )\r
 #define tmrCOMMAND_RESET_FROM_ISR                              ( ( BaseType_t ) 7 )\r
 #define tmrCOMMAND_STOP_FROM_ISR                               ( ( BaseType_t ) 8 )\r
+#define tmrCOMMAND_CHANGE_PERIOD_FROM_ISR              ( ( BaseType_t ) 9 )\r
 \r
 \r
 /**\r
@@ -662,7 +663,7 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
 \r
 /**\r
  * BaseType_t xTimerStartFromISR(      TimerHandle_t xTimer,\r
- *                                                                             BaseType_t *pxHigherPriorityTaskWoken );\r
+ *                                                                     BaseType_t *pxHigherPriorityTaskWoken );\r
  *\r
  * A version of xTimerStart() that can be called from an interrupt service\r
  * routine.\r
@@ -748,7 +749,7 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
 \r
 /**\r
  * BaseType_t xTimerStopFromISR(       TimerHandle_t xTimer,\r
- *                                                                             BaseType_t *pxHigherPriorityTaskWoken );\r
+ *                                                                     BaseType_t *pxHigherPriorityTaskWoken );\r
  *\r
  * A version of xTimerStop() that can be called from an interrupt service\r
  * routine.\r
@@ -811,8 +812,8 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
 \r
 /**\r
  * BaseType_t xTimerChangePeriodFromISR( TimerHandle_t xTimer,\r
- *                                                                                     TickType_t xNewPeriod,\r
- *                                                                                     BaseType_t *pxHigherPriorityTaskWoken );\r
+ *                                                                              TickType_t xNewPeriod,\r
+ *                                                                              BaseType_t *pxHigherPriorityTaskWoken );\r
  *\r
  * A version of xTimerChangePeriod() that can be called from an interrupt\r
  * service routine.\r
@@ -880,11 +881,11 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
  * }\r
  * @endverbatim\r
  */\r
-#define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U )\r
+#define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD_FROM_ISR, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U )\r
 \r
 /**\r
  * BaseType_t xTimerResetFromISR(      TimerHandle_t xTimer,\r
- *                                                                             BaseType_t *pxHigherPriorityTaskWoken );\r
+ *                                                                     BaseType_t *pxHigherPriorityTaskWoken );\r
  *\r
  * A version of xTimerReset() that can be called from an interrupt service\r
  * routine.\r
index 30eb3be117412fd4f7029d14c0b8d5253331bebb..023c269d3762a3e58dfb158cb6013f27ceaf9704 100644 (file)
@@ -352,12 +352,16 @@ uint32_t ulAPSR;
 \r
                if( ( portICCBPR_BINARY_POINT_REGISTER & portBINARY_POINT_BITS ) <= portMAX_BINARY_POINT_VALUE )\r
                {\r
-                       /* Start the timer that generates the tick ISR.  Interrupts are\r
-                       turned off in the CPU itself to ensure the tick does not execute\r
-                       while the scheduler is being started.  Interrupts are automatically\r
-                       turned back on in the CPU when the first task starts executing. */\r
+                       /* Interrupts are turned off in the CPU itself to ensure tick does\r
+                       not execute     while the scheduler is being started.  Interrupts are\r
+                       automatically turned back on in the CPU when the first task starts\r
+                       executing. */\r
                        portCPU_IRQ_DISABLE();\r
+\r
+                       /* Start the timer that generates the tick ISR. */\r
                        configSETUP_TICK_INTERRUPT();\r
+\r
+                       /* Start the first task executing. */\r
                        vPortRestoreTaskContext();\r
                }\r
        }\r
index 3fb1b6ce5187f29ce6cfbb96e6dc66706878cfd1..61f907852ecbc40664c01fa2d5c43f38985bad41 100644 (file)
@@ -167,7 +167,7 @@ typedef struct QueueDefinition
        more user friendly. */\r
        typedef struct QUEUE_REGISTRY_ITEM\r
        {\r
-               char *pcQueueName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+               const char *pcQueueName; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
                QueueHandle_t xHandle;\r
        } QueueRegistryItem_t;\r
 \r
@@ -2143,7 +2143,7 @@ BaseType_t xReturn;
 \r
 #if ( configQUEUE_REGISTRY_SIZE > 0 )\r
 \r
-       void vQueueAddToRegistry( QueueHandle_t xQueue, char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
+       void vQueueAddToRegistry( QueueHandle_t xQueue, const char *pcQueueName ) /*lint !e971 Unqualified char types are allowed for strings and single characters only. */\r
        {\r
        UBaseType_t ux;\r
 \r
index 8f6747a89f3947ab100b4de93caeb77a16a47d08..c3cddd0e78a8151e7c72030f9d441edd84798106 100644 (file)
@@ -664,6 +664,7 @@ TickType_t xTimeNow;
                                        break;\r
 \r
                                case tmrCOMMAND_CHANGE_PERIOD :\r
+                               case tmrCOMMAND_CHANGE_PERIOD_FROM_ISR :\r
                                        pxTimer->xTimerPeriodInTicks = xMessage.u.xTimerParameters.xMessageValue;\r
                                        configASSERT( ( pxTimer->xTimerPeriodInTicks > 0 ) );\r
 \r