diff options
| author | Riku Isokoski <riksu9000@gmail.com> | 2021-09-13 18:22:53 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-09-13 18:22:53 (GMT) |
| commit | 40765f117347f4a4fc6cc4d2c4e46b1923a18fbb (patch) | |
| tree | f1eac679b683e04b80fdd245dd9d4c6949a174a5 /src/components/battery/BatteryController.h | |
| parent | 3ee4876214b70c107cabbb54f865e646e99f0d73 (diff) | |
| parent | b0bdd2be1c30d349a1efef96b93a5771f5edbd06 (diff) | |
Merge branch 'develop' into disable_notif_only
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; }; } } |
