TickTimer
System Timer (mwx::periph_ticktimer)
TickTimer
is used internally by TWENET for control purposes and operates implicitly. The timer interval is 1 ms. It defines only the available()
method for writing processing that occurs every 1 ms in the loop()
function based on TickTimer events.Note that it does not necessarily become available at 1 ms intervals.
Due to the contents of the user program or internal interrupt handling of the system, significant delays may occur, and some events may be skipped.
void loop() {
if (TickTimer.available()) {
if ((millis() & 0x3FF) == 0) { // This may not be processed
Serial << '*';
}
}
}
Methods
available()
inline bool available()
Set after the TickTimer
interrupt occurs, and becomes true
in the immediate loop()
execution. It is cleared after the loop()
ends.