17 #ifndef Q_BYTE_SIZED_BUFFERS
18 #define Q_BYTE_SIZED_BUFFERS ( 1 )
30 typedef struct _qBSBuffer_s {
32 struct _qBSBuffer_Private_s {
113 const size_t length );
qBool_t qBSBuffer_Setup(qBSBuffer_t *const b, volatile qUINT8_t *pBuffer, const size_t length)
Initialize the Byte-sized buffer.
qBool_t qBSBuffer_Read(qBSBuffer_t *const b, void *dst, const size_t n)
Gets n data from the Byte-sized buffer and removes them.
qBool_t qBSBuffer_Put(qBSBuffer_t *const b, const qUINT8_t bData)
Adds an element of data to the Byte-sized buffer.
qBool_t qBSBuffer_Empty(const qBSBuffer_t *const b)
Query the empty status of the Byte-sized buffer.
size_t qBSBuffer_Count(const qBSBuffer_t *const b)
Query the number of elements in the Byte-sized buffer.
qUINT8_t qBSBuffer_Peek(const qBSBuffer_t *const b)
Looks for one byte from the head of the Byte-sized buffer without removing it.
qBool_t qBSBuffer_Get(qBSBuffer_t *const b, qUINT8_t *dst)
Gets one data-byte from the front of the Byte-sized buffer, and removes it.
qBool_t qBSBuffer_IsFull(const qBSBuffer_t *const b)
Query the full status of the Byte-sized buffer.
qUINT8_t qBool_t
A type to instantiate an OS boolean variable.
Definition qtypes.h:139
uint8_t qUINT8_t
Unsigned integer type with width of exactly 8 bits respectively.
Definition qtypes.h:44
size_t qIndex_t
A type to instantiate an OS index variable. Can store the maximum size of a theoretically possible ob...
Definition qtypes.h:146
A BSBuffer(Byte-sized buffer) object.
Definition qbsbuffers.h:30