32#ifndef QF_EQUEUE_CTR_SIZE
33 #define QF_EQUEUE_CTR_SIZE 1U
36#if (QF_EQUEUE_CTR_SIZE == 1U)
38#elif (QF_EQUEUE_CTR_SIZE == 2U)
41 #error QF_EQUEUE_CTR_SIZE defined incorrectly, expected 1U or 2U
59void QEQueue_init(
QEQueue *
const me,
60 struct QEvt const * *
const qSto,
61 uint_fast16_t
const qLen);
64bool QEQueue_post(
QEQueue *
const me,
65 struct QEvt const *
const e,
66 uint_fast16_t
const margin,
67 uint_fast8_t
const qsId);
70void QEQueue_postLIFO(
QEQueue *
const me,
71 struct QEvt const *
const e,
72 uint_fast8_t
const qsId);
76 uint_fast8_t
const qsId);
79uint16_t QEQueue_getFree(
QEQueue const *
const me);
82uint16_t QEQueue_getUse(
QEQueue const *
const me);
85uint16_t QEQueue_getMin(
QEQueue const *
const me);
88bool QEQueue_isEmpty(
QEQueue const *
const me);
uint16_t QEQueueCtr
The data type to store the ring-buffer counters.
QEQueueCtr nFree
Number of free events in the ring buffer.
QEQueueCtr end
Offset of the end of the ring buffer from the start of the buffer.
struct QEvt const * frontEvt
Pointer to event at the front of the queue.
QEQueueCtr nMin
Minimum number of free events ever in the ring buffer.
QEQueueCtr tail
Offset of where next event will be extracted from the buffer.
struct QEvt const ** ring
Pointer to the start of the ring buffer.
QEQueueCtr head
Offset to where next event will be inserted into the buffer.