mirror of
https://github.com/FreeRTOS/FreeRTOS-Kernel.git
synced 2025-04-19 21:11:57 -04:00
Update comment in the example for declaration of xTimerReset
This commit is contained in:
parent
6dab25ae4e
commit
77dead25cd
|
@ -737,12 +737,16 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void ) PRIVILEGED_FUNCTION;
|
||||||
* // The key press event handler.
|
* // The key press event handler.
|
||||||
* void vKeyPressEventHandler( char cKey )
|
* void vKeyPressEventHandler( char cKey )
|
||||||
* {
|
* {
|
||||||
* // Ensure the LCD back-light is on, then reset the timer that is
|
* // Reset the timer that is responsible for turning the back-light off after
|
||||||
* // responsible for turning the back-light off after 5 seconds of
|
* // 5 seconds of key inactivity. Wait 10 ticks for the command to be
|
||||||
* // key inactivity. Wait 10 ticks for the command to be successfully sent
|
* // successfully sent if it cannot be sent immediately.
|
||||||
* // if it cannot be sent immediately.
|
* if( xTimerReset( xBacklightTimer, 10 ) == pdPASS )
|
||||||
|
* {
|
||||||
|
* // Turn on the LCD back-light. It will be turned off in the
|
||||||
|
* // vBacklightTimerCallback after 5 seconds of key inactivity.
|
||||||
* vSetBacklightState( BACKLIGHT_ON );
|
* vSetBacklightState( BACKLIGHT_ON );
|
||||||
* if( xTimerReset( xBacklightTimer, 100 ) != pdPASS )
|
* }
|
||||||
|
* else
|
||||||
* {
|
* {
|
||||||
* // The reset command was not executed successfully. Take appropriate
|
* // The reset command was not executed successfully. Take appropriate
|
||||||
* // action here.
|
* // action here.
|
||||||
|
@ -753,12 +757,11 @@ TaskHandle_t xTimerGetTimerDaemonTaskHandle( void ) PRIVILEGED_FUNCTION;
|
||||||
*
|
*
|
||||||
* void main( void )
|
* void main( void )
|
||||||
* {
|
* {
|
||||||
* int32_t x;
|
|
||||||
*
|
*
|
||||||
* // Create then start the one-shot timer that is responsible for turning
|
* // 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.
|
* // the back-light off if no keys are pressed within a 5 second period.
|
||||||
* xBacklightTimer = xTimerCreate( "BacklightTimer", // Just a text name, not used by the kernel.
|
* xBacklightTimer = xTimerCreate( "BacklightTimer", // Just a text name, not used by the kernel.
|
||||||
* ( 5000 / portTICK_PERIOD_MS), // The timer period in ticks.
|
* pdMS_TO_TICKS( 5000 ), // The timer period in ticks.
|
||||||
* pdFALSE, // The timer is a one-shot timer.
|
* pdFALSE, // The timer is a one-shot timer.
|
||||||
* 0, // The id is not used by the callback so can take any value.
|
* 0, // The id is not used by the callback so can take any value.
|
||||||
* vBacklightTimerCallback // The callback function that switches the LCD back-light off.
|
* vBacklightTimerCallback // The callback function that switches the LCD back-light off.
|
||||||
|
|
Loading…
Reference in a new issue