si-clock-0.1.3.1: An interface to the Silicon Labs Si5351 clock chip

Copyright(c) Marc Fontaine 2017
LicenseBSD3
MaintainerMarc.Fontaine@gmx.de
Stabilityexperimental
PortabilityGHC-only
Safe HaskellSafe
LanguageHaskell2010

Hardware.SiClock.I2C

Description

I2C related functions.

Synopsis

Documentation

type Device = Fd #

type SynthT env m a = ReaderT (env, Device) m a Source #

Synth a is the monad for Si PPL synthesizers.

runI2CWith :: FilePath -> Addr -> (Device -> IO a) -> IO a Source #

Run an IO action with an I2C device and an I2C address.

deviceIO :: MonadIO m => (Device -> IO a) -> SynthT env m a Source #

Lift an IO action on an I2C device to Synth.

dumpRegisters :: MonadIO m => SynthT env m () Source #

Dump the content of the IC registers. (For testing)