module Ioctl
Public Class Methods
IO(type, nr)
click to toggle source
# File lib/linux_input/ioctl.rb, line 9 def IO(type, nr) IOC(IOC_NONE, type, nr, 0) end
IOC(dir, type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 5 def IOC(dir, type, nr, size) (dir << IOC_DIRSHIFT) | (type << IOC_TYPESHIFT) | (nr << IOC_NRSHIFT) | (size << IOC_SIZESHIFT) end
IOC_DIR(nr)
click to toggle source
# File lib/linux_input/ioctl.rb, line 17 def IOC_DIR(nr) (nr >> IOC_DIRSHIFT) & IOC_DIRMASK end
IOC_NR(nr)
click to toggle source
# File lib/linux_input/ioctl.rb, line 19 def IOC_NR(nr) (nr >> IOC_NRSHIFT) & IOC_NRMASK end
IOC_SIZE(nr)
click to toggle source
# File lib/linux_input/ioctl.rb, line 20 def IOC_SIZE(nr) (nr >> IOC_SIZESHIFT) & IOC_SIZEMASK end
IOC_TYPE(nr)
click to toggle source
# File lib/linux_input/ioctl.rb, line 18 def IOC_TYPE(nr) (nr >> IOC_TYPESHIFT) & IOC_TYPEMASK end
IOR(type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 10 def IOR(type, nr, size) IOC(IOC_READ, type, nr, FFI.type_size(size)) end
IOR_BAD(type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 13 def IOR_BAD(type, nr, size) IOC(IOC_READ, type, nr, FFI.type_size(size)) end
IOW(type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 11 def IOW(type, nr, size) IOC(IOC_WRITE, type, nr, FFI.type_size(size)) end
IOWR(type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 12 def IOWR(type, nr, size) IOC(IOC_READ | IOC_WRITE, type, nr, FFI.type_size(size)) end
IOWR_BAD(type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 15 def IOWR_BAD(type, nr, size) IOC(IOC_READ | IOC_WRITE, type, nr, FFI.type_size(size)) end
IOW_BAD(type, nr, size)
click to toggle source
# File lib/linux_input/ioctl.rb, line 14 def IOW_BAD(type, nr, size) IOC(IOC_WRITE, type, nr, FFI.type_size(size)) end