Copyright | © Patrick Pelletier 2017 |
---|---|
License | BSD3 |
Maintainer | code@funwithsoftware.org |
Portability | Linux |
Safe Haskell | Safe |
Language | Haskell2010 |
You can use this module to communicate with I2C peripherals on Linux.
Documentation
Represents an I²C read or write, as part of a larger transaction.
:: I2cHandle | handle to an I²C bus |
-> Int | address of device on I²C bus |
-> [Segment] | list of read/write segments to perform |
-> IO [[Word8]] | list of bytes returned for each read segment |
Performs an I2C_RDWR transaction.
:: I2cHandle | handle to an I²C bus |
-> Int | address of device on the I²C bus |
-> Word8 | register number |
-> Int | number of bytes to read |
-> IO [Word8] |
Writes the register number, and then reads the specified number of bytes.