1 /*
2  * Copyright (c) 2023, Nordic Semiconductor ASA
3  *
4  * SPDX-License-Identifier: Apache-2.0
5  *
6  * "Bottom" of native ptty uart driver
7  * When built with the native_simulator this will be built in the runner context,
8  * that is, with the host C library, and with the host include paths.
9  */
10 
11 #ifndef DRIVERS_SERIAL_UART_NATIVE_PTTY_BOTTOM_H
12 #define DRIVERS_SERIAL_UART_NATIVE_PTTY_BOTTOM_H
13 
14 #include <stdbool.h>
15 #include <stdint.h>
16 
17 #ifdef __cplusplus
18 extern "C" {
19 #endif
20 
21 /* Note: None of these functions are public interfaces. But internal to the native ptty driver */
22 
23 int np_uart_stdin_poll_in_bottom(int in_f, unsigned char *p_char);
24 int np_uart_slave_connected(int fd);
25 int np_uart_open_ptty(const char *uart_name, const char *auto_attach_cmd,
26 		      bool do_auto_attach, bool wait_pts);
27 int np_uart_ptty_get_stdin_fileno(void);
28 int np_uart_ptty_get_stdout_fileno(void);
29 
30 #ifdef __cplusplus
31 }
32 #endif
33 
34 #endif /* DRIVERS_SERIAL_UART_NATIVE_PTTY_BOTTOM_H */
35