2021-01-01 22:23:27 +00:00
|
|
|
#ifndef POWER_MANAGEMENT_H_
|
|
|
|
#define POWER_MANAGEMENT_H_
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
|
|
|
#include <axp20x.h>
|
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
class PowerManagement {
|
2021-01-01 22:23:27 +00:00
|
|
|
public:
|
2021-03-12 22:21:45 +00:00
|
|
|
PowerManagement();
|
|
|
|
bool begin(TwoWire &port);
|
2021-01-01 22:23:27 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
void activateLoRa();
|
|
|
|
void deactivateLoRa();
|
2021-01-01 22:23:27 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
void activateGPS();
|
|
|
|
void deactivateGPS();
|
2021-01-01 22:23:27 +00:00
|
|
|
|
2021-03-12 22:21:45 +00:00
|
|
|
void activateOLED();
|
|
|
|
void decativateOLED();
|
2021-01-01 22:23:27 +00:00
|
|
|
|
|
|
|
private:
|
2021-03-12 22:21:45 +00:00
|
|
|
AXP20X_Class axp;
|
2021-01-01 22:23:27 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|