TIOCM_LOOP
example:
int fd = /* /dev/ttyS0 */
int status = /* modulator status */
status |= TIOCM_LOOP;
ioctl(fd, TIOCMSET, &status);
/* subsequent 'write()' will send data to 'fd' instead of the remote terminal device */
It's used to enable the serial port loopback mode, that is, the local tx will send messages to the local rx instead of the external device
TIOCM_OUT1
TIOCM_OUT2
It's suitable for the physical characteristics of the terminal equipment, such as interrupt and chip select output
Feature or enhancement
Proposal:
This issue suggests adding new
termios
constants.It's used to enable the serial port loopback mode, that is, the local
tx
will send messages to the localrx
instead of the external deviceIt's suitable for the physical characteristics of the terminal equipment, such as interrupt and chip select output
for example, a library like this uses.
https://github.com/makerbot/pyserial
ref: https://github.com/torvalds/linux/blob/master/include/uapi/asm-generic/termios.h
Has this already been discussed elsewhere?
No response given
Links to previous discussion of this feature:
No response
Linked PRs