Safe Haskell | None |
---|
System.Hardware.BusPirate.I2C
Contents
- data I2cM a
- i2cMode :: I2cM a -> BusPirateM a
- startBit :: I2cM ()
- stopBit :: I2cM ()
- readByte :: I2cM Word8
- ackBit :: I2cM ()
- nackBit :: I2cM ()
- data AckNack
- bulkWrite :: ByteString -> I2cM ()
- writeRead :: ByteString -> Int -> I2cM ByteString
- data I2cConfig = I2cConfig {
- i2cPower :: Bool
- i2cPullups :: Bool
- i2cAux :: Bool
- i2cChipSelect :: Bool
- setConfig :: I2cConfig -> I2cM ()
- data I2cSpeed
- = I2c_5kHz
- | I2c_50kHz
- | I2c_100kHz
- | I2c_400kHz
- setSpeed :: I2cSpeed -> I2cM ()
Primitive operations
i2cMode :: I2cM a -> BusPirateM aSource
Enter I2C mode and run given action
bulkWrite :: ByteString -> I2cM ()Source
Write some bytes
writeRead :: ByteString -> Int -> I2cM ByteStringSource
Send Start bit, write some bytes, then read some bytes (ACKing each until the last), then send a stop bit
Configuration
Constructors
I2cConfig | |
Fields
|
Constructors
I2c_5kHz | |
I2c_50kHz | |
I2c_100kHz | |
I2c_400kHz |