swissChili | 56cf817 | 2022-07-30 18:47:48 -0700 | [diff] [blame] | 1 | #include "serial.h" |
| 2 | #include "kint.h" |
| 3 | |
| 4 | extern int uart_tx_one_char(char byte); |
| 5 | |
| 6 | /** |
| 7 | * @param c Pointer to input |
| 8 | * @returns OK or not |
| 9 | */ |
| 10 | extern bool uart_rx_one_char(char *c); |
| 11 | |
| 12 | /** |
| 13 | * @param uart_no UART number |
| 14 | */ |
| 15 | extern void uart_tx_flush(uchar uart_no); |
| 16 | |
| 17 | void init_serial() |
| 18 | { |
| 19 | } |
| 20 | |
| 21 | void serial_put(char byte) |
| 22 | { |
| 23 | uart_tx_one_char(byte); |
| 24 | } |
| 25 | |
| 26 | void serial_write(char *string) |
| 27 | { |
| 28 | while (*string) |
| 29 | { |
| 30 | serial_put(*string++); |
| 31 | } |
| 32 | } |