LoRa_APRS_iGate/include/power_utils.h

53 lines
1.4 KiB
C
Raw Permalink Normal View History

2025-07-15 22:28:23 +02:00
/* Copyright (C) 2025 Ricardo Guzman - CA2RXU
*
* This file is part of LoRa APRS iGate.
*
* LoRa APRS iGate is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*
* LoRa APRS iGate is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with LoRa APRS iGate. If not, see <https://www.gnu.org/licenses/>.
*/
#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-02-25 14:53:16 +01:00
namespace POWER_Utils {
2025-08-15 21:53:19 +02:00
#ifdef VEXT_CTRL
void vext_ctrl_ON();
void vext_ctrl_OFF();
#endif
#ifdef ADC_CTRL
void adc_ctrl_ON();
void adc_ctrl_OFF();
#endif
2024-05-31 02:04:46 +02:00
double getBatteryVoltage();
bool isBatteryConnected();
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-02-25 16:00:44 +01:00
#endif