Documentation ¶
Overview ¶
Package smbus provides access to the System Management bus, over i2c.
Index ¶
- type Conn
- func (c *Conn) Close() error
- func (c *Conn) Read(p []byte) (int, error)
- func (c *Conn) ReadBlockData(addr, reg uint8, buf []byte) error
- func (c *Conn) ReadReg(addr, reg uint8) (uint8, error)
- func (c *Conn) ReadWord(addr, reg uint8) (uint16, error)
- func (c *Conn) SetAddr(addr uint8) error
- func (c *Conn) Write(buf []byte) (int, error)
- func (c *Conn) WriteBlockData(addr, reg uint8, buf []byte) error
- func (c *Conn) WriteByte(b byte) (int, error)
- func (c *Conn) WriteReg(addr, reg, v uint8) error
- func (c *Conn) WriteWord(addr, reg uint8, v uint16) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Conn ¶
type Conn struct {
// contains filtered or unexported fields
}
Conn is connection to a i2c device.
func OpenFile ¶
OpenFile opens a connection to the i2c bus number. Users should call SetAddr afterwards to have a properly configured SMBus connection.
func (*Conn) ReadBlockData ¶
ReadBlockData reads len(buf) data into the byte slice, from the designated register.
func (*Conn) Write ¶
Write sends buf to the remote i2c device. The interpretation of the message is implementation dependant.
func (*Conn) WriteBlockData ¶
WriteBlockData writes the buf byte slice to a designated register.
func (*Conn) WriteByte ¶
WriteByte sends a single byte to the remote i2c device. The interpretation of the message is implementation dependant.
Directories ¶
Path | Synopsis |
---|---|
sensor
|
|
adc101x
Package adc101x provides access to a 10-bit Analog-to-Digital converter.
|
Package adc101x provides access to a 10-bit Analog-to-Digital converter. |
at30tse75x
Package at30tse75x provides access to AT30TSE75x devices.
|
Package at30tse75x provides access to AT30TSE75x devices. |
bme280
Package bme280 provides access to BME280 devices.
|
Package bme280 provides access to BME280 devices. |
hts221
Package hts221 provides access to HTS221 devices.
|
Package hts221 provides access to HTS221 devices. |
sht3x
Package sht3x provides access to SHT3x-D based devices.
|
Package sht3x provides access to SHT3x-D based devices. |
si7021
Package si7021 provides access to SI7021 devices.
|
Package si7021 provides access to SI7021 devices. |
tsl2591
Package tsl2591 provides access to the TSL2591 sensor, over I2C/SMBus for RaspBerry.
|
Package tsl2591 provides access to the TSL2591 sensor, over I2C/SMBus for RaspBerry. |
Click to show internal directories.
Click to hide internal directories.