49 #define SOF_CHAR (0x01)
50 #define EOF_CHAR (0x04)
56 #define BAUD_RATE_38400 (12)
66 #define rx_char_ready() (rxbuf.head != rxbuf.tail)
volatile uint8_t tail
Index to first available character in buffer.
uint8_t uart_circ_buf_has_char(tcirc_buf *cbuf)
This will check for a character in the requested buffer.
void uart_init(const unsigned int uart_num, uint32_t module_clk_hz, const uint32_t baud)
Initialize UART.
void uart_send_byte(uint8_t byte)
Send one byte over the uart.
void uart_serial_send_frame(uint8_t cmd, uint8_t payload_length, uint8_t *payload)
This function builds and sends a binary command frame to the ATmega1284p.
void uart_serial_rcv_frame(uint8_t wait_for_ack)
This will receive a frame from the ATmega1284p and parse the incoming data.
volatile uint8_t head
Index to last available character in buffer.
tcirc_buf rxbuf
The RX circular buffer, for storing characters from serial port.
void uart_deinit(void)
Turn off UART for sleep mode.
Circular buffer structure.
void uart_clear_rx_buf(void)
This will clear the RX buffer.
uint8_t uart_get_char_rx(void)
This will wait for a new character from the ATmega1284p and timeout if no new character is received...