QUEUE_LIB Embedded C library v1.0.0
Data Fields
queue_t Struct Reference

FIFO queue control structure. More...

#include <queue.h>

Data Fields

void * buffer
 
uint16_t element_size
 
uint16_t capacity
 
uint16_t head
 
uint16_t tail
 
uint16_t count
 

Detailed Description

FIFO queue control structure.

The buffer pointer is a generic void* to enable use with different element types. All access operations are byte-based, and no type reinterpretation occurs.

Note
MISRA Deviation DV-QUEUE-001 applies to controlled casts from void*.

Field Documentation

◆ buffer

void* buffer

Pointer to user-provided data buffer.

◆ capacity

uint16_t capacity

Maximum number of elements.

◆ count

uint16_t count

Current number of stored elements.

◆ element_size

uint16_t element_size

Size in bytes of one element.

◆ head

uint16_t head

Read index.

◆ tail

uint16_t tail

Write index.


The documentation for this struct was generated from the following file: