ChibiOS/HAL 9.0.0
io_buffers_queue Struct Reference

Structure of a generic buffers queue. More...

#include <hal_buffers.h>

Collaboration diagram for io_buffers_queue:
Collaboration graph

Data Fields

threads_queue_t waiting
 Queue of waiting threads.
bool suspended
 Queue suspended state flag.
volatile size_t bcounter
 Active buffers counter.
uint8_t * bwrptr
 Buffer write pointer.
uint8_t * brdptr
 Buffer read pointer.
uint8_t * btop
 Pointer to the buffers boundary.
size_t bsize
 Size of buffers.
size_t bn
 Number of buffers.
uint8_t * buffers
 Queue of buffer objects.
uint8_t * ptr
 Pointer for R/W sequential access.
uint8_t * top
 Boundary for R/W sequential access.
bqnotify_t notify
 Data notification callback.
void * link
 Application defined field.

Detailed Description

Structure of a generic buffers queue.

Definition at line 75 of file hal_buffers.h.

Field Documentation

◆ waiting

◆ suspended

bool io_buffers_queue::suspended

Queue suspended state flag.

Definition at line 83 of file hal_buffers.h.

Referenced by ibqGetFullBufferTimeoutS(), ibqObjectInit(), obqGetEmptyBufferTimeoutS(), and obqObjectInit().

◆ bcounter

volatile size_t io_buffers_queue::bcounter

◆ bwrptr

uint8_t* io_buffers_queue::bwrptr

◆ brdptr

uint8_t* io_buffers_queue::brdptr

◆ btop

uint8_t* io_buffers_queue::btop

◆ bsize

size_t io_buffers_queue::bsize

Size of buffers.

Note
The buffer size must be not lower than sizeof(size_t) + 2 because the first bytes are used to store the used size of the buffer.

Definition at line 106 of file hal_buffers.h.

Referenced by ibqObjectInit(), ibqPostFullBufferI(), ibqReleaseEmptyBufferS(), obqGetEmptyBufferTimeoutS(), obqObjectInit(), obqPostFullBufferS(), obqPutTimeout(), obqReleaseEmptyBufferI(), obqTryFlushI(), and obqWriteTimeout().

◆ bn

size_t io_buffers_queue::bn

Number of buffers.

Definition at line 110 of file hal_buffers.h.

Referenced by ibqObjectInit(), and obqObjectInit().

◆ buffers

uint8_t* io_buffers_queue::buffers

◆ ptr

uint8_t* io_buffers_queue::ptr

Pointer for R/W sequential access.

Note
It is NULL if a new buffer must be fetched from the queue.

Definition at line 119 of file hal_buffers.h.

Referenced by ibqGetFullBufferTimeoutS(), ibqGetTimeout(), ibqObjectInit(), ibqReadTimeout(), ibqReleaseEmptyBufferS(), ibqResetI(), obqFlush(), obqGetEmptyBufferTimeoutS(), obqObjectInit(), obqPostFullBufferS(), obqPutTimeout(), obqResetI(), obqTryFlushI(), and obqWriteTimeout().

◆ top

uint8_t* io_buffers_queue::top

◆ notify

bqnotify_t io_buffers_queue::notify

Data notification callback.

Definition at line 127 of file hal_buffers.h.

Referenced by ibqObjectInit(), ibqReleaseEmptyBufferS(), obqObjectInit(), and obqPostFullBufferS().

◆ link

void* io_buffers_queue::link

Application defined field.

Definition at line 131 of file hal_buffers.h.

Referenced by ibqObjectInit(), and obqObjectInit().