_RINGBUF Struct Reference
[USART Device DriverUSART Device Driver]

#include <dev/usart.h>


Detailed Description

Character device ring buffer structure.


Data Fields

volatile size_t rbf_cnt
 Number of bytes in the buffer.
u_char *volatile rbf_head
 Buffer head pointer.
size_t rbf_hwm
 Buffer high watermark.
u_charrbf_last
 Last buffer address.
size_t rbf_lwm
 Buffer low watermark.
HANDLE rbf_que
 Queue of waiting threads.
size_t rbf_siz
 Total buffer size.
u_charrbf_start
 First buffer address.
u_char *volatile rbf_tail
 Buffer tail pointer.


Field Documentation

volatile size_t _RINGBUF::rbf_cnt

Number of bytes in the buffer.

Changed by receiver and transmitter interrupts.

u_char* volatile _RINGBUF::rbf_head

Buffer head pointer.

Changed by the receiver interrupt.

size_t _RINGBUF::rbf_hwm

Buffer high watermark.

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

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.

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.

size_t _RINGBUF::rbf_siz

Total buffer size.

Zero, if no buffer available.

u_char* volatile _RINGBUF::rbf_tail

Buffer tail pointer.

Changed by the transmitter interrupt.


Generated on Tue Jan 23 21:12:31 2007 for BTnut System Software by doxygen 1.4.7