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

#ifndef UART2_H_
#define UART2_H_

void uart2_init(void);
void uart2_setup(uint32_t ui32Baud, uint32_t ui32SrcClock);

int uart2_write(const char *pcBuf, uint32_t ui32Len);
int uart2_rx_str(char *pcBuf, uint32_t ui32Len);

unsigned char uart2_rx_byte(void);
void uart2_tx_byte(unsigned char c);

int uart2_rx_bytes_avail(void);
int uart2_tx_bufr_bytes_free(void);
int uart2_rx_bufr_peek(unsigned char ucChar);
void uart2_rx_bufr_flush(void);
void uart2_tx_bufr_flush(bool bDiscard);

void uart2_echo_set(bool bEnable);

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




#endif /* UART2_H_ */
