2024-01-03 01:13:44 -03:00
|
|
|
#ifndef POWER_UTILS_H_
|
|
|
|
|
#define POWER_UTILS_H_
|
|
|
|
|
|
|
|
|
|
#include <Arduino.h>
|
2024-04-23 10:29:46 -04:00
|
|
|
#if defined(HAS_AXP192) || defined(HAS_AXP2101)
|
2024-05-11 12:59:07 -04:00
|
|
|
#include "XPowersLib.h"
|
2024-04-23 10:29:46 -04:00
|
|
|
#else
|
2024-05-11 12:59:07 -04:00
|
|
|
#include <Wire.h>
|
2024-04-23 10:29:46 -04:00
|
|
|
#endif
|
2024-01-03 01:13:44 -03:00
|
|
|
|
2024-02-25 10:53:16 -03:00
|
|
|
|
2024-01-03 01:13:44 -03:00
|
|
|
namespace POWER_Utils {
|
|
|
|
|
|
2024-05-30 20:04:46 -04:00
|
|
|
double getBatteryVoltage();
|
|
|
|
|
bool isBatteryConnected();
|
|
|
|
|
void activateMeasurement();
|
2024-10-14 17:04:28 -03:00
|
|
|
void activateGPS();
|
|
|
|
|
void deactivateGPS();
|
2024-05-30 20:04:46 -04:00
|
|
|
void activateLoRa();
|
|
|
|
|
void deactivateLoRa();
|
|
|
|
|
bool begin(TwoWire &port);
|
|
|
|
|
void setup();
|
2024-01-03 01:13:44 -03:00
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
2024-02-25 12:00:44 -03:00
|
|
|
#endif
|