Abstract:
A method for selecting an internal circuit according to a USB interface status includes: connecting a first pin of a USB interface of a terminal to a power supply through a pull-up resistor, where the first pin is a D− or D+ pin; when detecting that an external USB device is inserted into the USB interface, detecting whether the level status of the first pin is high or low; if the level status is low, connecting the D− and D+ pins to corresponding pins of a USB data communication module of the terminal and controlling charging of the terminal according to a first policy; if the level status is high, determining whether the level statuses of the D− and D+ pins are consistent, and if consistent, controlling charging of the terminal according to a second policy; if inconsistent, controlling charging of the terminal according to a third policy.
Abstract:
A method for selecting an internal circuit according to a USB interface status includes: connecting a first pin of a USB interface of a terminal to a power supply through a pull-up resistor, where the first pin is a D− or D+ pin; when detecting that an external USB device is inserted into the USB interface, detecting whether the level status of the first pin is high or low; if the level status is low, connecting the D− and D+ pins to corresponding pins of a USB data communication module of the terminal and controlling charging of the terminal according to a first policy; if the level status is high, determining whether the level statuses of the D− and D+ pins are consistent, and if consistent, controlling charging of the terminal according to a second policy; if inconsistent, controlling charging of the terminal according to a third policy.