15b5d068ff363b0eab9037e249706bd1347f25a3
[platform/core/api/peripheral-io.git] / include / peripheral_gdbus_uart.h
1 /*
2  * Copyright (c) 2016-2017 Samsung Electronics Co., Ltd.
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  */
16 #ifndef __PERIPHERAL_GDBUS_UART_H_
17 #define __PERIPHERAL_GDBUS_UART_H_
18
19 void uart_proxy_init(void);
20 void uart_proxy_deinit();
21
22 int peripheral_gdbus_uart_open(peripheral_uart_h uart, int port);
23 int peripheral_gdbus_uart_close(peripheral_uart_h uart);
24 int peripheral_gdbus_uart_set_baud_rate(peripheral_uart_h uart, peripheral_uart_baud_rate_e baud);
25 int peripheral_gdbus_uart_set_byte_size(peripheral_uart_h uart, peripheral_uart_byte_size_e byte_size);
26 int peripheral_gdbus_uart_set_parity(peripheral_uart_h uart, peripheral_uart_parity_e parity);
27 int peripheral_gdbus_uart_set_stop_bits(peripheral_uart_h uart, peripheral_uart_stop_bits_e stop_bits);
28 int peripheral_gdbus_uart_set_flow_control(peripheral_uart_h uart, bool xonxoff, bool rtscts);
29 int peripheral_gdbus_uart_read(peripheral_uart_h uart, uint8_t *data, int length);
30 int peripheral_gdbus_uart_write(peripheral_uart_h uart, uint8_t *data, int length);
31
32 #endif /* __PERIPHERAL_GDBUS_UART_H_ */