Documentation ¶
Overview ¶
Package i2c provides low level control over the linux i2c bus. based on https://github.com/davecheney/i2c/blob/master/i2c.go
Index ¶
Constants ¶
View Source
const ( 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 */ /* NOTE: Slave address is 7 or 10 bits, but 10-bit addresses * are NOT supported! (due to code brokenness) */ 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 I2CCLOCK_CHANGE = 0x0740
Variables ¶
This section is empty.
Functions ¶
func SetBusFreq ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.