diff options
| author | Mark Russell <mruss660@gmail.com> | 2021-09-16 20:12:20 (GMT) |
|---|---|---|
| committer | Mark Russell <mruss660@gmail.com> | 2021-09-16 20:12:20 (GMT) |
| commit | cdf99b08f42c3826a8608d756bc7cda0a476ed98 (patch) | |
| tree | cd30018ebb68be09653b589ae11647ca33d40c73 /src/components/battery/BatteryController.h | |
| parent | 1d43adcdfa7bd15ba45c0c9d7c59c0ff99176b9c (diff) | |
Revert "Merge upstream"
This reverts commit 1d43adcdfa7bd15ba45c0c9d7c59c0ff99176b9c.
Diffstat (limited to 'src/components/battery/BatteryController.h')
| -rw-r--r-- | src/components/battery/BatteryController.h | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h index 8af27ea..6f09b73 100644 --- a/src/components/battery/BatteryController.h +++ b/src/components/battery/BatteryController.h @@ -1,7 +1,8 @@ #pragma once #include <cstdint> #include <drivers/include/nrfx_saadc.h> -#include <systemtask/SystemTask.h> +#include <array> +#include <numeric> namespace Pinetime { namespace Controllers { @@ -10,8 +11,8 @@ namespace Pinetime { public: Battery(); + void Init(); void Update(); - void Register(System::SystemTask* systemTask); uint8_t PercentRemaining() const { return percentRemaining; @@ -33,6 +34,8 @@ 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; @@ -46,8 +49,6 @@ namespace Pinetime { static void AdcCallbackStatic(nrfx_saadc_evt_t const* event); bool isReading = false; - - Pinetime::System::SystemTask* systemTask = nullptr; }; } } |
