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)
void uart_serial_rcv_frame(uint8_t wait_for_it)
This will receive a frame from the ATmega1284p and parse the incoming data.
void uart_send_byte(uint8_t byte)
Send one byte over the uart.
void uart_clear_rx_buf(void)
This will clear the RX buffer.
void uart_deinit(void)
Turn off UART for sleep mode.
volatile uint8_t tail
Index to first available character in buffer.
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.
uint8_t uart_circ_buf_has_char(tcirc_buf *cbuf)
This will check for a character in the requested buffer.
volatile uint8_t head
Index to last available character in buffer.
void uart_init(void)
Initialize UART to 38400 Baud Rate and only enable UART for transmission.
Circular buffer structure.
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...
tcirc_buf rxbuf
The RX circular buffer, for storing characters from serial port.