User Tools

Site Tools

한국어

moacon:timerevent:index

timerEvent

void timerEvent()

This is the function that is called when a timer's event fires.

The following program demonstrates how to use the startTimerEvent function with the timerEvent function.

#include "moacon500.h"
 
void cmain(void)
{
    startTimerEvent(500);             //Execute timerEvent() every 500ms
    while(1)                          //Run forever
    {
        delay(2000);                  //Pause for 2 seconds
    }
}
 
void timerEvent()
{
    printf("Timer Event Fired!\r\n"); //Print to the debug console
}

Go to MOACON Home

moacon/timerevent/index.txt · Last modified: 2016/10/04 10:15 by COMFILE Technology