Improve charger detection
This commit is contained in:
@@ -33,6 +33,6 @@ void usbChargerInit()
|
||||
|
||||
bool usbChargerLed()
|
||||
{
|
||||
return GPIO_ReadInputDataBit(USB_CHARGER_GPIO, USB_CHARGER_GPIO_PIN) == Bit_RESET;
|
||||
return GPIO_ReadInputDataBit(USB_CHARGER_GPIO, USB_USBDet_GPIO_PIN) == 0 ? 0 : GPIO_ReadInputDataBit(USB_CHARGER_GPIO, USB_CHARGER_GPIO_PIN) == Bit_RESET;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user