diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2025-12-17 02:26:07 +0000 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2025-12-17 02:26:07 +0000 |
| commit | f1e95891617b705c5bbe04fb20d64b9dab9346b1 (patch) | |
| tree | 0a4565c9a74005690f5cec104bebb471b7afc383 /hsm-core | |
| parent | 459d2c5630e1296807bbf23fd4360fb4d4f5bbe7 (diff) | |
Adds battery monitoring service via INA226/I2C (WIP)battery_monitoring
Diffstat (limited to 'hsm-core')
| -rw-r--r-- | hsm-core/Hsm/Core/Show.hs | 9 | ||||
| -rw-r--r-- | hsm-core/hsm-core.cabal | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/hsm-core/Hsm/Core/Show.hs b/hsm-core/Hsm/Core/Show.hs new file mode 100644 index 0000000..601ea03 --- /dev/null +++ b/hsm-core/Hsm/Core/Show.hs @@ -0,0 +1,9 @@ +-- Defines some convenience printing functions +module Hsm.Core.Show + ( showHex + ) where + +import Numeric qualified as N (showHex) + +showHex :: Integral a => a -> String +showHex v = "0x" <> N.showHex v "" diff --git a/hsm-core/hsm-core.cabal b/hsm-core/hsm-core.cabal index 6a0efff..f9f5657 100644 --- a/hsm-core/hsm-core.cabal +++ b/hsm-core/hsm-core.cabal @@ -18,5 +18,6 @@ library Hsm.Core.App Hsm.Core.Bracket Hsm.Core.Serial + Hsm.Core.Show ghc-options: -O2 -Wall -Werror -Wno-star-is-type -Wunused-packages |
