ubinos
uart_io.h
1 /*
2  * Copyright (c) 2022 Sung Ho Park and CSOS
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  */
6 
7 #ifndef UBIDRV_UART_IO_H_
8 #define UBIDRV_UART_IO_H_
9 
10 #ifdef __cplusplus
11 extern "C"
12 {
13 #endif
14 
23 #include <ubinos_config.h>
24 #include <ubinos/type.h>
25 #include <ubinos/ubidrv/uart.h>
26 
40 ubi_st_t ubidrv_uart_io_read(int fd, uint8_t *buffer, uint32_t length, uint32_t *read);
41 
59 ubi_st_t ubidrv_uart_io_read_timedms(int fd, uint8_t *buffer, uint32_t length, uint32_t *read, uint32_t timeoutms, uint32_t *remain_timeoutms);
60 
74 ubi_st_t ubidrv_uart_io_write(int fd, uint8_t *buffer, uint32_t length, uint32_t *written);
75 
93 ubi_st_t ubidrv_uart_io_write_timedms(int fd, uint8_t *buffer, uint32_t length, uint32_t *written, uint32_t timeoutms, uint32_t *remain_timeoutms);
94 
102 ubi_st_t ubidrv_uart_io_read_buf_clear(int fd);
103 
115 ubi_st_t ubidrv_uart_io_read_buf_clear_timedms(int fd, uint32_t timeoutms, uint32_t *remain_timeoutms);
116 
124 ubi_st_t ubidrv_uart_io_flush(int fd);
125 
137 ubi_st_t ubidrv_uart_io_flush_timedms(int fd, uint32_t timeoutms, uint32_t *remain_timeoutms);
138 
139 #ifdef __cplusplus
140 }
141 #endif
142 
143 #endif /* UBIDRV_UART_IO_H_ */
ubinos basic data type
ubi_st_t
Definition: type.h:140
UART device driver API.