LoRa_APRS_iGate/include/power_utils.h

53 lines
1.4 KiB
C
Raw Normal View History

2025-07-15 16:28:23 -04: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 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-02-25 10:53:16 -03:00
namespace POWER_Utils {
2025-08-15 15:53:19 -04: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-30 20:04:46 -04:00
double getBatteryVoltage();
bool isBatteryConnected();
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-02-25 12:00:44 -03:00
#endif