/*
 * uart0.h
 *
 *  Created on: Sep 21, 2021
 *      Author: thomm
 */

#ifndef PHFETSOS_UART0_H_
#define PHFETSOS_UART0_H_


void uart0_init(void);
void uart0_setup(uint32_t ui32Baud, uint32_t ui32SrcClock);

int uart0_write(const char *pcBuf, uint32_t ui32Len);
int uart0_rx_str(char *pcBuf, uint32_t ui32Len);

unsigned char uart0_rx_byte(void);
void uart0_tx_byte(unsigned char c);

int uart0_rx_bytes_avail(void);
int uart0_tx_bufr_bytes_free(void);
int uart0_rx_bufr_peek(unsigned char ucChar);
void uart0_rx_bufr_flush(void);
void uart0_tx_bufr_flush(bool bDiscard);

void uart0_echo_set(bool bEnable);

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


#endif /* PHFETSOS_UART0_H_ */
