mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-08-18 09:08:33 -04:00
Replace standard types with stdint.h types.
Replace #define types with typedefs. Rename all typedefs to have a _t extension. Add #defines to automatically convert old FreeRTOS specific types to their new names (with the _t).
This commit is contained in:
parent
f292243dcf
commit
3e20aa7d60
190 changed files with 4940 additions and 4603 deletions
|
@ -87,27 +87,27 @@ extern "C" {
|
|||
/* IDs for commands that can be sent/received on the timer queue. These are to
|
||||
be used solely through the macros that make up the public software timer API,
|
||||
as defined below. */
|
||||
#define tmrCOMMAND_EXECUTE_CALLBACK ( ( portBASE_TYPE ) -1 )
|
||||
#define tmrCOMMAND_START ( ( portBASE_TYPE ) 0 )
|
||||
#define tmrCOMMAND_STOP ( ( portBASE_TYPE ) 1 )
|
||||
#define tmrCOMMAND_CHANGE_PERIOD ( ( portBASE_TYPE ) 2 )
|
||||
#define tmrCOMMAND_DELETE ( ( portBASE_TYPE ) 3 )
|
||||
#define tmrCOMMAND_EXECUTE_CALLBACK ( ( BaseType_t ) -1 )
|
||||
#define tmrCOMMAND_START ( ( BaseType_t ) 0 )
|
||||
#define tmrCOMMAND_STOP ( ( BaseType_t ) 1 )
|
||||
#define tmrCOMMAND_CHANGE_PERIOD ( ( BaseType_t ) 2 )
|
||||
#define tmrCOMMAND_DELETE ( ( BaseType_t ) 3 )
|
||||
|
||||
/**
|
||||
* Type by which software timers are referenced. For example, a call to
|
||||
* xTimerCreate() returns an xTimerHandle variable that can then be used to
|
||||
* xTimerCreate() returns an TimerHandle_t variable that can then be used to
|
||||
* reference the subject timer in calls to other software timer API functions
|
||||
* (for example, xTimerStart(), xTimerReset(), etc.).
|
||||
*/
|
||||
typedef void * xTimerHandle;
|
||||
typedef void * TimerHandle_t;
|
||||
|
||||
/* Define the prototype to which timer callback functions must conform. */
|
||||
typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
|
||||
typedef void (*tmrTIMER_CALLBACK)( TimerHandle_t xTimer );
|
||||
|
||||
/**
|
||||
* xTimerHandle xTimerCreate( const char * const pcTimerName,
|
||||
* portTickType xTimerPeriodInTicks,
|
||||
* unsigned portBASE_TYPE uxAutoReload,
|
||||
* TimerHandle_t xTimerCreate( const char * const pcTimerName,
|
||||
* TickType_t xTimerPeriodInTicks,
|
||||
* UBaseType_t uxAutoReload,
|
||||
* void * pvTimerID,
|
||||
* tmrTIMER_CALLBACK pxCallbackFunction );
|
||||
*
|
||||
|
@ -117,23 +117,24 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
|
|||
*
|
||||
* Timers are created in the dormant state. The xTimerStart(), xTimerReset(),
|
||||
* xTimerStartFromISR(), xTimerResetFromISR(), xTimerChangePeriod() and
|
||||
* xTimerChangePeriodFromISR() API functions can all be used to transition a timer into the
|
||||
* active state.
|
||||
* xTimerChangePeriodFromISR() API functions can all be used to transition a
|
||||
* timer into the active state.
|
||||
*
|
||||
* @param pcTimerName A text name that is assigned to the timer. This is done
|
||||
* purely to assist debugging. The kernel itself only ever references a timer by
|
||||
* its handle, and never by its name.
|
||||
* purely to assist debugging. The kernel itself only ever references a timer
|
||||
* by its handle, and never by its name.
|
||||
*
|
||||
* @param xTimerPeriodInTicks The timer period. The time is defined in tick periods so
|
||||
* the constant portTICK_RATE_MS can be used to convert a time that has been
|
||||
* specified in milliseconds. For example, if the timer must expire after 100
|
||||
* ticks, then xTimerPeriodInTicks should be set to 100. Alternatively, if the timer
|
||||
* must expire after 500ms, then xPeriod can be set to ( 500 / portTICK_RATE_MS )
|
||||
* provided configTICK_RATE_HZ is less than or equal to 1000.
|
||||
* @param xTimerPeriodInTicks The timer period. The time is defined in tick
|
||||
* periods so the constant portTICK_RATE_MS can be used to convert a time that
|
||||
* has been specified in milliseconds. For example, if the timer must expire
|
||||
* after 100 ticks, then xTimerPeriodInTicks should be set to 100.
|
||||
* Alternatively, if the timer must expire after 500ms, then xPeriod can be set
|
||||
* to ( 500 / portTICK_RATE_MS ) provided configTICK_RATE_HZ is less than or
|
||||
* equal to 1000.
|
||||
*
|
||||
* @param uxAutoReload If uxAutoReload is set to pdTRUE then the timer will
|
||||
* expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter. If
|
||||
* uxAutoReload is set to pdFALSE then the timer will be a one-shot timer and
|
||||
* expire repeatedly with a frequency set by the xTimerPeriodInTicks parameter.
|
||||
* If uxAutoReload is set to pdFALSE then the timer will be a one-shot timer and
|
||||
* enter the dormant state after it expires.
|
||||
*
|
||||
* @param pvTimerID An identifier that is assigned to the timer being created.
|
||||
|
@ -143,7 +144,7 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
|
|||
*
|
||||
* @param pxCallbackFunction The function to call when the timer expires.
|
||||
* Callback functions must have the prototype defined by tmrTIMER_CALLBACK,
|
||||
* which is "void vCallbackFunction( xTimerHandle xTimer );".
|
||||
* which is "void vCallbackFunction( TimerHandle_t xTimer );".
|
||||
*
|
||||
* @return If the timer is successfully created then a handle to the newly
|
||||
* created timer is returned. If the timer cannot be created (because either
|
||||
|
@ -155,25 +156,25 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
|
|||
* #define NUM_TIMERS 5
|
||||
*
|
||||
* // An array to hold handles to the created timers.
|
||||
* xTimerHandle xTimers[ NUM_TIMERS ];
|
||||
* TimerHandle_t xTimers[ NUM_TIMERS ];
|
||||
*
|
||||
* // An array to hold a count of the number of times each timer expires.
|
||||
* long lExpireCounters[ NUM_TIMERS ] = { 0 };
|
||||
* int32_t lExpireCounters[ NUM_TIMERS ] = { 0 };
|
||||
*
|
||||
* // Define a callback function that will be used by multiple timer instances.
|
||||
* // The callback function does nothing but count the number of times the
|
||||
* // associated timer expires, and stop the timer once the timer has expired
|
||||
* // 10 times.
|
||||
* void vTimerCallback( xTimerHandle pxTimer )
|
||||
* void vTimerCallback( TimerHandle_t pxTimer )
|
||||
* {
|
||||
* long lArrayIndex;
|
||||
* const long xMaxExpiryCountBeforeStopping = 10;
|
||||
* int32_t lArrayIndex;
|
||||
* const int32_t xMaxExpiryCountBeforeStopping = 10;
|
||||
*
|
||||
* // Optionally do something if the pxTimer parameter is NULL.
|
||||
* configASSERT( pxTimer );
|
||||
*
|
||||
* // Which timer expired?
|
||||
* lArrayIndex = ( long ) pvTimerGetTimerID( pxTimer );
|
||||
* lArrayIndex = ( int32_t ) pvTimerGetTimerID( pxTimer );
|
||||
*
|
||||
* // Increment the number of times that pxTimer has expired.
|
||||
* lExpireCounters[ lArrayIndex ] += 1;
|
||||
|
@ -189,18 +190,18 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
|
|||
*
|
||||
* void main( void )
|
||||
* {
|
||||
* long x;
|
||||
* int32_t x;
|
||||
*
|
||||
* // Create then start some timers. Starting the timers before the scheduler
|
||||
* // has been started means the timers will start running immediately that
|
||||
* // the scheduler starts.
|
||||
* for( x = 0; x < NUM_TIMERS; x++ )
|
||||
* {
|
||||
* xTimers[ x ] = xTimerCreate( "Timer", // Just a text name, not used by the kernel.
|
||||
* ( 100 * x ), // The timer period in ticks.
|
||||
* pdTRUE, // The timers will auto-reload themselves when they expire.
|
||||
* ( void * ) x, // Assign each timer a unique id equal to its array index.
|
||||
* vTimerCallback // Each timer calls the same callback when it expires.
|
||||
* xTimers[ x ] = xTimerCreate( "Timer", // Just a text name, not used by the kernel.
|
||||
* ( 100 * x ), // The timer period in ticks.
|
||||
* pdTRUE, // The timers will auto-reload themselves when they expire.
|
||||
* ( void * ) x, // Assign each timer a unique id equal to its array index.
|
||||
* vTimerCallback // Each timer calls the same callback when it expires.
|
||||
* );
|
||||
*
|
||||
* if( xTimers[ x ] == NULL )
|
||||
|
@ -232,10 +233,10 @@ typedef void (*tmrTIMER_CALLBACK)( xTimerHandle xTimer );
|
|||
* }
|
||||
* @endverbatim
|
||||
*/
|
||||
xTimerHandle xTimerCreate( const char * const pcTimerName, const portTickType xTimerPeriodInTicks, const unsigned portBASE_TYPE uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
TimerHandle_t xTimerCreate( const char * const pcTimerName, const TickType_t xTimerPeriodInTicks, const UBaseType_t uxAutoReload, void * const pvTimerID, tmrTIMER_CALLBACK pxCallbackFunction ) PRIVILEGED_FUNCTION; /*lint !e971 Unqualified char types are allowed for strings and single characters only. */
|
||||
|
||||
/**
|
||||
* void *pvTimerGetTimerID( xTimerHandle xTimer );
|
||||
* void *pvTimerGetTimerID( TimerHandle_t xTimer );
|
||||
*
|
||||
* Returns the ID assigned to the timer.
|
||||
*
|
||||
|
@ -254,10 +255,10 @@ xTimerHandle xTimerCreate( const char * const pcTimerName, const portTickType xT
|
|||
*
|
||||
* See the xTimerCreate() API function example usage scenario.
|
||||
*/
|
||||
void *pvTimerGetTimerID( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
|
||||
void *pvTimerGetTimerID( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer );
|
||||
* BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer );
|
||||
*
|
||||
* Queries a timer to see if it is active or dormant.
|
||||
*
|
||||
|
@ -278,7 +279,7 @@ void *pvTimerGetTimerID( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
|
|||
* Example usage:
|
||||
* @verbatim
|
||||
* // This function assumes xTimer has already been created.
|
||||
* void vAFunction( xTimerHandle xTimer )
|
||||
* void vAFunction( TimerHandle_t xTimer )
|
||||
* {
|
||||
* if( xTimerIsTimerActive( xTimer ) != pdFALSE ) // or more simply and equivalently "if( xTimerIsTimerActive( xTimer ) )"
|
||||
* {
|
||||
|
@ -291,10 +292,10 @@ void *pvTimerGetTimerID( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
|
|||
* }
|
||||
* @endverbatim
|
||||
*/
|
||||
portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
|
||||
BaseType_t xTimerIsTimerActive( TimerHandle_t xTimer ) PRIVILEGED_FUNCTION;
|
||||
|
||||
/**
|
||||
* xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
||||
* TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
|
||||
*
|
||||
* xTimerGetTimerDaemonTaskHandle() is only available if
|
||||
* INCLUDE_xTimerGetTimerDaemonTaskHandle is set to 1 in FreeRTOSConfig.h.
|
||||
|
@ -302,10 +303,10 @@ portBASE_TYPE xTimerIsTimerActive( xTimerHandle xTimer ) PRIVILEGED_FUNCTION;
|
|||
* Simply returns the handle of the timer service/daemon task. It it not valid
|
||||
* to call xTimerGetTimerDaemonTaskHandle() before the scheduler has been started.
|
||||
*/
|
||||
xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
||||
TaskHandle_t xTimerGetTimerDaemonTaskHandle( void );
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerStart( xTimerHandle xTimer, portTickType xBlockTime );
|
||||
* BaseType_t xTimerStart( TimerHandle_t xTimer, TickType_t xBlockTime );
|
||||
*
|
||||
* Timer functionality is provided by a timer service/daemon task. Many of the
|
||||
* public FreeRTOS timer API functions send commands to the timer service task
|
||||
|
@ -357,7 +358,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerStart( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCount() ), NULL, ( xBlockTime ) )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerStop( xTimerHandle xTimer, portTickType xBlockTime );
|
||||
* BaseType_t xTimerStop( TimerHandle_t xTimer, TickType_t xBlockTime );
|
||||
*
|
||||
* Timer functionality is provided by a timer service/daemon task. Many of the
|
||||
* public FreeRTOS timer API functions send commands to the timer service task
|
||||
|
@ -399,9 +400,9 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerStop( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0U, NULL, ( xBlockTime ) )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerChangePeriod( xTimerHandle xTimer,
|
||||
* portTickType xNewPeriod,
|
||||
* portTickType xBlockTime );
|
||||
* BaseType_t xTimerChangePeriod( TimerHandle_t xTimer,
|
||||
* TickType_t xNewPeriod,
|
||||
* TickType_t xBlockTime );
|
||||
*
|
||||
* Timer functionality is provided by a timer service/daemon task. Many of the
|
||||
* public FreeRTOS timer API functions send commands to the timer service task
|
||||
|
@ -450,7 +451,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // is deleted. If the timer referenced by xTimer is not active when it is
|
||||
* // called, then the period of the timer is set to 500ms and the timer is
|
||||
* // started.
|
||||
* void vAFunction( xTimerHandle xTimer )
|
||||
* void vAFunction( TimerHandle_t xTimer )
|
||||
* {
|
||||
* if( xTimerIsTimerActive( xTimer ) != pdFALSE ) // or more simply and equivalently "if( xTimerIsTimerActive( xTimer ) )"
|
||||
* {
|
||||
|
@ -479,7 +480,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerChangePeriod( xTimer, xNewPeriod, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), NULL, ( xBlockTime ) )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerDelete( xTimerHandle xTimer, portTickType xBlockTime );
|
||||
* BaseType_t xTimerDelete( TimerHandle_t xTimer, TickType_t xBlockTime );
|
||||
*
|
||||
* Timer functionality is provided by a timer service/daemon task. Many of the
|
||||
* public FreeRTOS timer API functions send commands to the timer service task
|
||||
|
@ -517,7 +518,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerDelete( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_DELETE, 0U, NULL, ( xBlockTime ) )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerReset( xTimerHandle xTimer, portTickType xBlockTime );
|
||||
* BaseType_t xTimerReset( TimerHandle_t xTimer, TickType_t xBlockTime );
|
||||
*
|
||||
* Timer functionality is provided by a timer service/daemon task. Many of the
|
||||
* public FreeRTOS timer API functions send commands to the timer service task
|
||||
|
@ -569,11 +570,11 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // without a key being pressed, then the LCD back-light is switched off. In
|
||||
* // this case, the timer is a one-shot timer.
|
||||
*
|
||||
* xTimerHandle xBacklightTimer = NULL;
|
||||
* TimerHandle_t xBacklightTimer = NULL;
|
||||
*
|
||||
* // The callback function assigned to the one-shot timer. In this case the
|
||||
* // parameter is not used.
|
||||
* void vBacklightTimerCallback( xTimerHandle pxTimer )
|
||||
* void vBacklightTimerCallback( TimerHandle_t pxTimer )
|
||||
* {
|
||||
* // The timer expired, therefore 5 seconds must have passed since a key
|
||||
* // was pressed. Switch off the LCD back-light.
|
||||
|
@ -599,7 +600,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
*
|
||||
* void main( void )
|
||||
* {
|
||||
* long x;
|
||||
* int32_t x;
|
||||
*
|
||||
* // Create then start the one-shot timer that is responsible for turning
|
||||
* // the back-light off if no keys are pressed within a 5 second period.
|
||||
|
@ -641,8 +642,8 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerReset( xTimer, xBlockTime ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCount() ), NULL, ( xBlockTime ) )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerStartFromISR( xTimerHandle xTimer,
|
||||
* portBASE_TYPE *pxHigherPriorityTaskWoken );
|
||||
* BaseType_t xTimerStartFromISR( TimerHandle_t xTimer,
|
||||
* BaseType_t *pxHigherPriorityTaskWoken );
|
||||
*
|
||||
* A version of xTimerStart() that can be called from an interrupt service
|
||||
* routine.
|
||||
|
@ -666,8 +667,9 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* successfully sent to the timer command queue. When the command is actually
|
||||
* processed will depend on the priority of the timer service/daemon task
|
||||
* relative to other tasks in the system, although the timers expiry time is
|
||||
* relative to when xTimerStartFromISR() is actually called. The timer service/daemon
|
||||
* task priority is set by the configTIMER_TASK_PRIORITY configuration constant.
|
||||
* relative to when xTimerStartFromISR() is actually called. The timer
|
||||
* service/daemon task priority is set by the configTIMER_TASK_PRIORITY
|
||||
* configuration constant.
|
||||
*
|
||||
* Example usage:
|
||||
* @verbatim
|
||||
|
@ -680,7 +682,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
*
|
||||
* // The callback function assigned to the one-shot timer. In this case the
|
||||
* // parameter is not used.
|
||||
* void vBacklightTimerCallback( xTimerHandle pxTimer )
|
||||
* void vBacklightTimerCallback( TimerHandle_t pxTimer )
|
||||
* {
|
||||
* // The timer expired, therefore 5 seconds must have passed since a key
|
||||
* // was pressed. Switch off the LCD back-light.
|
||||
|
@ -690,7 +692,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // The key press interrupt service routine.
|
||||
* void vKeyPressEventInterruptHandler( void )
|
||||
* {
|
||||
* portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
* BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
*
|
||||
* // Ensure the LCD back-light is on, then restart the timer that is
|
||||
* // responsible for turning the back-light off after 5 seconds of
|
||||
|
@ -726,8 +728,8 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerStartFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_START, ( xTaskGetTickCountFromISR() ), ( pxHigherPriorityTaskWoken ), 0U )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerStopFromISR( xTimerHandle xTimer,
|
||||
* portBASE_TYPE *pxHigherPriorityTaskWoken );
|
||||
* BaseType_t xTimerStopFromISR( TimerHandle_t xTimer,
|
||||
* BaseType_t *pxHigherPriorityTaskWoken );
|
||||
*
|
||||
* A version of xTimerStop() that can be called from an interrupt service
|
||||
* routine.
|
||||
|
@ -761,7 +763,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // The interrupt service routine that stops the timer.
|
||||
* void vAnExampleInterruptServiceRoutine( void )
|
||||
* {
|
||||
* portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
* BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
*
|
||||
* // The interrupt has occurred - simply stop the timer.
|
||||
* // xHigherPriorityTaskWoken was set to pdFALSE where it was defined
|
||||
|
@ -789,9 +791,9 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerStopFromISR( xTimer, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_STOP, 0, ( pxHigherPriorityTaskWoken ), 0U )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerChangePeriodFromISR( xTimerHandle xTimer,
|
||||
* portTickType xNewPeriod,
|
||||
* portBASE_TYPE *pxHigherPriorityTaskWoken );
|
||||
* BaseType_t xTimerChangePeriodFromISR( TimerHandle_t xTimer,
|
||||
* TickType_t xNewPeriod,
|
||||
* BaseType_t *pxHigherPriorityTaskWoken );
|
||||
*
|
||||
* A version of xTimerChangePeriod() that can be called from an interrupt
|
||||
* service routine.
|
||||
|
@ -834,7 +836,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // The interrupt service routine that changes the period of xTimer.
|
||||
* void vAnExampleInterruptServiceRoutine( void )
|
||||
* {
|
||||
* portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
* BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
*
|
||||
* // The interrupt has occurred - change the period of xTimer to 500ms.
|
||||
* // xHigherPriorityTaskWoken was set to pdFALSE where it was defined
|
||||
|
@ -862,8 +864,8 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
#define xTimerChangePeriodFromISR( xTimer, xNewPeriod, pxHigherPriorityTaskWoken ) xTimerGenericCommand( ( xTimer ), tmrCOMMAND_CHANGE_PERIOD, ( xNewPeriod ), ( pxHigherPriorityTaskWoken ), 0U )
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerResetFromISR( xTimerHandle xTimer,
|
||||
* portBASE_TYPE *pxHigherPriorityTaskWoken );
|
||||
* BaseType_t xTimerResetFromISR( TimerHandle_t xTimer,
|
||||
* BaseType_t *pxHigherPriorityTaskWoken );
|
||||
*
|
||||
* A version of xTimerReset() that can be called from an interrupt service
|
||||
* routine.
|
||||
|
@ -902,7 +904,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
*
|
||||
* // The callback function assigned to the one-shot timer. In this case the
|
||||
* // parameter is not used.
|
||||
* void vBacklightTimerCallback( xTimerHandle pxTimer )
|
||||
* void vBacklightTimerCallback( TimerHandle_t pxTimer )
|
||||
* {
|
||||
* // The timer expired, therefore 5 seconds must have passed since a key
|
||||
* // was pressed. Switch off the LCD back-light.
|
||||
|
@ -912,7 +914,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // The key press interrupt service routine.
|
||||
* void vKeyPressEventInterruptHandler( void )
|
||||
* {
|
||||
* portBASE_TYPE xHigherPriorityTaskWoken = pdFALSE;
|
||||
* BaseType_t xHigherPriorityTaskWoken = pdFALSE;
|
||||
*
|
||||
* // Ensure the LCD back-light is on, then reset the timer that is
|
||||
* // responsible for turning the back-light off after 5 seconds of
|
||||
|
@ -949,10 +951,10 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
|
||||
|
||||
/**
|
||||
* portBASE_TYPE xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction,
|
||||
* BaseType_t xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction,
|
||||
* void *pvParameter1,
|
||||
* unsigned long ulParameter2,
|
||||
* portBASE_TYPE *pxHigherPriorityTaskWoken );
|
||||
* uint32_t ulParameter2,
|
||||
* BaseType_t *pxHigherPriorityTaskWoken );
|
||||
*
|
||||
*
|
||||
* Can be used by interrupt service routines to request that a function (the
|
||||
|
@ -1001,13 +1003,13 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
*
|
||||
* // The callback function that will execute in the context of the daemon task.
|
||||
* // Note callback functions must all use this same prototype.
|
||||
* void vProcessInterface( void *pvParameter1, unsigned long ulParameter2 )
|
||||
* void vProcessInterface( void *pvParameter1, uint32_t ulParameter2 )
|
||||
* {
|
||||
* portBASE_TYPE xInterfaceToService;
|
||||
* BaseType_t xInterfaceToService;
|
||||
*
|
||||
* // The interface that requires servicing is passed in the second
|
||||
* // parameter. The first parameter is not used in this case.
|
||||
* xInterfaceToService = ( portBASE_TYPE ) ulParameter2;
|
||||
* xInterfaceToService = ( BaseType_t ) ulParameter2;
|
||||
*
|
||||
* // ...Perform the processing here...
|
||||
* }
|
||||
|
@ -1015,7 +1017,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // An ISR that receives data packets from multiple interfaces
|
||||
* void vAnISR( void )
|
||||
* {
|
||||
* portBASE_TYPE xInterfaceToService, xHigherPriorityTaskWoken;
|
||||
* BaseType_t xInterfaceToService, xHigherPriorityTaskWoken;
|
||||
*
|
||||
* // Query the hardware to determine which interface needs processing.
|
||||
* xInterfaceToService = prvCheckInterfaces();
|
||||
|
@ -1026,7 +1028,7 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* // service is passed in the second parameter. The first parameter is
|
||||
* // not used in this case.
|
||||
* xHigherPriorityTaskWoken = pdFALSE;
|
||||
* xTimerPendCallbackFromISR( vProcessInterface, NULL, ( unsigned long ) xInterfaceToService, &xHigherPriorityTaskWoken );
|
||||
* xTimerPendCallbackFromISR( vProcessInterface, NULL, ( uint32_t ) xInterfaceToService, &xHigherPriorityTaskWoken );
|
||||
*
|
||||
* // If xHigherPriorityTaskWoken is now set to pdTRUE then a context
|
||||
* // switch should be requested. The macro used is port specific and will
|
||||
|
@ -1037,14 +1039,14 @@ xTaskHandle xTimerGetTimerDaemonTaskHandle( void );
|
|||
* }
|
||||
* @endverbatim
|
||||
*/
|
||||
portBASE_TYPE xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction, void *pvParameter1, unsigned long ulParameter2, portBASE_TYPE *pxHigherPriorityTaskWoken );
|
||||
BaseType_t xTimerPendCallbackFromISR( pdAPPLICATION_CALLBACK_CODE pvCallbackFunction, void *pvParameter1, uint32_t ulParameter2, BaseType_t *pxHigherPriorityTaskWoken );
|
||||
|
||||
/*
|
||||
* Functions beyond this part are not part of the public API and are intended
|
||||
* for use by the kernel only.
|
||||
*/
|
||||
portBASE_TYPE xTimerCreateTimerTask( void ) PRIVILEGED_FUNCTION;
|
||||
portBASE_TYPE xTimerGenericCommand( xTimerHandle xTimer, const portBASE_TYPE xCommandID, const portTickType xOptionalValue, signed portBASE_TYPE * const pxHigherPriorityTaskWoken, const portTickType xBlockTime ) PRIVILEGED_FUNCTION;
|
||||
BaseType_t xTimerCreateTimerTask( void ) PRIVILEGED_FUNCTION;
|
||||
BaseType_t xTimerGenericCommand( TimerHandle_t xTimer, const BaseType_t xCommandID, const TickType_t xOptionalValue, BaseType_t * const pxHigherPriorityTaskWoken, const TickType_t xBlockTime ) PRIVILEGED_FUNCTION;
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue