1
0
Fork 0
mirror of https://github.com/CTCaer/hekate.git synced 2024-11-09 20:11:50 +00:00

regulator 5V: fix battery/usb source swap

This commit is contained in:
CTCaer 2021-03-17 08:56:46 +02:00
parent e8f73a42b8
commit 9dbf745649

View file

@ -81,7 +81,13 @@ bool regulator_5v_get_dev_enabled(u8 dev)
void regulator_5v_batt_src_enable(bool enable)
{
if (enable && !batt_src)
{
gpio_write(GPIO_PORT_A, GPIO_PIN_5, GPIO_HIGH);
batt_src = true;
}
else if (!enable && batt_src)
{
gpio_write(GPIO_PORT_A, GPIO_PIN_5, GPIO_LOW);
batt_src = false;
}
}