Lines Matching +full:port +full:- +full:line +full:- +full:mapping

5  * SPDX-License-Identifier: Apache-2.0
31 * @brief Lookup table for mapping the baud rate to the macro understood by termios.
43 * @brief Set given termios to defaults appropriate for communicating with serial port devices.
50 * - Not canonical (no line input) in native_tty_termios_defaults_set()
51 * - No signal generation from Ctr+{C|Z..} in native_tty_termios_defaults_set()
52 * - No echoing in native_tty_termios_defaults_set()
54 ter->c_lflag &= ~(ICANON | ISIG | ECHO); in native_tty_termios_defaults_set()
57 * No conversion of newline to carriage return/line feed. in native_tty_termios_defaults_set()
59 ter->c_oflag &= ~(OPOST | ONLCR); in native_tty_termios_defaults_set()
62 ter->c_iflag &= ~(IXON | IXOFF | IXANY); in native_tty_termios_defaults_set()
65 ter->c_cc[VMIN] = 0; in native_tty_termios_defaults_set()
66 ter->c_cc[VTIME] = 0; in native_tty_termios_defaults_set()
69 ter->c_iflag &= ~(IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL); in native_tty_termios_defaults_set()
71 /* - Enable reading data and ignore control lines */ in native_tty_termios_defaults_set()
72 ter->c_cflag |= CREAD | CLOCAL; in native_tty_termios_defaults_set()
104 ter->c_cflag &= ~PARENB; in native_tty_baud_parity_set()
107 ter->c_cflag |= PARENB; in native_tty_baud_parity_set()
108 ter->c_cflag |= PARODD; in native_tty_baud_parity_set()
111 ter->c_cflag |= PARENB; in native_tty_baud_parity_set()
112 ter->c_cflag &= ~PARODD; in native_tty_baud_parity_set()
132 ter->c_cflag &= ~CSTOPB; in native_tty_stop_bits_set()
135 ter->c_cflag |= CSTOPB; in native_tty_stop_bits_set()
174 ter->c_cflag &= ~CSIZE; in native_tty_data_bits_set()
175 ter->c_cflag |= data_bits_to_set; in native_tty_data_bits_set()
190 ERROR("Failed to open serial port %s, errno: %i\n", pathname, errno); in native_tty_open_tty_bottom()
199 /* Structure used to control properties of a serial port */ in native_tty_configure_bottom()
211 native_tty_baud_speed_set(&ter, cfg->baudrate); in native_tty_configure_bottom()
212 native_tty_baud_parity_set(&ter, cfg->parity); in native_tty_configure_bottom()
213 native_tty_stop_bits_set(&ter, cfg->stop_bits); in native_tty_configure_bottom()
214 native_tty_data_bits_set(&ter, cfg->data_bits); in native_tty_configure_bottom()
216 cfg->flow_ctrl = NTB_FLOW_CTRL_NONE; in native_tty_configure_bottom()
221 WARN("Could not set serial port settings, reason: %s\n", strerror(err)); in native_tty_configure_bottom()
234 WARN("Could not read serial port settings, reason: %s\n", strerror(err)); in native_tty_configure_bottom()
242 WARN("Read serial port settings do not match set ones.\n"); in native_tty_configure_bottom()
243 return -1; in native_tty_configure_bottom()
249 WARN("Could not flush serial port\n"); in native_tty_configure_bottom()