#include <inttypes.h>
Go to the source code of this file.
Data Structures | |
| struct | queue_t |
| Queue data structure. More... | |
Defines | |
| #define | Q_OK 0 |
| #define | Q_FULL 1 |
| #define | Q_UNDERFLOW 2 |
| #define | Q_EMPTY 3 |
Functions | |
| void | mos_queue_init (queue_t *q, uint8_t *buffer, uint8_t size) |
| Init the queue. | |
| uint8_t | mos_queue_add (queue_t *q, uint8_t byte) |
| Add a new byte to the tail of the queue. | |
| uint8_t | mos_queue_length (queue_t *q) |
| Return the length of a given queue. | |
| uint8_t | mos_queue_remove (queue_t *q, uint8_t *byte) |
| Remove the first byte from the head of the queue. | |
| uint8_t | mos_queue_dump (queue_t *q, uint8_t dumpNum) |
| Dump specific number of bytes out from the buffer. | |
| uint8_t | mos_queue_peek (queue_t *q, uint8_t index, uint8_t *byte) |
| "peek" one byte from the queue. | |
| void | mos_queue_cleanup (queue_t *q) |
| Empty the queue. | |
Definition in file queue.h.
|
||||||||||||
|
|
|
|
|
|
||||||||||||
|
These bytes are removed from the buffer
|
|
||||||||||||||||
|
Inits a new byte queue. The elements of the queue will be stored in buffer.
|
|
|
|
|
||||||||||||||||
|
Doesn't delete the byte, just looks
|
|
||||||||||||
|
|
1.4.6