mirror of
https://github.com/CTCaer/hekate.git
synced 2024-11-26 11:42:09 +00:00
regulator 5V: fix battery/usb source swap
This commit is contained in:
parent
e8f73a42b8
commit
9dbf745649
1 changed files with 6 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue