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

#ifndef PHFETSOS_UART6_H_
#define PHFETSOS_UART6_H_

// get is blocking

void uart6_init(void);
void uart6_setup(uint32_t ui32Baud, uint32_t ui32SrcClock);

int uart6_write(const char *pcBuf, uint32_t ui32Len);
int uart6_rx_str(char *pcBuf, uint32_t ui32Len);

unsigned char uart6_rx_byte(void);
void uart6_tx_byte(unsigned char c);

int uart6_rx_bytes_avail(void);
int uart6_tx_bufr_bytes_free(void);
int uart6_rx_bufr_peek(unsigned char ucChar);
void uart6_rx_bufr_flush(void);
void uart6_tx_bufr_flush(bool bDiscard);

void uart6_echo_set(bool bEnable);

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



#endif /* PHFETSOS_UART6_H_ */
