/*
 * uart4.h
 *
 *  Created on: Sep 17, 2021
 *      Author: thomm
 */

#ifndef UART4_H_
#define UART4_H_

void uart4_init(void);
void uart4_setup(uint32_t ui32Baud, uint32_t ui32SrcClock);

int uart4_write(const char *pcBuf, uint32_t ui32Len);
int uart4_rx_str(char *pcBuf, uint32_t ui32Len);

unsigned char uart4_rx_byte(void);
void uart4_tx_byte(unsigned char c);

int uart4_rx_bytes_avail(void);
int uart4_tx_bufr_bytes_free(void);
int uart4_rx_bufr_peek(unsigned char ucChar);
void uart4_rx_bufr_flush(void);
void uart4_tx_bufr_flush(bool bDiscard);

void uart4_echo_set(bool bEnable);

void uart4_isr(void);           // plug this into interrupt table in tm4c123gh6pge_startup_ccs.c



#endif /* UART4_H_ */
