Language.Atom.Common
Contents
Description
Common Atom functions.
- data Timer
 - timer :: Name -> Atom Timer
 - startTimer :: Timer -> E Word64 -> Atom ()
 - timerDone :: Timer -> E Bool
 - oneShotRise :: E Bool -> Atom (E Bool)
 - oneShotFall :: E Bool -> Atom (E Bool)
 - debounce :: Name -> E Word64 -> E Word64 -> Bool -> E Bool -> Atom (E Bool)
 - lookupTable :: FloatingE a => [(E a, E a)] -> E a -> E a
 - hysteresis :: OrdE a => E a -> E a -> E a -> Atom (E Bool)
 
Timers
startTimer :: Timer -> E Word64 -> Atom ()Source
Starts a Timer. A Timer can be restarted at any time.
One Shots
Debouncing
debounce :: Name -> E Word64 -> E Word64 -> Bool -> E Bool -> Atom (E Bool)Source
Debounces a boolean given an on and off time (ticks) and an initial state.
Lookup Tables
lookupTable :: FloatingE a => [(E a, E a)] -> E a -> E aSource
1-D lookup table. X values out of table range are clipped at end Y values. Input table must be monotonically increasing in X.