I've a question about the chEvtWaitAnyTimeout Function in ChibiOS 2.6. Does the Timeout be fired regularly, or is it postponed every received event.
I want to use to command to drive a protocol stack, so I need also a reset condition when the communication fails.
I’am followed your example for waking up a thread from an interrupt, and my code look now a given below:
Code: Select all
for(;;)
{
/* Warte auf Dateneingang via ONLINE Interface */
u16EvMask = chEvtWaitAnyTimeout(EVENT_MASK(1), MS2ST(RESYNC_TIMEOUT));
if (u16EvMask & EVENT_MASK(1))
{
/* Processing Data */
}
else
/* Reset Interface State */
I want to achieve that the else branch (/* Reset Interface State */) will be called *after* MS2ST(RESYNC_TIMEOUT) ms after the last received character. Is this the correct approach?
regards
logan54