38#ifndef QF_EQUEUE_CTR_SIZE
39 #define QF_EQUEUE_CTR_SIZE 1U
42#if (QF_EQUEUE_CTR_SIZE == 1U)
44#elif (QF_EQUEUE_CTR_SIZE == 2U)
47 #error "QF_EQUEUE_CTR_SIZE defined incorrectly, expected 1U or 2U"
112 struct QEvt const * *
const qSto,
113 uint_fast16_t
const qLen);
116bool QEQueue_post(
QEQueue *
const me,
117 struct QEvt const *
const e,
118 uint_fast16_t
const margin,
119 uint_fast8_t
const qsId);
122void QEQueue_postLIFO(
QEQueue *
const me,
123 struct QEvt const *
const e,
124 uint_fast8_t
const qsId);
128 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)
Find out if the queue is empty.
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)
Obtain the number of free entries still available in the queue.
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)
struct QEvt const *volatile frontEvt
Pointer to event at the front of the queue.
static QEQueueCtr QEQueue_getNMin(QEQueue const *const me)
Obtain the minimum number of free entries ever in the queue (a.k.a. "low-watermark")