Patent ID: 11947481
Assignee: HONOR DEVICE CO., LTD.
Field: Computer technology (Electrical engineering)
Classification: CPC G | IPC G

Claim 12:
13. A interface anti-corrosion method, wherein the method is applied to a processor in a terminal, the terminal further comprises an interface chip, a first USB interface, and a motion sensor, the processor is separately connected to the interface chip and the motion sensor, the interface chip is separately connected to the processor and the first USB interface, and the method comprises:
controlling, according to a motion status of the terminal that is detected by the motion sensor, the interface chip to configure a configuration channel (CC) pin of the first USB interface to be in a low-level mode when it is determined that the motion status of the terminal changes from a moving state to a static state;
obtaining a voltage status of a VBUS pin from the interface chip, wherein the voltage status of the VBUS pin is determined by the interface chip according to whether a VBUS voltage of the VBUS pin is lower than a preset threshold; and
controlling, when it is determined that the terminal is connected to an external device by using the first USB interface and that the VBUS pin is in a first voltage state in which a VBUS voltage is not lower than the preset threshold, the interface chip to configure the CC pin of the first USB interface to be in a high- and low-level alternate mode.