@hackage h2c1.0.0
Bindings to Linux I2C with support for repeated-start transactions.
Categories
License
MIT
Maintainer
edwardamsden@gmail.com
Links
Versions
- 1.0.0 Sat, 8 Jul 2017
Installation
Dependencies (4)
- base >=4.7 && <5
- bytestring
- mtl
- resourcet Show all…
Dependents (1)
@hackage/bno055-haskell
h2c: Haskell bindings to Linux I2C API
H2C is a binding to the Linux i2c-tools/i2c-dev API. It uses the I2C_RDWR ioctl for repeated-start communications between master and slave.
Notes
- You'll probably have to run as root. Getting regular users direct access to i2c busses on Linux is tricky.
- The Linux i2c-stub driver that you might think would be useful for testing doesn't support the I2C_RDWR ioctl. This is why, if you try to use it, you'll get the "invalid argument" error.
Documentation
$ stack haddock --open
, find module System.IO.I2C
BE CAREFUL WITH I2C. It can be used to poke at things like your graphics card, fans, &c.
See my library bno055-haskell for examples of h2c in use.