summaryrefslogtreecommitdiff
path: root/src/components/battery/BatteryController.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/components/battery/BatteryController.h')
-rw-r--r--src/components/battery/BatteryController.h9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/components/battery/BatteryController.h b/src/components/battery/BatteryController.h
index 8af27ea8..6f09b737 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;
};
}
}