42 #define F_CPU 16000000UL     58 #include <util/atomic.h>    59 #include <util/setbaud.h>    85 #define UARTAVR_VERSION_MAJOR 0    89 #define UARTAVR_VERSION_MINOR 3    93 #define UARTAVR_VERSION_PATCH 0   108 #define CR_PRINTF "\r"   233 void put_noi_UART(
char c);
   234 void puts_noi_UART(
const char *s);
   294 #pragma GCC diagnostic push   295 #pragma GCC diagnostic ignored "-Wunused-variable"   305 static FILE uartavr_stdout =
   307 #pragma GCC diagnostic pop void(* buff_empty)(void)
Definition: uart.h:136
 
uint8_t full
Definition: uart.h:131
 
size_t items
Definition: uart.h:130
 
uint8_t gets_UART(char *s)
Get all data from the circular buffer. 
Definition: uart.c:229
 
uint8_t cp_push(char c, enum DIR_BUFFS dir)
Put one byte in the circular buffer. 
 
void(* rx_callback)(void)
Definition: uart.h:133
 
char buff[BUFFSIZE]
Definition: uart.h:124
 
void get_direction_buffer(enum DIR_BUFFS dir, struct DirBuff **dbuff)
Get a direction buffer struct from CBuffer. 
Definition: uart.c:50
 
char * start_ptr
Definition: uart.h:126
 
void put_UART(const char c)
Send a single character. 
Definition: uart.c:202
 
void cb_init(void)
Initializes the circular buffer structure. 
Definition: uart.c:34
 
char * outpos_ptr
Definition: uart.h:129
 
#define BUFFSIZE
The buffer size for the RX and TX buffers. 
Definition: uart.h:113
 
char * inpos_ptr
Definition: uart.h:128
 
void init_UART(const struct UARTcfg *cfg)
Initialize the UART on the microcontroller. 
Definition: uart.c:151
 
uint8_t cb_pop(char *c, enum DIR_BUFFS dir)
Get one byte from the circular buffer. 
Definition: uart.c:63
 
uint8_t tx
Definition: uart.h:165
 
A struct to configure the UART. 
Definition: uart.h:164
 
This holds the circular buffers. 
Definition: uart.h:150
 
void puts_UART(const char *s)
Write a string to the UART buffer. 
Definition: uart.c:208
 
void(* tx_callback)(void)
Definition: uart.h:135
 
char * end_ptr
Definition: uart.h:127
 
Presenting a circular buffer. 
Definition: uart.h:123
 
DIR_BUFFS
Identifier for direction buffer. 
Definition: uart.h:142
 
void init_uart_cfg(struct UARTcfg *cfg)
Init a cfg struct with the default values. 
Definition: uart.c:139
 
int puts_printf_UART(char c, FILE *stream)
The FILE stream method for uartavr_stdout. 
Definition: uart.c:247
 
uint8_t rx
Definition: uart.h:166
 
uint8_t get_UART(char *s)
Retrieve one char from the buffer. 
Definition: uart.c:221