b.liu | ced8dd0 | 2024-06-28 13:28:29 +0800 | [diff] [blame] | 1 | #ifndef JACANA_SERIALPORT_H |
| 2 | #define JACANA_SERIALPORT_H |
| 3 | |
| 4 | #ifdef __cplusplus |
| 5 | extern "C" { |
| 6 | #endif |
| 7 | |
| 8 | #include <stdint.h> |
| 9 | #include <stdlib.h> |
| 10 | #include "aboot-tiny.h" |
| 11 | |
| 12 | extern aboot_tiny_uart_rx_callback_t rx_callback; |
| 13 | |
| 14 | /*---------------------------------------------------------------------------*/ |
| 15 | int jacana_serialport_init(const char *dev, int baud, |
| 16 | aboot_tiny_uart_rx_callback_t cb); |
| 17 | void jacana_serialport_exit(void); |
| 18 | int jacana_serialport_write(const uint8_t *buf, size_t len); |
| 19 | /*---------------------------------------------------------------------------*/ |
| 20 | |
| 21 | #ifdef __cplusplus |
| 22 | } /* extern "C" */ |
| 23 | #endif |
| 24 | |
| 25 | #endif /* JACANA_SERIALPORT_H */ |