You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Add TIOCM_OUT1, TIOCM_OUT2, and TIOCM_LOOP constants to termios #127335
TIOCM_LOOP
TIOCM_OUT1
TIOCM_OUT2
example:
import array
import fcntl
import termios
f = open('/dev/ttyS0', 'r')
buf = array.array('h', [0])
# return a mask
fcntl.ioctl(f, termios.TIOCMGET, buf)
# some mask operation
# check if the target device has this flag activated
if buf[0] & TIOCM_OUT1: ...
if /* more compare */: ...
It's suitable for the physical characteristics of the terminal equipment, such as interrupt and chip select output
Which constants? What do they do? Why are you proposing to add these flags? Always explain proposed changes in detail.
You did not follow up this remark. Moreover, the example code in the OP is C code. Can you provide Python examples of how these are intended to be used?
Which constants? What do they do? Why are you proposing to add these flags? Always explain proposed changes in detail.
You did not follow up this remark. Moreover, the example code in the OP is C code. Can you provide Python examples of how these are intended to be used?
I mistakenly thought I had modified it, but I hadn't :(. But now, I have changed it.
Activity
[-]Add latest termios constants[/-][+]Add `TIOCM_OUT1`, `TIOCM_OUT2`, and `TIOCM_LOOP` constants to `termios`[/+]erlend-aasland commentedon Nov 29, 2024
Which constants? What do they do? Why are you proposing to add these flags? Always explain proposed changes in detail.
erlend-aasland commentedon Jan 4, 2025
You did not follow up this remark. Moreover, the example code in the OP is C code. Can you provide Python examples of how these are intended to be used?
rruuaanng commentedon Jan 5, 2025
I mistakenly thought I had modified it, but I hadn't :(. But now, I have changed it.