6 // duration constants which can be returned from start(), event() or timeout()
7 #define DURATION_IGNORE -2 // when returned from event() does not update the current timeout
8 #define DURATION_NEVER -1 // timeout() will not be called, only event()
9 #define DURATION_IMMEDIATELY 0 // timeout() will be called each loop
12 // Called at the beginning of setup() so the device can configure IO pins etc
14 // start() is called at the end of setup() and returns the number of ms when to call timeout()
16 // An event was fired, take action and return new duration for timeout call
18 // The duration has passed so take appropriate action and return a new duration, this function should never return DURATION_IGNORE
24 int8_t core
; // 0 = UART core or 1 = loopcore
27 void devicesRegister(device_affinity_t
*devices
, uint8_t count
);
30 void devicesUpdate(unsigned long now
);
31 void devicesTriggerEvent();