Hi guys, can I code the LED to blink slowly? I mean when I set a timer for LED to turn off after 5 second, the LED suppose ON for 5 seconds before it OFF. It is possible to achieve that using osal_start_timerEx() ??
This thread has been locked.
If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.
Hi guys, can I code the LED to blink slowly? I mean when I set a timer for LED to turn off after 5 second, the LED suppose ON for 5 seconds before it OFF. It is possible to achieve that using osal_start_timerEx() ??
I made some mistake in example code. You can revise the following red part.
void toggle(uint8 *status)
{
if (*status==0)
{
P0_0=1;
P0_1=1;
*status=1;
}else{
P0_0=0;
P0_1=0;
*status=0;
}
}
if ( events & LED_BLINK )
{
toggle(&led_status);
osal_start_timerEx( keyfobapp_TaskID, LED_BLINK, LED_DELAY );
return ( events & LED_BLINK );
}