diff options
| author | JF <jf@codingfield.com> | 2021-09-26 09:16:55 (GMT) |
|---|---|---|
| committer | Gitea <gitea@fake.local> | 2021-09-26 09:16:55 (GMT) |
| commit | 6652ec6f71967f4a8eea1f159aa500a1a21a5902 (patch) | |
| tree | cdbbf9afede8ea74258867ba41905a3fe0d784f4 /src/components/battery/BatteryController.h | |
| parent | 6c3d6fb2575888e582e7ef3004a0bc3bf6c588b6 (diff) | |
| parent | d03db14129b4f8cc2e691dd6f9e8d8d1ed52b7a1 (diff) | |
Merge branch 'develop' of JF/PineTime into master
Diffstat (limited to 'src/components/battery/BatteryController.h')
| -rw-r--r-- | src/components/battery/BatteryController.h | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index 6f09b73..8af27ea 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -1,8 +1,7 @@ #pragma once #include <cstdint> #include <drivers/include/nrfx_saadc.h> -#include <array> -#include <numeric> +#include <systemtask/SystemTask.h> namespace Pinetime { namespace Controllers { @@ -11,8 +10,8 @@ namespace Pinetime { public: Battery(); - void Init(); void Update(); + void Register(System::SystemTask* systemTask); uint8_t PercentRemaining() const { return percentRemaining; @@ -34,8 +33,6 @@ namespace Pinetime { static Battery* instance; nrf_saadc_value_t saadc_value; - static constexpr uint32_t chargingPin = 12; - static constexpr uint32_t powerPresentPin = 19; static constexpr nrf_saadc_input_t batteryVoltageAdcInput = NRF_SAADC_INPUT_AIN7; uint16_t voltage = 0; uint8_t percentRemaining = 0; @@ -49,6 +46,8 @@ namespace Pinetime { static void AdcCallbackStatic(nrfx_saadc_evt_t const* event); bool isReading = false; + + Pinetime::System::SystemTask* systemTask = nullptr; }; } } |
