aboutsummaryrefslogtreecommitdiff
path: root/hsm-gpio/Hsm/GPIO.hs
diff options
context:
space:
mode:
authorPaul Oliver <contact@pauloliver.dev>2025-01-23 14:22:33 -0800
committerPaul Oliver <contact@pauloliver.dev>2025-01-24 16:36:25 -0800
commit367aaf43ef9c52f454a721b1924808aeb2d7944f (patch)
treece166cf19d119510ba36f4b3c1fdcb9f2214c299 /hsm-gpio/Hsm/GPIO.hs
parent85d856e87ad7875e5dfab19e22e71c4118f4cbad (diff)
Replaces Int with Word type for numerical values
Diffstat (limited to 'hsm-gpio/Hsm/GPIO.hs')
-rw-r--r--hsm-gpio/Hsm/GPIO.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/hsm-gpio/Hsm/GPIO.hs b/hsm-gpio/Hsm/GPIO.hs
index bc08ef5..5357167 100644
--- a/hsm-gpio/Hsm/GPIO.hs
+++ b/hsm-gpio/Hsm/GPIO.hs
@@ -59,7 +59,7 @@ stateStr False = "off"
-- To control the pins, I use a subprocess call to `gpioset`. In the future
-- I'd prefer wrapping `libgpiod` directly. It looks like no one has created a
-- C wrapper yet, I might do it if I get bored. :)
-gpioset :: Log :> es => Bool -> Set GPIO -> [Int] -> Eff es ()
+gpioset :: Log :> es => Bool -> Set GPIO -> [Word] -> Eff es ()
gpioset state gpios periods = do
localDomain domain $ logTrace_ $ "Calling command: " <> pack command
E.unsafeEff_ $ callCommand command
@@ -72,7 +72,7 @@ gpioset state gpios periods = do
<> concatMap lineArg (toList gpios)
logReport ::
- (Log :> es, Show key) => Bool -> key -> [Int] -> Set GPIO -> Eff es ()
+ (Log :> es, Show key) => Bool -> key -> [Word] -> Set GPIO -> Eff es ()
logReport state key periods gpios = do
localDomain domain $ logTrace_ report
flushLogger
@@ -91,7 +91,7 @@ toggle ::
(GPIOEffect key :> es, Log :> es, Show key)
=> Bool
-> key
- -> [Int]
+ -> [Word]
-> Eff es ()
toggle state key periods = do
GPIOEffect mapper <- E.getStaticRep