def EVIOCGLED(len): return _IOC(_IOC_READ, 69, 0x19, len) # get all LEDs */
def EVIOCGBIT(ev, len): return _IOC(_IOC_READ, 69, 0x20 + ev, len) # get event bits */
def EVIOCGSW(len): return _IOC(_IOC_READ, 69, 0x1b, len) # get all switch states */
SHORT = "h" USHORT = "H" SHORT4 = "hhhh" # Initialize the ioctl constants from pycopia.OS.Linux.IOCTL import _IOC, _IO, _IOW, _IOR, _IOC_READ # taken from /usr/include/linux/input.h EVIOCGVERSION = _IOR(69, 0x01, INT) # get driver version */ EVIOCGID = _IOR(69, 0x02, SHORT4) # get device ID */ EVIOCGREP = _IOR(69, 0x03, INT2) # get repeat settings */ EVIOCSREP = _IOW(69, 0x03, INT2) # set repeat settings */ EVIOCGKEYCODE = _IOR(69, 0x04, INT2) # get keycode */ EVIOCSKEYCODE = _IOW(69, 0x04, INT2) # set keycode */ EVIOCGKEY = _IOR(69, 0x05, INT2) # get key value */ EVIOCGNAME = _IOC(_IOC_READ, 69, 0x06, 255)# get device name */ EVIOCRMFF = _IOW(69, 0x81, INT) # Erase a force effect */ EVIOCSGAIN = _IOW(69, 0x82, USHORT) # Set overall gain */ EVIOCSAUTOCENTER= _IOW(69, 0x83, USHORT) # Enable or disable auto-centering */ EVIOCGEFFECTS = _IOR(69, 0x84, INT) # Report number of effects playable at the same time */ # XXX #EVIOCGBIT(ev,len)= _IOC(_IOC_READ, 69, 0x20 + ev, len) # get event bits */ #EVIOCGABS(abs) = _IOR(69, 0x40 + abs, "iiiii") # get abs value/limits */ #EVIOCSFF = _IOC(_IOC_WRITE, 69, 0x80, sizeof(struct ff_effect)) # send a force effect to a force feedback device */ # these take parameters. def EVIOCGBIT(ev, len): return _IOC(_IOC_READ, 69, 0x20 + ev, len) # get event bits */ def EVIOCGABS(abs): return _IOR(69, 0x40 + abs, INT5) # get abs value/limits */
SHORT = "h" USHORT = "H" SHORT4 = "hhhh" # Initialize the ioctl constants from pycopia.OS.Linux.IOCTL import _IOC, _IO, _IOW, _IOR, _IOC_READ # taken from /usr/include/linux/input.h EVIOCGVERSION = _IOR(69, 0x01, INT) # get driver version */ EVIOCGID = _IOR(69, 0x02, SHORT4) # get device ID */ EVIOCGREP = _IOR(69, 0x03, INT2) # get repeat settings */ EVIOCSREP = _IOW(69, 0x03, INT2) # set repeat settings */ EVIOCGKEYCODE = _IOR(69, 0x04, INT2) # get keycode */ EVIOCSKEYCODE = _IOW(69, 0x04, INT2) # set keycode */ EVIOCGKEY = _IOR(69, 0x05, INT2) # get key value */ EVIOCGNAME = _IOC(_IOC_READ, 69, 0x06, 255) # get device name */ EVIOCRMFF = _IOW(69, 0x81, INT) # Erase a force effect */ EVIOCSGAIN = _IOW(69, 0x82, USHORT) # Set overall gain */ EVIOCSAUTOCENTER = _IOW(69, 0x83, USHORT) # Enable or disable auto-centering */ EVIOCGEFFECTS = _IOR( 69, 0x84, INT) # Report number of effects playable at the same time */ # XXX #EVIOCGBIT(ev,len)= _IOC(_IOC_READ, 69, 0x20 + ev, len) # get event bits */ #EVIOCGABS(abs) = _IOR(69, 0x40 + abs, "iiiii") # get abs value/limits */ #EVIOCSFF = _IOC(_IOC_WRITE, 69, 0x80, sizeof(struct ff_effect)) # send a force effect to a force feedback device */ # these take parameters. def EVIOCGBIT(ev, len):
def EVIOCGBIT(evtype, len=255): return _IOC(_IOC_READ, 69, 0x20 + evtype, len) # get event bits */
SHORT4 = "hhhh" SIZEOF_INT2 = struct.calcsize(INT2) # Initialize the ioctl constants from pycopia.OS.Linux.IOCTL import _IOC, _IO, _IOW, _IOR, _IOC_READ # taken from /usr/include/linux/input.h EVIOCGVERSION = _IOR(69, 0x01, INT) # get driver version */ EVIOCGID = _IOR(69, 0x02, SHORT4) # get device ID */ EVIOCGREP = _IOR(69, 0x03, INT2) # get repeat settings */ EVIOCSREP = _IOW(69, 0x03, INT2) # set repeat settings */ EVIOCGKEYCODE = _IOR(69, 0x04, INT2) # get keycode */ EVIOCSKEYCODE = _IOW(69, 0x04, INT2) # set keycode */ EVIOCGKEY = _IOR(69, 0x05, INT2) # get key value */ EVIOCGNAME = _IOC(_IOC_READ, 69, 0x06, 255) # get device name */ EVIOCGPHYS = _IOC(_IOC_READ, 69, 0x07, 255) # get physical location */ EVIOCGUNIQ = _IOC(_IOC_READ, 69, 0x08, 255) # get unique identifier */ EVIOCRMFF = _IOW(69, 0x81, INT) # Erase a force effect */ EVIOCSGAIN = _IOW(69, 0x82, USHORT) # Set overall gain */ EVIOCSAUTOCENTER = _IOW(69, 0x83, USHORT) # Enable or disable auto-centering */ EVIOCGEFFECTS = _IOR( 69, 0x84, INT) # Report number of effects playable at the same time */ EVIOCGRAB = _IOW(69, 0x90, INT) # Grab/Release device */ # these take parameters. def EVIOCGBIT(evtype, len=255): return _IOC(_IOC_READ, 69, 0x20 + evtype, len) # get event bits */
SHORT4 = "hhhh" SIZEOF_INT2 = struct.calcsize(INT2) # Initialize the ioctl constants from pycopia.OS.Linux.IOCTL import _IOC, _IO, _IOW, _IOR, _IOC_READ # taken from /usr/include/linux/input.h EVIOCGVERSION = _IOR(69, 0x01, INT) # get driver version */ EVIOCGID = _IOR(69, 0x02, SHORT4) # get device ID */ EVIOCGREP = _IOR(69, 0x03, INT2) # get repeat settings */ EVIOCSREP = _IOW(69, 0x03, INT2) # set repeat settings */ EVIOCGKEYCODE = _IOR(69, 0x04, INT2) # get keycode */ EVIOCSKEYCODE = _IOW(69, 0x04, INT2) # set keycode */ EVIOCGKEY = _IOR(69, 0x05, INT2) # get key value */ EVIOCGNAME = _IOC(_IOC_READ, 69, 0x06, 255)# get device name */ EVIOCGPHYS = _IOC(_IOC_READ, 69, 0x07, 255)# get physical location */ EVIOCGUNIQ = _IOC(_IOC_READ, 69, 0x08, 255)# get unique identifier */ EVIOCRMFF = _IOW(69, 0x81, INT) # Erase a force effect */ EVIOCSGAIN = _IOW(69, 0x82, USHORT) # Set overall gain */ EVIOCSAUTOCENTER= _IOW(69, 0x83, USHORT) # Enable or disable auto-centering */ EVIOCGEFFECTS = _IOR(69, 0x84, INT) # Report number of effects playable at the same time */ EVIOCGRAB = _IOW(69, 0x90, INT) # Grab/Release device */ # these take parameters. def EVIOCGBIT(evtype, len=255): return _IOC(_IOC_READ, 69, 0x20 + evtype, len) # get event bits */ def EVIOCGABS(abs): return _IOR(69, 0x40 + abs, INT5) # get abs value/limits */