# ByteQueue

Provides a FIFO queue of type `uint8`.

```c
#include "ByteQueue.h"

// declare structure
tsQueue sQue;
uint8 au8FIFO[128];

// init que
QUEUE_vInit(sQue, au8FIFO, sizeof(au8FIFO));

// if que is empty
if (QUEUE_bEmpty(sQue)) { .. }

// if que is full
if (QUEUE_bFull(sQue)) { .. }

// remove item
if (!QUEUE_bEmpty(sQue)) {
    int16 i16Result = (int16)QUEUE_u8RemoveItem(
            sQue, // the queue 
            TRUE  // block interrupt while removing item.
            );
    uint16 u16ct = QUEUE_u16Count(sQue);
}

// add item
if (!QUEUE_bFull(sQue)) {
    QUEUE_vAddItem(sQue, 'a', FALSE);
}
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://sdk.twelite.info/en/utils-ref/bytequeue.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
