![]() |
ChibiOS/RT Architecture - Reference Manual - Guides |
Queues macros and structures. More...
Go to the source code of this file.
Data Structures | |
| struct | GenericQueue |
| Generic I/O queue structure. More... | |
Defines | |
| #define | Q_OK RDY_OK |
| Returned by the queue functions if the operation is successful. | |
| #define | Q_TIMEOUT RDY_TIMEOUT |
| Returned by the queue functions if a timeout occurs. | |
| #define | Q_RESET RDY_RESET |
| Returned by the queue functions if the queue is reset. | |
| #define | Q_EMPTY -3 |
| Returned by the queue functions if the queue is empty. | |
| #define | Q_FULL -4 |
| Returned by the queue functions if the queue is full. | |
| #define | chQSize(q) ((q)->q_top - (q)->q_buffer) |
| Returns the queue's buffer size. | |
| #define | chQSpace(q) chSemGetCounterI(&(q)->q_sem) |
| Queue space. | |
| #define | chIQIsEmpty(q) ((bool_t)(chQSpace(q) <= 0)) |
Evaluates to TRUE if the specified Input Queue is empty. | |
| #define | chIQIsFull(q) ((bool_t)(chQSpace(q) >= chQSize(q))) |
Evaluates to TRUE if the specified Input Queue is full. | |
| #define | chIQGet(iqp) chIQGetTimeout(iqp, TIME_INFINITE) |
| Input queue read. | |
| #define | _INPUTQUEUE_DATA(name, buffer, size, inotify) |
| Data part of a static input queue initializer. | |
| #define | INPUTQUEUE_DECL(name, buffer, size, inotify) InputQueue name = _INPUTQUEUE_DATA(name, buffer, size, inotify) |
| Static input queue initializer. | |
| #define | chOQIsEmpty(q) ((bool_t)(chQSpace(q) >= chQSize(q))) |
Evaluates to TRUE if the specified Output Queue is empty. | |
| #define | chOQIsFull(q) ((bool_t)(chQSpace(q) <= 0)) |
Evaluates to TRUE if the specified Output Queue is full. | |
| #define | chOQPut(oqp, b) chOQPutTimeout(oqp, b, TIME_INFINITE) |
| Output queue write. | |
| #define | _OUTPUTQUEUE_DATA(name, buffer, size, onotify) |
| Data part of a static output queue initializer. | |
| #define | OUTPUTQUEUE_DECL(name, buffer, size, onotify) InputQueue name = _OUTPUTQUEUE_DATA(name, buffer, size, onotify) |
| Static output queue initializer. | |
Typedefs | |
| typedef void(* | qnotify_t )(void) |
| Queue notification callback type. | |
| typedef GenericQueue | InputQueue |
| Input queue structure. | |
| typedef GenericQueue | OutputQueue |
| Output queue structure. | |
Functions | |
| void | chIQInit (InputQueue *iqp, uint8_t *bp, size_t size, qnotify_t infy) |
| Initializes an input queue. | |
| void | chIQResetI (InputQueue *iqp) |
| Resets an input queue. | |
| msg_t | chIQPutI (InputQueue *iqp, uint8_t b) |
| Input queue write. | |
| msg_t | chIQGetTimeout (InputQueue *iqp, systime_t time) |
| Input queue read with timeout. | |
| size_t | chIQReadTimeout (InputQueue *iqp, uint8_t *bp, size_t n, systime_t time) |
| Input queue read with timeout. | |
| void | chOQInit (OutputQueue *oqp, uint8_t *bp, size_t size, qnotify_t onfy) |
| Initializes an output queue. | |
| void | chOQResetI (OutputQueue *oqp) |
| Resets an output queue. | |
| msg_t | chOQPutTimeout (OutputQueue *oqp, uint8_t b, systime_t time) |
| Output queue write with timeout. | |
| msg_t | chOQGetI (OutputQueue *oqp) |
| Output queue read. | |
| size_t | chOQWriteTimeout (OutputQueue *oqp, const uint8_t *bp, size_t n, systime_t time) |
| Output queue write with timeout. | |
Queues macros and structures.
I/O
Definition in file chqueues.h.
1.7.1