Character device ring buffer structure. More...
#include <dev/usart.h>
Data Fields | |
uint8_t *volatile | rbf_head |
Buffer head pointer. | |
uint8_t *volatile | rbf_tail |
Buffer tail pointer. | |
uint8_t * | rbf_start |
First buffer address. | |
uint8_t * | rbf_last |
Last buffer address. | |
size_t | rbf_siz |
Total buffer size. | |
volatile size_t | rbf_cnt |
Number of bytes in the buffer. | |
size_t | rbf_lwm |
Buffer low watermark. | |
size_t | rbf_hwm |
Buffer high watermark. | |
HANDLE | rbf_que |
Queue of waiting threads. | |
size_t volatile | rbf_blockcnt |
Number of bytes for block-read. | |
uint8_t *volatile | rbf_blockptr |
Address for block-read. |
Character device ring buffer structure.
uint8_t* volatile _RINGBUF::rbf_head |
uint8_t* volatile _RINGBUF::rbf_tail |
First buffer address.
Referenced by EP3_OUT_Callback(), UsartOpen(), and UsartRead().
Last buffer address.
Referenced by EP3_OUT_Callback(), and UsartRead().
size_t _RINGBUF::rbf_siz |
volatile size_t _RINGBUF::rbf_cnt |
Number of bytes in the buffer.
Changed by receiver and transmitter interrupts.
Referenced by EP3_OUT_Callback(), UsartIOCtl(), UsartRead(), and UsartSize().
size_t _RINGBUF::rbf_lwm |
Buffer low watermark.
If the number of bytes in the buffer reaches this value, then the previously disabled buffer input is enabled again.
Referenced by UsartIOCtl(), and UsartRead().
size_t _RINGBUF::rbf_hwm |
Buffer high watermark.
If the number of bytes in the buffer reaches this value, then buffer input is disabled.
Referenced by UsartIOCtl(), and UsartRead().
Queue of waiting threads.
Consuming threads are added to this queue when the buffer is empty. Producing threads are added to this queue when the buffer is full.
Referenced by EP3_OUT_Callback(), UsartClose(), and UsartRead().
size_t volatile _RINGBUF::rbf_blockcnt |
Number of bytes for block-read.
If this is zero, incoming bytes are stored in ringbuffer If this not zero, incoming bytes are stored in rbf_blockptr Changed by the receiver interrupt.
Referenced by UsartRead().
uint8_t* volatile _RINGBUF::rbf_blockptr |
Address for block-read.
If bf_blockbytes is not zero, incoming bytes are stored here Changed by the receiver interrupt.
Referenced by UsartRead().