Nut/OS  4.10.3
API Reference
_RINGBUF Struct Reference

Character device ring buffer structure. More...

#include <dev/usart.h>

Collaboration diagram for _RINGBUF:

Data Fields

uint8_t *volatile rbf_head
 Buffer head pointer.
uint8_t *volatile rbf_tail
 Buffer tail pointer.
uint8_trbf_start
 First buffer address.
uint8_trbf_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.

Detailed Description

Character device ring buffer structure.

Definition at line 140 of file usart.h.


Field Documentation

Buffer head pointer.

Changed by the receiver interrupt.

Definition at line 146 of file usart.h.

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().

Last buffer address.

Definition at line 160 of file usart.h.

Referenced by UsartRead().

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().

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().

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().


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