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