-- Hoogle documentation, generated by Haddock
-- See Hoogle, http://www.haskell.org/hoogle/
-- | bindings for Griffin PowerMate USB
--
-- This library is for interfacing the Griffin PowerMate USB (a big
-- silver knob you can turn and click) with Haskell on Linux. Besides
-- reading events from the PowerMate, you can also control the
-- brightness, pulse speed, and pulse waveform of the built-in LED.
@package powermate
@version 1.0
-- | This module is for interfacing the Griffin PowerMate USB (a big silver
-- knob you can turn and click) with Haskell. You can read events from
-- the PowerMate, and control the brightness, pulse speed, and pulse
-- waveform of the built-in blue LED.
module PowerMate
-- | Represents a PowerMate USB controller.
data PowerMate
-- | An event returned by the PowerMate USB.
data Event
-- | True = press, False = release
Button :: Bool -> Event
-- | Positive is clockwise, negative is counterclockwise
Rotate :: Int -> Event
-- | When you change the LED status, it is echoed back to you for some
-- reason
StatusChange :: Status -> Event
-- | Represents the status of the blue LED.
data Status
Status :: Int -> Int -> Int -> Bool -> Bool -> Status
-- | Range: 0-255. 0 = off, 255 = max
[brightness] :: Status -> Int
-- | Range: 0-510. 0 = slowest, 255 = typical, 510 = fastest
[pulse_speed] :: Status -> Int
-- | Range: 0-2. Each possible value is a different shape of pulse
[pulse_mode] :: Status -> Int
-- | Not sure.
[pulse_asleep] :: Status -> Bool
-- | Should the LED pulse or be constant?
[pulse_awake] :: Status -> Bool
-- | A Status initialized to default values. (Specifically, all
-- zero.)
statusInit :: Status
-- | Returns the name of the device file associated with the Griffin
-- PowerMate USB, or Nothing if no PowerMate can be found.
searchForDevice :: IO (Maybe FilePath)
-- | Given the name of the device file for the PowerMate USB, opens it and
-- returns a PowerMate.
openDevice :: FilePath -> IO PowerMate
-- | Block until the PowerMate USB controller generates an event, and then
-- return that event.
readEvent :: PowerMate -> IO Event
-- | Control the blue LED on the PowerMate USB.
writeStatus :: PowerMate -> Status -> IO ()
-- | Close the PowerMate.
closeDevice :: PowerMate -> IO ()
instance GHC.Read.Read PowerMate.Event
instance GHC.Show.Show PowerMate.Event
instance GHC.Classes.Ord PowerMate.Event
instance GHC.Classes.Eq PowerMate.Event
instance GHC.Read.Read PowerMate.Status
instance GHC.Show.Show PowerMate.Status
instance GHC.Classes.Ord PowerMate.Status
instance GHC.Classes.Eq PowerMate.Status
instance GHC.Show.Show PowerMate.PowerMate
instance GHC.Classes.Eq PowerMate.PowerMate