Main Page | Modules | Alphabetical List | Data Structures | Directories | File List | Data Fields | Globals | Related Pages | Examples

_RINGBUF Struct Reference
[USART Driver FrameUSART Driver Frame]

#include <dev/usart.h>


Detailed Description

Character device ring buffer structure.


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.

u_char* volatile _RINGBUF::rbf_tail
 

Buffer tail pointer.

Changed by the transmitter interrupt.

size_t _RINGBUF::rbf_siz
 

Total buffer size.

Zero, if no buffer available.

volatile size_t _RINGBUF::rbf_cnt
 

Number of bytes in the buffer.

Changed by receiver and transmitter interrupts.

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.

size_t _RINGBUF::rbf_hwm
 

Buffer high watermark.

If the number of bytes in the buffer reaches this value, then buffer input is disabled.

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.


© 2000-2006 by egnite Software GmbH - visit http://www.ethernut.de/