|
avruart
|
Presenting a circular buffer. More...
#include <uart.h>
Data Fields | |
| char | buff [BUFFSIZE] |
| char * | start_ptr |
| char * | end_ptr |
| char * | inpos_ptr |
| char * | outpos_ptr |
| size_t | items |
| uint8_t | full |
| void(* | rx_callback )(void) |
| void(* | tx_callback )(void) |
| void(* | buff_empty )(void) |
Presenting a circular buffer.
The buffer is used by this UART implementation to store data that will either be send or was received. This way we can use UART interrupts and the write or read functions are not blocking.
| char buff[BUFFSIZE] |
The buffer holding the data that should be send or was received
| void(* buff_empty) (void) |
Callback when buff is empty
| char* end_ptr |
A pointer to theend of the buffer
| uint8_t full |
Indicates if the buffer is full, meaning BUFFSIZE number of items are stored
| char* inpos_ptr |
The write pointer position
| size_t items |
Number of items in the buffer
| char* outpos_ptr |
The read pointer position
| void(* rx_callback) (void) |
A callback function you can use to get notified if a byte was received
| char* start_ptr |
A pointer to the start of the buffer
| void(* tx_callback) (void) |
Callback when a byte was sent
1.8.12