-
-
Notifications
You must be signed in to change notification settings - Fork 32.4k
Open
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement
Description
Feature or enhancement
Proposal:
This issue suggests adding new termios
constants.
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
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
Agent-Hellboy, Eclips4 and ZeroIntensity
Metadata
Metadata
Assignees
Labels
extension-modulesC modules in the Modules dirC modules in the Modules dirtype-featureA feature request or enhancementA feature request or enhancement