2014-07-09 08:47:59 +00:00
|
|
|
/* uart.h - UART initialization & communication */
|
|
|
|
|
|
|
|
#ifndef UART_H
|
|
|
|
#define UART_H
|
|
|
|
|
|
|
|
#include <stdint.h>
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Initialize UART0.
|
|
|
|
*/
|
|
|
|
void uart_init();
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Transmit a byte via UART0.
|
2018-11-03 00:51:23 +00:00
|
|
|
* gU8 Byte: byte to send.
|
2014-07-09 08:47:59 +00:00
|
|
|
*/
|
2018-11-03 00:51:23 +00:00
|
|
|
void uart_putc(gU8 byte);
|
2014-07-09 08:47:59 +00:00
|
|
|
|
|
|
|
/*
|
|
|
|
* print a string to the UART one character at a time
|
|
|
|
* const char *str: 0-terminated string
|
|
|
|
*/
|
|
|
|
void uart_puts(const char *str);
|
|
|
|
|
|
|
|
#endif // #ifndef UART_H
|