"Ticker" Active Object class
- Details
QTicker is a QActive subclass specialized to process QF system clock tick at a specified tick rate. Placing system clock tick processing in an active object allows you to remove the non-deterministic QTIMEEVT_TICK_X() processing from the interrupt level and move it into the thread-level, where you can prioritize it as low as you wish.
- Backward Traceability
- Usage
The following example illustrates use of QTicker active objects.
- Attention
- The QTicker active objects must be started without any queue buffer and without any stack (see QActive_start() calls in the code below).
extern QActive *
const the_Ticker0;
extern QActive *
const the Ticker1;
void SysTick_Handler(void) {
. . .
. . .
}
void Timer0A_IRQHandler(void) {
. . .
. . .
}
main () {
. . .
1U,
0, 0, 0, 0, 0);
2U,
0, 0, 0, 0, 0);
. . .
}
#define QTICKER_TRIG(ticker_, sender_)
Asynchronously trigger the QTicker AO to perform tick processing.
Active object class (based on the QHsm implementation strategy)
void QActive_start(QActive *const me, QPrioSpec const prioSpec, QEvtPtr *const qSto, uint_fast16_t const qLen, void *const stkSto, uint_fast16_t const stkSize, void const *const par)
"Ticker" Active Object class
void QTicker_ctor(QTicker *const me, uint_fast8_t const tickRate)
Definition at line 694 of file qp.h.