blob: 63393cd9af770a022f663830c5461ac321845565 [file] [log] [blame]
b.liuced8dd02024-06-28 13:28:29 +08001#ifndef JACANA_SERIALPORT_H
2#define JACANA_SERIALPORT_H
3
4#ifdef __cplusplus
5extern "C" {
6#endif
7
8#include <stdint.h>
9#include <stdlib.h>
10#include "aboot-tiny.h"
11
12extern aboot_tiny_uart_rx_callback_t rx_callback;
13
14/*---------------------------------------------------------------------------*/
15int jacana_serialport_init(const char *dev, int baud,
16 aboot_tiny_uart_rx_callback_t cb);
17void jacana_serialport_exit(void);
18int 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 */