huckleberry-0.10.0.2: Haskell IOT on Intel Edison and other Linux computers.

Safe HaskellSafe
LanguageHaskell2010

System.PIO.Linux.PWM

Synopsis

Documentation

type Channel = Int Source #

PWM channel numbers are values of type Int

type Period = Int Source #

PWM period is a value of type Int

type DutyCycle = Int Source #

PWM duty cycle is a value of type Int

setEnable :: Channel -> Bool -> IO () Source #

Computation setEnable channel True makes corresponding PWM channel enabled. Computation setEnable channel False makes corresponding PWM channel disabled.

getEnable :: Channel -> IO Bool Source #

Computation getEnable channel obtain status of corresponding PWM channel.

setValue :: Channel -> Period -> DutyCycle -> IO () Source #

setValue channel period dutyCycle generates PWM signal on corresponding PWM channel. period and dutyCycle are value of nanoseconds.

getValue :: Channel -> IO (Period, DutyCycle) Source #

getValue channel obtain status of current PWM signal on corresponding PWM channel.