Lines Matching +full:host +full:- +full:slave
5 * SPDX-License-Identifier: Apache-2.0
9 /* Note: This is used only for interaction with the host C library, and is therefore exempt of
37 * @retval -1 If no character was available to read
38 * @retval -2 if the stdin is disconnected
47 return -2; in np_uart_stdin_poll_in_bottom()
50 int n = -1; in np_uart_stdin_poll_in_bottom()
62 return -1; in np_uart_stdin_poll_in_bottom()
63 } else if (ready == -1) { in np_uart_stdin_poll_in_bottom()
68 if ((n == -1) || (n == 0)) { in np_uart_stdin_poll_in_bottom()
69 return -1; in np_uart_stdin_poll_in_bottom()
76 * @brief Check if the output descriptor has something connected to the slave side
81 * @retval 1 Something connected to the slave side
89 if (ret == -1) { in np_uart_slave_connected()
103 /* There is now a reader on the slave side */ in np_uart_slave_connected()
110 * Attempt to connect a terminal emulator to the slave side of the pty
111 * If -attach_uart_cmd=<cmd> is provided as a command line option, <cmd> will be
133 * emulator to its slave side.
146 if (master_pty == -1) { in np_uart_open_ptty()
150 if (ret == -1) { in np_uart_open_ptty()
153 ERROR("Could not grant access to the slave PTY side (%i)\n", in np_uart_open_ptty()
157 if (ret == -1) { in np_uart_open_ptty()
160 ERROR("Could not unlock the slave PTY side (%i)\n", err_nbr); in np_uart_open_ptty()
166 ERROR("Error getting slave PTY device name (%i)\n", err_nbr); in np_uart_open_ptty()
170 if (flags == -1) { in np_uart_open_ptty()
178 if (ret == -1) { in np_uart_open_ptty()
181 ERROR("Could not set the master PTY as non-blocking (%i)\n", in np_uart_open_ptty()
196 if (ret == -1) { in np_uart_open_ptty()
206 if (ret == -1) { in np_uart_open_ptty()
221 if (ret == -1) { in np_uart_open_ptty()
223 ERROR("%s: Could not open terminal from the slave side (%i,%s)\n", in np_uart_open_ptty()
227 if (ret == -1) { in np_uart_open_ptty()
229 ERROR("%s: Could not close terminal from the slave side (%i,%s)\n", in np_uart_open_ptty()