ACS ACR89U-A1 User Manual Page 114

  • Download
  • Add to my manuals
  • Print
  • Page
    / 115
  • Table of contents
  • BOOKMARKS
  • Rated. / 5. Based on customer reviews
Page view 113
Document Title Here
Document Title Here
Document Title Here
ACR89U-A1 Application Programming Interface
Version 1.00
Page 114 of 115
info@acs.com.hk
www.acs.com.hk
void main( void )
{
long 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. */
xBacklightTimer = xTimerCreate(
"BacklightTimer", /* Just a text name, not used by the kernel. */
( 5000 / portTICK_RATE_MS), /* The timer period in ticks. */
pdFALSE, /* The timer is a one-shot timer. */
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. */
);
if( xBacklightTimer == NULL )
{
/* The timer was not created. */
}
else
{
/* Start the timer. No block time is specified, and even if one was
it would be ignored because the scheduler has not yet been
started. */
if( xTimerStart( xBacklightTimer, 0 ) != pdPASS )
{
/* The timer could not be set into the Active state. */
}
}
/* ...
Create tasks here.
... */
/* Starting the scheduler will start the timer running as it has already
been set into the active state. */
xTaskStartScheduler();
Page view 113
1 2 ... 109 110 111 112 113 114 115

Comments to this Manuals

No comments