diff options
author | hubmartin <hub.martin@gmail.com> | 2021-08-03 20:32:23 +0200 |
---|---|---|
committer | hubmartin <hub.martin@gmail.com> | 2021-08-03 20:32:23 +0200 |
commit | b7aa04e1f55096d754a7cc291f02f3430f5a3cd9 (patch) | |
tree | 6462cbd332cf813f9a173b0783521ef9714c45bb /src/components/battery/BatteryController.cpp | |
parent | 28abeae21bb370c45d26912bba4737a1cc6ddca7 (diff) |
PinMap with namespace and constexpr
Diffstat (limited to 'src/components/battery/BatteryController.cpp')
-rw-r--r-- | src/components/battery/BatteryController.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/components/battery/BatteryController.cpp b/src/components/battery/BatteryController.cpp index fa476ea3..d543ccd9 100644 --- a/src/components/battery/BatteryController.cpp +++ b/src/components/battery/BatteryController.cpp @@ -12,12 +12,12 @@ Battery::Battery() { } void Battery::Init() { - nrf_gpio_cfg_input(chargingPin, static_cast<nrf_gpio_pin_pull_t> GPIO_PIN_CNF_PULL_Pullup); + nrf_gpio_cfg_input(PinMap::Charging, static_cast<nrf_gpio_pin_pull_t> GPIO_PIN_CNF_PULL_Pullup); } void Battery::Update() { - isCharging = !nrf_gpio_pin_read(chargingPin); - isPowerPresent = !nrf_gpio_pin_read(powerPresentPin); + isCharging = !nrf_gpio_pin_read(PinMap::Charging); + isPowerPresent = !nrf_gpio_pin_read(PinMap::PowerPresent); if (isReading) { return; |