Skip to content

Latest commit

 

History

History
19 lines (13 loc) · 381 Bytes

README.md

File metadata and controls

19 lines (13 loc) · 381 Bytes

hs-smbus

Haskell bindings to the Linux kernel i2c dev interface exposed in <linux/i2c-dev.h>

Example:

import System.IO.SMBus

dev = Device 0x50
main = withSMBus 0 $ \bus -> do
  write_byte_data bus dev '\x00' '\x05'
  val <- read_byte_data bus eeprom '\x00'
  print val