linux

package
v2.0.30 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 27, 2020 License: BSD-2-Clause Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	I2C_DEV             = "/dev/i2c"
	I2C_SMBUS_BLOCK_MAX = 32 /* As specified in SMBus standard */
)
View Source
const (
	// i2c ioctl commands
	I2C_RETRIES     = 0x0701 /* number of times a device address should be polled when not acknowledging */
	I2C_TIMEOUT     = 0x0702 /* set timeout in units of 10 ms */
	I2C_SLAVE       = 0x0703 /* Use this slave address */
	I2C_SLAVE_FORCE = 0x0706 /* Use this slave address, even if it is already in use by a driver! */
	I2C_TENBIT      = 0x0704 /* 0 for 7 bit addrs, != 0 for 10 bit */
	I2C_FUNCS       = 0x0705 /* Get the adapter functionality mask */
	I2C_RDWR        = 0x0707 /* Combined R/W transfer (one STOP only) */
	I2C_PEC         = 0x0708 /* != 0 to use PEC with SMBus */
	I2C_SMBUS       = 0x0720 /* SMBus transfer */
)
View Source
const (
	// i2c_smbus_xfer read or write markers
	I2C_SMBUS_READ  uint8 = 0x01
	I2C_SMBUS_WRITE uint8 = 0x00
)
View Source
const (
	// SMBus transaction types
	I2C_SMBUS_QUICK            uint32 = 0
	I2C_SMBUS_BYTE             uint32 = 1
	I2C_SMBUS_BYTE_DATA        uint32 = 2
	I2C_SMBUS_WORD_DATA        uint32 = 3
	I2C_SMBUS_PROC_CALL        uint32 = 4
	I2C_SMBUS_BLOCK_DATA       uint32 = 5
	I2C_SMBUS_I2C_BLOCK_BROKEN uint32 = 6
	I2C_SMBUS_BLOCK_PROC_CALL  uint32 = 7
	I2C_SMBUS_I2C_BLOCK_DATA   uint32 = 8
)
View Source
const (
	MAX_IOCTL_SIZE_BYTES = 256
	EV_DEV               = "/dev/input/event"
	EV_PATH_WILDCARD     = "/sys/class/input/event"
)

Internal constants

View Source
const (
	LIRC_DEV              = "/dev/lirc"
	LIRC_MODE2SEND uint32 = 0
	LIRC_MODE2REC  uint32 = 16
)
View Source
const (
	SPI_DEV       = "/dev/spidev"
	SPI_IOC_MAGIC = 107
)

Variables

View Source
var (
	EVIOCGNAME = uintptr(C._EVIOCGNAME(MAX_IOCTL_SIZE_BYTES)) // get device name
	EVIOCGPHYS = uintptr(C._EVIOCGPHYS(MAX_IOCTL_SIZE_BYTES)) // get physical location
	EVIOCGUNIQ = uintptr(C._EVIOCGUNIQ(MAX_IOCTL_SIZE_BYTES)) // get unique identifier
	EVIOCGPROP = uintptr(C._EVIOCGPROP(MAX_IOCTL_SIZE_BYTES)) // get device properties
	EVIOCGID   = uintptr(C.EVIOCGID)                          // get device ID
	EVIOCGLED  = uintptr(C._EVIOCGLED(MAX_IOCTL_SIZE_BYTES))  // get LED states
	EVIOCGKEY  = uintptr(C._EVIOCGLED(MAX_IOCTL_SIZE_BYTES))  // get key states
)
View Source
var (
	LIRC_GET_FEATURES             = uintptr(C._LIRC_GET_FEATURES())
	LIRC_GET_SEND_MODE            = uintptr(C._LIRC_GET_SEND_MODE())
	LIRC_GET_REC_MODE             = uintptr(C._LIRC_GET_REC_MODE())
	LIRC_GET_REC_RESOLUTION       = uintptr(C._LIRC_GET_REC_RESOLUTION())
	LIRC_GET_MIN_TIMEOUT          = uintptr(C._LIRC_GET_MIN_TIMEOUT())
	LIRC_GET_MAX_TIMEOUT          = uintptr(C._LIRC_GET_MAX_TIMEOUT())
	LIRC_GET_LENGTH               = uintptr(C._LIRC_GET_LENGTH())
	LIRC_SET_SEND_MODE            = uintptr(C._LIRC_SET_SEND_MODE())
	LIRC_SET_REC_MODE             = uintptr(C._LIRC_SET_REC_MODE())
	LIRC_SET_SEND_CARRIER         = uintptr(C._LIRC_SET_SEND_CARRIER())
	LIRC_SET_REC_CARRIER          = uintptr(C._LIRC_SET_REC_CARRIER())
	LIRC_SET_SEND_DUTY_CYCLE      = uintptr(C._LIRC_SET_SEND_DUTY_CYCLE())
	LIRC_SET_REC_DUTY_CYCLE       = uintptr(C._LIRC_SET_REC_DUTY_CYCLE())
	LIRC_SET_TRANSMITTER_MASK     = uintptr(C._LIRC_SET_TRANSMITTER_MASK())
	LIRC_SET_REC_TIMEOUT          = uintptr(C._LIRC_SET_REC_TIMEOUT())
	LIRC_SET_REC_TIMEOUT_REPORTS  = uintptr(C._LIRC_SET_REC_TIMEOUT_REPORTS())
	LIRC_SET_MEASURE_CARRIER_MODE = uintptr(C._LIRC_SET_MEASURE_CARRIER_MODE())
	LIRC_SET_REC_CARRIER_RANGE    = uintptr(C._LIRC_SET_REC_CARRIER_RANGE())
	LIRC_SET_WIDEBAND_RECEIVER    = uintptr(C._LIRC_SET_WIDEBAND_RECEIVER())
)
View Source
var (
	SPI_IOC_RD_MODE          = uintptr(C._SPI_IOC_RD_MODE())
	SPI_IOC_WR_MODE          = uintptr(C._SPI_IOC_WR_MODE())
	SPI_IOC_RD_LSB_FIRST     = uintptr(C._SPI_IOC_RD_LSB_FIRST())
	SPI_IOC_WR_LSB_FIRST     = uintptr(C._SPI_IOC_WR_LSB_FIRST())
	SPI_IOC_RD_BITS_PER_WORD = uintptr(C._SPI_IOC_RD_BITS_PER_WORD())
	SPI_IOC_WR_BITS_PER_WORD = uintptr(C._SPI_IOC_WR_BITS_PER_WORD())
	SPI_IOC_RD_MAX_SPEED_HZ  = uintptr(C._SPI_IOC_RD_MAX_SPEED_HZ())
	SPI_IOC_WR_MAX_SPEED_HZ  = uintptr(C._SPI_IOC_WR_MAX_SPEED_HZ())
	SPI_IOC_RD_MODE32        = uintptr(C._SPI_IOC_RD_MODE32())
	SPI_IOC_WR_MODE32        = uintptr(C._SPI_IOC_WR_MODE32())
)

Functions

func EVDevice added in v2.0.5

func EVDevice(bus uint) string

func EVDevices added in v2.0.16

func EVDevices() ([]uint, error)

func EVGetInfo added in v2.0.5

func EVGetInfo(fd uintptr) ([]uint16, error)

Get device information (bus, vendor, product, version)

func EVGetName added in v2.0.5

func EVGetName(fd uintptr) (string, error)

Get name of the device

func EVGetPhys added in v2.0.5

func EVGetPhys(fd uintptr) (string, error)

Get physical connection string

func EVGetUniq added in v2.0.5

func EVGetUniq(fd uintptr) (string, error)

Get unique identifier

func EVOpenDevice added in v2.0.5

func EVOpenDevice(bus uint) (*os.File, error)

func EVSetGrabState added in v2.0.5

func EVSetGrabState(fd uintptr, state bool) error

Obtain and release exclusive device usage ("grab")

func EVSetLEDState added in v2.0.17

func EVSetLEDState(fd uintptr, led EVLEDState, state bool) error

EVSetLEDState sets a single LED state

func EpollAdd added in v2.0.5

func EpollAdd(handle, fd uintptr, mode EpollMode) error

func EpollClose added in v2.0.5

func EpollClose(handle uintptr) error

func EpollCreate added in v2.0.5

func EpollCreate() (uintptr, error)

func EpollDelete added in v2.0.5

func EpollDelete(handle, fd uintptr) error

func I2CDetectSlave added in v2.0.4

func I2CDetectSlave(fd uintptr, slave uint8, funcs I2CFunction) (bool, error)

func I2CDevice added in v2.0.4

func I2CDevice(bus uint) string

func I2COpenDevice added in v2.0.4

func I2COpenDevice(bus uint) (*os.File, error)

func I2CReadBlock added in v2.0.4

func I2CReadBlock(fd uintptr, reg, length uint8, funcs I2CFunction) ([]byte, error)

func I2CReadInt16 added in v2.0.4

func I2CReadInt16(fd uintptr, reg uint8, funcs I2CFunction) (int16, error)

func I2CReadInt8 added in v2.0.4

func I2CReadInt8(fd uintptr, reg uint8, funcs I2CFunction) (int8, error)

func I2CReadUint16 added in v2.0.4

func I2CReadUint16(fd uintptr, reg uint8, funcs I2CFunction) (uint16, error)

func I2CReadUint8 added in v2.0.4

func I2CReadUint8(fd uintptr, reg uint8, funcs I2CFunction) (uint8, error)

func I2CSetSlave added in v2.0.4

func I2CSetSlave(fd uintptr, slave uint8) error

func I2CWriteInt16 added in v2.0.4

func I2CWriteInt16(fd uintptr, reg uint8, value int16, funcs I2CFunction) error

func I2CWriteInt8 added in v2.0.4

func I2CWriteInt8(fd uintptr, reg uint8, value int8, funcs I2CFunction) error

func I2CWriteQuick added in v2.0.4

func I2CWriteQuick(fd uintptr, value uint8, funcs I2CFunction) error

func I2CWriteUint16 added in v2.0.4

func I2CWriteUint16(fd uintptr, reg uint8, value uint16, funcs I2CFunction) error

func I2CWriteUint8 added in v2.0.4

func I2CWriteUint8(fd uintptr, reg, value uint8, funcs I2CFunction) error

func InotifyAddWatch added in v2.0.16

func InotifyAddWatch(fd uintptr, path string, mask InotifyMask) (uint32, error)

func InotifyInit added in v2.0.16

func InotifyInit() (*os.File, error)

func InotifyRemoveWatch added in v2.0.16

func InotifyRemoveWatch(fd uintptr, watch uint32) error

func LIRCDevice added in v2.0.5

func LIRCDevice(bus uint) string

func LIRCLength added in v2.0.5

func LIRCLength(fd uintptr) (uint32, error)

func LIRCMinMaxTimeoutMicros added in v2.0.5

func LIRCMinMaxTimeoutMicros(fd uintptr) (uint32, uint32, error)

func LIRCOpenDevice added in v2.0.5

func LIRCOpenDevice(path string, mode LIRCMode) (*os.File, error)

func LIRCRcvMode added in v2.0.5

func LIRCRcvMode(fd uintptr) (gopi.LIRCMode, error)

func LIRCRcvResolutionMicros added in v2.0.5

func LIRCRcvResolutionMicros(fd uintptr) (uint32, error)

func LIRCSendMode added in v2.0.5

func LIRCSendMode(fd uintptr) (gopi.LIRCMode, error)

func LIRCSetMeasureCarrierMode added in v2.0.5

func LIRCSetMeasureCarrierMode(fd uintptr, value bool) error

func LIRCSetRcvCarrierHz added in v2.0.5

func LIRCSetRcvCarrierHz(fd uintptr, value uint32) error

func LIRCSetRcvCarrierRangeHz added in v2.0.5

func LIRCSetRcvCarrierRangeHz(fd uintptr, value uint32) error

func LIRCSetRcvDutyCycle added in v2.0.5

func LIRCSetRcvDutyCycle(fd uintptr, value uint32) error

func LIRCSetRcvMode added in v2.0.5

func LIRCSetRcvMode(fd uintptr, value gopi.LIRCMode) error

func LIRCSetRcvTimeoutMicros added in v2.0.5

func LIRCSetRcvTimeoutMicros(fd uintptr, value uint32) error

func LIRCSetRcvTimeoutReports added in v2.0.5

func LIRCSetRcvTimeoutReports(fd uintptr, value bool) error

func LIRCSetSendCarrierHz added in v2.0.5

func LIRCSetSendCarrierHz(fd uintptr, value uint32) error

func LIRCSetSendDutyCycle added in v2.0.5

func LIRCSetSendDutyCycle(fd uintptr, value uint32) error

func LIRCSetSendMode added in v2.0.5

func LIRCSetSendMode(fd uintptr, value gopi.LIRCMode) error

func LIRCSetTransmitterMask added in v2.0.5

func LIRCSetTransmitterMask(fd uintptr, value uint32) error

func LIRCSetWidebandReceiver added in v2.0.5

func LIRCSetWidebandReceiver(fd uintptr, value bool) error

func LoadAverage

func LoadAverage() (float64, float64, float64)

Return load averages

func SPIBitsPerWord added in v2.0.5

func SPIBitsPerWord(fd uintptr) (uint8, error)

func SPIDevice added in v2.0.5

func SPIDevice(bus, slave uint) string

func SPIMode added in v2.0.5

func SPIMode(fd uintptr) (gopi.SPIMode, error)

func SPIOpenDevice added in v2.0.5

func SPIOpenDevice(bus, slave uint) (*os.File, error)

func SPIRead added in v2.0.5

func SPIRead(fd uintptr, size, speed uint32, delay uint16, bits uint8) ([]byte, error)

func SPISetBitsPerWord added in v2.0.5

func SPISetBitsPerWord(fd uintptr, bits uint8) error

func SPISetMode added in v2.0.5

func SPISetMode(fd uintptr, mode gopi.SPIMode) error

func SPISetSpeedHz added in v2.0.5

func SPISetSpeedHz(fd uintptr, speed uint32) error

func SPISpeedHz added in v2.0.5

func SPISpeedHz(fd uintptr) (uint32, error)

func SPITransfer added in v2.0.5

func SPITransfer(fd uintptr, send []byte, speed uint32, delay uint16, bits uint8) ([]byte, error)

func SPIWrite added in v2.0.5

func SPIWrite(fd uintptr, send []byte, speed uint32, delay uint16, bits uint8) error

func SerialNumber

func SerialNumber() string

SerialNumber returns the mac address of the hardware, if available

func Uptime

func Uptime() time.Duration

Uptime returns the duration the machine has been switched on for

Types

type EVEvent added in v2.0.5

type EVEvent struct {
	Second      uint32
	Microsecond uint32
	Type        EVType
	Code        EVKeyCode
	Value       uint32
}

func (EVEvent) String added in v2.0.5

func (e EVEvent) String() string

type EVKeyCode added in v2.0.5

type EVKeyCode uint16
const (
	EV_CODE_X        EVKeyCode = 0x0000
	EV_CODE_Y        EVKeyCode = 0x0001
	EV_CODE_SCANCODE EVKeyCode = 0x0004 // Keyboard scan code
	EV_CODE_SLOT     EVKeyCode = 0x002F // Slot for multi touch positon
	EV_CODE_SLOT_X   EVKeyCode = 0x0035 // X for multi touch position
	EV_CODE_SLOT_Y   EVKeyCode = 0x0036 // Y for multi touch position
	EV_CODE_SLOT_ID  EVKeyCode = 0x0039 // Unique ID for multi touch position
)

func (EVKeyCode) String added in v2.0.5

func (v EVKeyCode) String() string

type EVLEDState added in v2.0.17

type EVLEDState uint8
const (
	EV_LED_NUML     EVLEDState = 0x00
	EV_LED_CAPSL    EVLEDState = 0x01
	EV_LED_SCROLLL  EVLEDState = 0x02
	EV_LED_COMPOSE  EVLEDState = 0x03
	EV_LED_KANA     EVLEDState = 0x04
	EV_LED_SLEEP    EVLEDState = 0x05
	EV_LED_SUSPEND  EVLEDState = 0x06
	EV_LED_MUTE     EVLEDState = 0x07
	EV_LED_MISC     EVLEDState = 0x08
	EV_LED_MAIL     EVLEDState = 0x09
	EV_LED_CHARGING EVLEDState = 0x0A
	EV_LED_MAX      EVLEDState = 0x0F
)

LED Constants

func EVGetLEDState added in v2.0.17

func EVGetLEDState(fd uintptr) ([]EVLEDState, error)

EVGetLEDState gets LED states as an array of LED's which are on

func (EVLEDState) String added in v2.0.17

func (s EVLEDState) String() string

type EVType added in v2.0.5

type EVType uint16
const (
	EV_SYN       EVType = 0x0000 // Used as markers to separate events
	EV_KEY       EVType = 0x0001 // Used to describe state changes of keyboards, buttons
	EV_REL       EVType = 0x0002 // Used to describe relative axis value changes
	EV_ABS       EVType = 0x0003 // Used to describe absolute axis value changes
	EV_MSC       EVType = 0x0004 // Miscellaneous uses that didn't fit anywhere else
	EV_SW        EVType = 0x0005 // Used to describe binary state input switches
	EV_LED       EVType = 0x0011 // Used to turn LEDs on devices on and off
	EV_SND       EVType = 0x0012 // Sound output, such as buzzers
	EV_REP       EVType = 0x0014 // Enables autorepeat of keys in the input core
	EV_FF        EVType = 0x0015 // Sends force-feedback effects to a device
	EV_PWR       EVType = 0x0016 // Power management events
	EV_FF_STATUS EVType = 0x0017 // Device reporting of force-feedback effects back to the host
	EV_MAX       EVType = 0x001F
)

Event types See https://www.kernel.org/doc/Documentation/input/event-codes.txt

func EVGetSupportedEventTypes added in v2.0.5

func EVGetSupportedEventTypes(fd uintptr) ([]EVType, error)

Get device capabilities

func (EVType) String added in v2.0.5

func (v EVType) String() string

type EpollEvt added in v2.0.5

type EpollEvt syscall.EpollEvent

func EpollWait added in v2.0.5

func EpollWait(handle uintptr, timeout time.Duration, cap uint) ([]EpollEvt, error)

func (EpollEvt) Flags added in v2.0.5

func (evt EpollEvt) Flags() EpollMode

func (EpollEvt) String added in v2.0.5

func (evt EpollEvt) String() string

type EpollMode added in v2.0.5

type EpollMode uint32
const (
	EPOLL_MODE_EDGE   EpollMode = syscall.EPOLLPRI
	EPOLL_MODE_READ   EpollMode = syscall.EPOLLIN
	EPOLL_MODE_WRITE  EpollMode = syscall.EPOLLOUT
	EPOLL_MODE_HANGUP EpollMode = syscall.EPOLLHUP
	EPOLL_MODE_ERROR  EpollMode = syscall.EPOLLERR
)

func (EpollMode) String added in v2.0.5

func (v EpollMode) String() string

type EpollOp added in v2.0.5

type EpollOp int
const (
	EPOLL_OP_MOD EpollOp = syscall.EPOLL_CTL_MOD
	EPOLL_OP_ADD EpollOp = syscall.EPOLL_CTL_ADD
	EPOLL_OP_DEL EpollOp = syscall.EPOLL_CTL_DEL
)

type I2CFunction added in v2.0.4

type I2CFunction uint32
const (
	// i2c functions
	I2C_FUNC_NONE                   I2CFunction = 0x00000000
	I2C_FUNC_I2C                    I2CFunction = 0x00000001
	I2C_FUNC_10BIT_ADDR             I2CFunction = 0x00000002
	I2C_FUNC_PROTOCOL_MANGLING      I2CFunction = 0x00000004 /* I2C_M_IGNORE_NAK etc. */
	I2C_FUNC_SMBUS_PEC              I2CFunction = 0x00000008
	I2C_FUNC_NOSTART                I2CFunction = 0x00000010 /* I2C_M_NOSTART */
	I2C_FUNC_SMBUS_BLOCK_PROC_CALL  I2CFunction = 0x00008000 /* SMBus 2.0 */
	I2C_FUNC_SMBUS_QUICK            I2CFunction = 0x00010000
	I2C_FUNC_SMBUS_READ_BYTE        I2CFunction = 0x00020000
	I2C_FUNC_SMBUS_WRITE_BYTE       I2CFunction = 0x00040000
	I2C_FUNC_SMBUS_READ_BYTE_DATA   I2CFunction = 0x00080000
	I2C_FUNC_SMBUS_WRITE_BYTE_DATA  I2CFunction = 0x00100000
	I2C_FUNC_SMBUS_READ_WORD_DATA   I2CFunction = 0x00200000
	I2C_FUNC_SMBUS_WRITE_WORD_DATA  I2CFunction = 0x00400000
	I2C_FUNC_SMBUS_PROC_CALL        I2CFunction = 0x00800000
	I2C_FUNC_SMBUS_READ_BLOCK_DATA  I2CFunction = 0x01000000
	I2C_FUNC_SMBUS_WRITE_BLOCK_DATA I2CFunction = 0x02000000
	I2C_FUNC_SMBUS_READ_I2C_BLOCK   I2CFunction = 0x04000000 /* I2C-like block xfer  */
	I2C_FUNC_SMBUS_WRITE_I2C_BLOCK  I2CFunction = 0x08000000 /* w/ 1-byte reg. addr. */
)

func I2CFunctions added in v2.0.4

func I2CFunctions(fd uintptr) (I2CFunction, error)

func (I2CFunction) FlagString added in v2.0.4

func (f I2CFunction) FlagString() string

func (I2CFunction) String added in v2.0.4

func (f I2CFunction) String() string

type InotifyEvt added in v2.0.16

type InotifyEvt struct {
	unix.InotifyEvent
	// contains filtered or unexported fields
}

func InotifyRead added in v2.0.16

func InotifyRead(fd uintptr) (*InotifyEvt, error)

func (InotifyEvt) Cookie added in v2.0.16

func (this InotifyEvt) Cookie() uint32

func (InotifyEvt) Len added in v2.0.16

func (this InotifyEvt) Len() uint32

func (InotifyEvt) Mask added in v2.0.16

func (this InotifyEvt) Mask() InotifyMask

func (InotifyEvt) Path added in v2.0.16

func (this InotifyEvt) Path() string

func (InotifyEvt) String added in v2.0.16

func (this InotifyEvt) String() string

func (InotifyEvt) Watch added in v2.0.16

func (this InotifyEvt) Watch() uint32

type InotifyMask added in v2.0.16

type InotifyMask uint64
const (
	IN_NONE          InotifyMask = 0
	IN_ACCESS        InotifyMask = (unix.IN_ACCESS)        // File was accessed (read)
	IN_ATTRIB        InotifyMask = (unix.IN_ATTRIB)        // Metadata changed
	IN_CLOSE_WRITE   InotifyMask = (unix.IN_CLOSE_WRITE)   // File opened for writing was closed
	IN_CLOSE_NOWRITE InotifyMask = (unix.IN_CLOSE_NOWRITE) // File not opened for writing was closed
	IN_CREATE        InotifyMask = (unix.IN_CREATE)        // File/directory created in watched directory
	IN_DELETE        InotifyMask = (unix.IN_DELETE)        // File/directory deleted from watched directory
	IN_DELETE_SELF   InotifyMask = (unix.IN_DELETE_SELF)   // Watched file/directory was itself deleted.
	IN_MODIFY        InotifyMask = (unix.IN_MODIFY)        // File was modified
	IN_MOVE_SELF     InotifyMask = (unix.IN_MOVE_SELF)     // Watched file/directory was itself moved.
	IN_MOVED_FROM    InotifyMask = (unix.IN_MOVED_FROM)    // File moved out of watched directory
	IN_MOVED_TO      InotifyMask = (unix.IN_MOVED_TO)      // File moved into watched directory
	IN_OPEN          InotifyMask = (unix.IN_OPEN)          // File was opened
	IN_DONT_FOLLOW   InotifyMask = (unix.IN_DONT_FOLLOW)   // Don't dereference pathname if it is a symbolic link
	IN_EXCL_UNLINK   InotifyMask = (unix.IN_EXCL_UNLINK)   // events are not generated for children after they have been unlinked
	IN_MASK_ADD      InotifyMask = (unix.IN_MASK_ADD)      // Add (OR) events to watch mask for this pathname if it already exists
	IN_ONESHOT       InotifyMask = (unix.IN_ONESHOT)       // Monitor pathname for one event, then remove from watch list.
	IN_ONLYDIR       InotifyMask = (unix.IN_ONLYDIR)       // Only watch pathname if it is a directory
	IN_IGNORED       InotifyMask = (unix.IN_IGNORED)       // Watch was removed explicitly
	IN_ISDIR         InotifyMask = (unix.IN_ISDIR)         // Subject of this event is a directory
	IN_Q_OVERFLOW    InotifyMask = (unix.IN_Q_OVERFLOW)    // Event queue overflowed
	IN_UNMOUNT       InotifyMask = (unix.IN_UNMOUNT)       // File system containing watched object was unmounted
	IN_DEFAULT       InotifyMask = IN_ACCESS | IN_ATTRIB | IN_CREATE | IN_DELETE | IN_DELETE_SELF | IN_MODIFY | IN_MOVE_SELF | IN_MOVED_FROM | IN_MOVED_TO | IN_ISDIR | IN_UNMOUNT
	IN_MAX           InotifyMask = IN_ONESHOT
)

func (InotifyMask) String added in v2.0.16

func (v InotifyMask) String() string

func (InotifyMask) StringFlag added in v2.0.16

func (v InotifyMask) StringFlag() string

type LIRCFeature added in v2.0.5

type LIRCFeature uint32
const (
	LIRC_CAN_SEND_RAW                 LIRCFeature = LIRCFeature(gopi.LIRC_MODE_RAW) << LIRC_MODE2SEND
	LIRC_CAN_SEND_PULSE               LIRCFeature = LIRCFeature(gopi.LIRC_MODE_PULSE) << LIRC_MODE2SEND
	LIRC_CAN_SEND_MODE2               LIRCFeature = LIRCFeature(gopi.LIRC_MODE_MODE2) << LIRC_MODE2SEND
	LIRC_CAN_SEND_LIRCCODE            LIRCFeature = LIRCFeature(gopi.LIRC_MODE_LIRCCODE) << LIRC_MODE2SEND
	LIRC_CAN_SEND_MASK                LIRCFeature = 0x0000003F
	LIRC_CAN_SET_SEND_CARRIER         LIRCFeature = 0x00000100
	LIRC_CAN_SET_SEND_DUTY_CYCLE      LIRCFeature = 0x00000200
	LIRC_CAN_SET_TRANSMITTER_MASK     LIRCFeature = 0x00000400
	LIRC_CAN_REC_RAW                  LIRCFeature = LIRCFeature(gopi.LIRC_MODE_RAW) << LIRC_MODE2REC
	LIRC_CAN_REC_PULSE                LIRCFeature = LIRCFeature(gopi.LIRC_MODE_PULSE) << LIRC_MODE2REC
	LIRC_CAN_REC_MODE2                LIRCFeature = LIRCFeature(gopi.LIRC_MODE_MODE2) << LIRC_MODE2REC
	LIRC_CAN_REC_LIRCCODE             LIRCFeature = LIRCFeature(gopi.LIRC_MODE_LIRCCODE) << LIRC_MODE2REC
	LIRC_CAN_REC_MASK                 LIRCFeature = LIRC_CAN_SEND_MASK << LIRC_MODE2REC
	LIRC_CAN_SET_REC_CARRIER          LIRCFeature = LIRC_CAN_SET_SEND_CARRIER << LIRC_MODE2REC
	LIRC_CAN_SET_REC_DUTY_CYCLE       LIRCFeature = LIRC_CAN_SET_SEND_DUTY_CYCLE << LIRC_MODE2REC
	LIRC_CAN_SET_REC_DUTY_CYCLE_RANGE LIRCFeature = 0x40000000
	LIRC_CAN_SET_REC_CARRIER_RANGE    LIRCFeature = 0x80000000
	LIRC_CAN_GET_REC_RESOLUTION       LIRCFeature = 0x20000000
	LIRC_CAN_SET_REC_TIMEOUT          LIRCFeature = 0x10000000
	LIRC_CAN_SET_REC_FILTER           LIRCFeature = 0x08000000
	LIRC_FEATURE_MIN                  LIRCFeature = 0x00000001
	LIRC_FEATURE_MAX                  LIRCFeature = 0x80000000
)

func LIRCFeatures added in v2.0.5

func LIRCFeatures(fd uintptr) (LIRCFeature, error)

func (LIRCFeature) FlagString added in v2.0.5

func (f LIRCFeature) FlagString() string

func (LIRCFeature) String added in v2.0.5

func (f LIRCFeature) String() string

type LIRCMode added in v2.0.5

type LIRCMode uint
const (
	LIRC_MODE_SEND LIRCMode = (1 << iota)
	LIRC_MODE_RCV
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL