LoRa_APRS_Tracker/src/power_management.h

38 lines
604 B
C
Raw Permalink Normal View History

#ifndef POWER_MANAGEMENT_H_
#define POWER_MANAGEMENT_H_
#include <Arduino.h>
#include <axp20x.h>
2021-10-14 23:31:56 +02:00
class PowerManagement {
public:
2021-10-14 23:31:56 +02:00
PowerManagement();
bool begin(TwoWire &port);
2021-10-14 23:31:56 +02:00
void activateLoRa();
void deactivateLoRa();
2021-10-14 23:31:56 +02:00
void activateGPS();
void deactivateGPS();
2021-10-14 23:31:56 +02:00
void activateOLED();
void decativateOLED();
void enableChgLed();
void disableChgLed();
2021-10-14 23:31:56 +02:00
void activateMeasurement();
void deactivateMeasurement();
2021-10-14 23:31:56 +02:00
double getBatteryVoltage();
double getBatteryChargeDischargeCurrent();
2021-10-14 23:31:56 +02:00
bool isBatteryConnect();
bool isChargeing();
2021-04-19 22:34:04 +02:00
private:
2021-10-14 23:31:56 +02:00
AXP20X_Class axp;
};
#endif