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. |
uint8_t* volatile _RINGBUF::rbf_head |
uint8_t* volatile _RINGBUF::rbf_tail |
Buffer tail pointer.
Changed by the transmitter interrupt.
Definition at line 152 of file usart.h.
Referenced by UsartRead().
First buffer address.
Definition at line 156 of file usart.h.
Referenced by UsartOpen(), and UsartRead().
size_t _RINGBUF::rbf_siz |
Total buffer size.
Zero, if no buffer available.
Definition at line 166 of file usart.h.
Referenced by UsartIOCtl(), and UsartRead().
volatile size_t _RINGBUF::rbf_cnt |
Number of bytes in the buffer.
Changed by receiver and transmitter interrupts.
Definition at line 172 of file usart.h.
Referenced by 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.
Definition at line 179 of file usart.h.
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.
Definition at line 186 of file usart.h.
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.
Definition at line 193 of file usart.h.
Referenced by UsartClose(), and UsartRead().