_RINGBUF Struct Reference
[USART Driver FrameUSART Driver Frame]


Detailed Description

Character device ring buffer structure.

Definition at line 137 of file usart.h.

Data Fields

u_char *volatile rbf_head
 Buffer head pointer.
u_char *volatile rbf_tail
 Buffer tail pointer.
u_charrbf_start
 First buffer address.
u_charrbf_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.


Field Documentation

u_char* volatile _RINGBUF::rbf_head

Buffer head pointer.

Changed by the receiver interrupt.

Definition at line 143 of file usart.h.

u_char* volatile _RINGBUF::rbf_tail

Buffer tail pointer.

Changed by the transmitter interrupt.

Definition at line 149 of file usart.h.

Referenced by UsartRead().

u_char* _RINGBUF::rbf_start

First buffer address.

Definition at line 153 of file usart.h.

Referenced by UsartOpen(), and UsartRead().

u_char* _RINGBUF::rbf_last

Last buffer address.

Definition at line 157 of file usart.h.

Referenced by UsartRead().

size_t _RINGBUF::rbf_siz

Total buffer size.

Zero, if no buffer available.

Definition at line 163 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 169 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 176 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 183 of file usart.h.

Referenced by UsartIOCtl(), and UsartRead().

HANDLE _RINGBUF::rbf_que

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 190 of file usart.h.

Referenced by UsartRead().


The documentation for this struct was generated from the following file:
© 2000-2007 by egnite Software GmbH - visit http://www.ethernut.de/