33#ifndef QF_EQUEUE_CTR_SIZE
34 #define QF_EQUEUE_CTR_SIZE 1U
37#if (QF_EQUEUE_CTR_SIZE == 1U)
39#elif (QF_EQUEUE_CTR_SIZE == 2U)
42 #error QF_EQUEUE_CTR_SIZE defined incorrectly, expected 1U or 2U
61 struct QEvt const * *
const qSto,
62 uint_fast16_t
const qLen);
66 struct QEvt const *
const e,
67 uint_fast16_t
const margin,
68 uint_fast8_t
const qsId);
72 struct QEvt const *
const e,
73 uint_fast8_t
const qsId);
77 uint_fast8_t
const qsId);
QEQueueCtr volatile tail
Offset of where next event will be extracted from the buffer.
static bool QEQueue_isEmpty(QEQueue const *const me)
QEQueueCtr volatile head
Offset to where next event will be inserted into the buffer.
QEQueueCtr end
Offset of the end of the ring buffer from the start of the buffer.
static QEQueueCtr QEQueue_getNFree(QEQueue const *const me)
struct QEvt const * QEQueue_get(QEQueue *const me, uint_fast8_t const qsId)
QEQueueCtr nMin
Minimum number of free events ever in the ring buffer.
QEQueueCtr volatile nFree
Number of free events in the ring buffer.
struct QEvt const ** ring
Pointer to the start of the ring buffer.
void QEQueue_init(QEQueue *const me, struct QEvt const **const qSto, uint_fast16_t const qLen)
void QEQueue_postLIFO(QEQueue *const me, struct QEvt const *const e, uint_fast8_t const qsId)
struct QEvt const *volatile frontEvt
Pointer to event at the front of the queue.
bool QEQueue_post(QEQueue *const me, struct QEvt const *const e, uint_fast16_t const margin, uint_fast8_t const qsId)
static QEQueueCtr QEQueue_getNMin(QEQueue const *const me)