mirror of
https://github.com/lora-aprs/LoRa_APRS_iGate.git
synced 2025-12-06 07:42:00 +01:00
cppcheck fixes for power management
This commit is contained in:
parent
f37bba2220
commit
1f727926ba
|
|
@ -1,6 +1,11 @@
|
||||||
|
|
||||||
#include "power_management.h"
|
#include "power_management.h"
|
||||||
|
|
||||||
|
PowerManagement::PowerManagement()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
bool PowerManagement::begin(TwoWire port)
|
bool PowerManagement::begin(TwoWire port)
|
||||||
{
|
{
|
||||||
bool result = axp.begin(port, AXP192_SLAVE_ADDRESS);
|
bool result = axp.begin(port, AXP192_SLAVE_ADDRESS);
|
||||||
|
|
@ -11,32 +16,39 @@ bool PowerManagement::begin(TwoWire port)
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::activateLoRa()
|
void PowerManagement::activateLoRa()
|
||||||
{
|
{
|
||||||
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
|
axp.setPowerOutPut(AXP192_LDO2, AXP202_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::deactivateLoRa()
|
void PowerManagement::deactivateLoRa()
|
||||||
{
|
{
|
||||||
axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF);
|
axp.setPowerOutPut(AXP192_LDO2, AXP202_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::activateGPS()
|
void PowerManagement::activateGPS()
|
||||||
{
|
{
|
||||||
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);
|
axp.setPowerOutPut(AXP192_LDO3, AXP202_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::deactivateGPS()
|
void PowerManagement::deactivateGPS()
|
||||||
{
|
{
|
||||||
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF);
|
axp.setPowerOutPut(AXP192_LDO3, AXP202_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::activateOLED()
|
void PowerManagement::activateOLED()
|
||||||
{
|
{
|
||||||
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
|
axp.setPowerOutPut(AXP192_DCDC1, AXP202_ON);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// cppcheck-suppress unusedFunction
|
||||||
void PowerManagement::decativateOLED()
|
void PowerManagement::decativateOLED()
|
||||||
{
|
{
|
||||||
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
|
axp.setPowerOutPut(AXP192_DCDC1, AXP202_OFF);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -7,6 +7,7 @@
|
||||||
class PowerManagement
|
class PowerManagement
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
|
PowerManagement();
|
||||||
bool begin(TwoWire port);
|
bool begin(TwoWire port);
|
||||||
|
|
||||||
void activateLoRa();
|
void activateLoRa();
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue