CN116667471A - Equipment interface control method and device - Google Patents

Equipment interface control method and device Download PDF

Info

Publication number
CN116667471A
CN116667471A CN202211522427.9A CN202211522427A CN116667471A CN 116667471 A CN116667471 A CN 116667471A CN 202211522427 A CN202211522427 A CN 202211522427A CN 116667471 A CN116667471 A CN 116667471A
Authority
CN
China
Prior art keywords
state
interface
charging
charger
power supply
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN202211522427.9A
Other languages
Chinese (zh)
Other versions
CN116667471B (en
Inventor
王安龙
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Honor Device Co Ltd
Original Assignee
Honor Device Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Honor Device Co Ltd filed Critical Honor Device Co Ltd
Priority to CN202211522427.9A priority Critical patent/CN116667471B/en
Publication of CN116667471A publication Critical patent/CN116667471A/en
Application granted granted Critical
Publication of CN116667471B publication Critical patent/CN116667471B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R29/00Coupling parts for selective co-operation with a counterpart in different ways to establish different circuits, e.g. for voltage selection, for series-parallel selection, programmable connectors
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0029Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits
    • H02J7/0031Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with safety or protection devices or circuits using battery or load disconnect circuits
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0063Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries with circuits adapted for supplying loads from the battery
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J7/00Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J7/0068Battery or charger load switching, e.g. concurrent charging and load supply
    • HELECTRICITY
    • H02GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
    • H02JCIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
    • H02J2207/00Indexing scheme relating to details of circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
    • H02J2207/30Charge provided using DC bus or data bus of a computer
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02EREDUCTION OF GREENHOUSE GAS [GHG] EMISSIONS, RELATED TO ENERGY GENERATION, TRANSMISSION OR DISTRIBUTION
    • Y02E60/00Enabling technologies; Technologies with a potential or indirect contribution to GHG emissions mitigation
    • Y02E60/10Energy storage using batteries

Landscapes

  • Engineering & Computer Science (AREA)
  • Power Engineering (AREA)
  • Charge And Discharge Circuits For Batteries Or The Like (AREA)
  • Power Sources (AREA)

Abstract

The embodiment of the application relates to the technical field of computers, in particular to a device interface control method, a device and a system. The terminal equipment is provided with a first interface and a second interface, and if the first interface and the second interface are both in a state of being inserted into a charger, the first charging passage is disconnected and the second charging passage is communicated; if the first interface and the second interface are both in a state of being connected with external equipment in an inserting way, the first power supply passage is disconnected, and the second power supply passage is set to be in a communicating state; if the first interface is plugged with a charger and the second interface is plugged with external equipment, the first charging path and the second power supply path are communicated; when the first interface is plugged with external equipment and the second interface is plugged with a charger, the first power supply passage is disconnected, and the second charging passage is communicated. When a plurality of interfaces of the terminal equipment are plugged into the external equipment or the charger, the normal operation of the external equipment or the charger is realized by controlling the connection or disconnection of the charging channel and the power supply channel.

Description

Equipment interface control method and device
Technical Field
The embodiment of the application relates to the technical field of computers, in particular to a device interface control method and device.
Background
At present, the terminal device may be physically configured with multiple interfaces, such as a USB Type-C interface with universal serial bus or a pogo pin interface. When the interfaces are used simultaneously, the terminal device needs to select to use or use functions carried by the interfaces (charging, song listening, file transmission, etc.) according to actual scenes, and the implementation of the functions depends on the physical channel of charging or data transmission, so that a set of control logic needs to be designed on the software side to ensure that service functions are implemented under different user scenes.
Disclosure of Invention
The embodiment of the application provides a device interface control method and device. According to the method, when a plurality of interfaces of the terminal equipment are simultaneously connected with the external equipment or the charger in an inserting mode, normal operation of the external equipment or the charger is achieved by controlling connection or disconnection of the charging channel and the power supply channel.
In a first aspect, an embodiment of the present application provides a device interface control method, where the method is applied to a charging controller of a terminal device, where the terminal device is further equipped with a battery, a first interface, and a second interface, where the battery is connected to the first interface through a first charging path and a first power supply path, and the battery is connected to the second interface through a second charging path and a second power supply path, and the method includes:
If the first interface and the second interface are both in a state of being connected with a charger in an inserted mode, the first charging passage is set to be in an off state, the second charging passage is set to be in a communication state, and the charger supplies power to the battery through the first charging passage;
if the first interface and the second interface are both in a state of being connected with external equipment in an inserting mode, the first power supply passage is set to be in a disconnected state, the second power supply passage is set to be in a communicating state, and the battery supplies power to the external equipment through the second power supply passage;
if the first interface is in a state of plugging a charger and the second interface is in a state of plugging an external device, the first charging passage and the second power supply passage are set to be in a communication state, the charger charges the battery through the first charging passage and the battery supplies power to the external device through the second power supply passage;
if the first interface is in a state of being plugged with external equipment and the second interface is in a state of being plugged with a charger, the first power supply passage is set to be in a disconnected state, the second charging passage is set to be in a connected state, and the charger charges the battery through the second charging passage.
In one embodiment, the method further comprises:
if the first interface is kept in a suspended state, the state of the second interface is changed from suspended to plug-in external equipment, the second charging passage is set to be in a disconnected state, and meanwhile the second power supply passage is set to be in a connected state and current limiting is set for the second power supply passage;
if the first interface is kept in a suspended state, the state of the second interface is changed from the plug-in external equipment to be suspended, the second power supply passage is set to be in a disconnected state, and the second charging passage is set to be in a connected state.
In one embodiment, the method further comprises:
if the first interface keeps the state of the plug-in charger and the state of the second interface is changed from suspended state to the plug-in charger, the first charging passage is set to be in a disconnected state and the second charging passage is set to be in a connected state;
if the first interface keeps the state of the plug-in charger and the state of the second interface is changed from the plug-in charger to be suspended, the second charging passage is set to be in a disconnected state and the first charging passage is set to be in a connected state.
In one embodiment, the method further comprises:
If the charger plugged in the first interface is a quick charging charger, after the first charging passage is set to be in a disconnected state and the second charging passage is set to be in a connected state, the quick charging identifier of the front end interface is switched to be a common charging identifier; and after the second charging path is set to be in an off state and the first charging path is set to be in a communication state, switching the common charging identifier of the front interface to the quick charging identifier.
In one embodiment, the method further comprises:
if the first interface keeps the state of plugging the charger and the state of the second interface is changed from suspended to plugged with external equipment, the second charging passage is set to be in a disconnected state, and the second power supply passage is set to be in a connected state and is provided with a current limit;
if the first interface keeps the state of the plug-in charger and the state of the second interface is changed from the plug-in external equipment to be suspended, the second power supply passage is set to be in a disconnected state.
In one embodiment, the method further comprises:
if the first interface keeps the state of plugging the external equipment and the state of the second interface is changed from suspended state to plugging the charger, the first power supply passage is set to be in a disconnected state and the second charging passage is set to be in a connected state;
If the first interface keeps the state of plugging the external equipment and the state of the second interface is changed from the plugging charger to be suspended, the first power supply passage is set to be in a connected state and the second charging passage is set to be in a disconnected state.
In one embodiment, the method further comprises:
if the first interface keeps the state of plugging the external equipment, and the state of the second interface is changed from suspended to plugged the external equipment, the first power supply passage is set to be in a disconnected state, and the second power supply passage is set to be in a connected state;
if the first interface keeps the state of plugging the external equipment, the state of the second interface is changed from the state of plugging the external equipment to the suspended state, the first power supply passage is set to be in a connected state, and the second power supply passage is set to be in a disconnected state.
In one embodiment, the method further comprises:
if the second interface keeps the state of the plug-in charger, the state of the first interface is changed from suspended state to the plug-in charger, and the original state of the first charging path is not changed;
if the second interface keeps the state of the plug-in charger, the state of the first interface is changed from the plug-in charger to be suspended, and the original state of the first charging path is not changed;
If the second interface keeps the state of the plug-in charger, the state of the first interface is changed from suspended to plug-in external equipment, and the original state of the first power supply channel is not changed;
if the second interface keeps the state of the plug-in charger, the state of the first interface is changed from the plug-in external equipment to be suspended, and the original state of the first power supply channel is not changed.
In one embodiment, the method further comprises:
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from suspended state to plugging the charger, and the first charging path is set to be in a communication state;
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from a plugging charger to be suspended, and the first charging path is set to be in a disconnected state.
In one embodiment, the method further comprises:
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from suspended to plugged the external equipment, and the original state of the first power supply channel is not changed;
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from the state of plugging the external equipment to be suspended, and the original state of the first power supply channel is not changed.
In one embodiment, the terminal device further comprises a first switch, a second switch, a third switch and a BOOST circuit;
the branch circuit where the first switch is located is a physical channel shared by the first charging channel and the first power supply channel, and the charging controller sets the first charging channel or the first power supply channel to be in an open state or a connected state by opening or closing the first switch;
the branch where the second switch is located is the second charging passage, and the charging controller sets the second charging passage to be in an open state or a connected state by opening or closing the second switch;
the third switch and the BOOST circuit form the second power supply path, the charging controller sets the second power supply path to be in an open state or a connection state by opening or closing the third switch, and the BOOST circuit is used for converting the current type so that the converted current is matched with a charger or external equipment plugged in the second interface;
the first interface is a universal serial bus C-Type USB Type-C interface, and the second interface is a spring pin pogo pin interface.
In one embodiment, the method further comprises:
If the first interface and the second interface are in a state of plugging a charger, the first switch and the third switch are opened, and the second switch is closed;
if the first interface and the second interface are in a state of being connected with external equipment in an inserting mode, the first switch and the second switch are opened, and the third switch is closed;
if the first interface is in a state of plugging in a charger and the second interface is in a state of plugging in an external device, closing the first switch and the third switch and switching off the second switch;
if the first interface is in a state of plugging external equipment and the second interface is in a state of plugging a charger, the first switch and the third switch are opened, and the second switch is closed.
In a second aspect, an embodiment of the present application provides an apparatus interface control device, where the device is disposed in a charging controller of a terminal apparatus, the terminal apparatus is further equipped with a battery, a first interface, and a second interface, where the battery is connected to the first interface through a first charging path and a first power supply path, and the battery is connected to the second interface through a second charging path and a second power supply path, and the apparatus includes:
The processing module is used for setting the first charging passage to be in a disconnected state and setting the second charging passage to be in a connected state if the first interface and the second interface are in a state of being connected with a charger, and the charger supplies power to the battery through the first charging passage; if the first interface and the second interface are both in a state of being connected with external equipment in an inserting mode, the first power supply passage is set to be in a disconnected state, the second power supply passage is set to be in a communicating state, and the battery supplies power to the external equipment through the second power supply passage; if the first interface is in a state of plugging a charger and the second interface is in a state of plugging an external device, the first charging passage and the second power supply passage are set to be in a communication state, the charger charges the battery through the first charging passage and the battery supplies power to the external device through the second power supply passage; if the first interface is in a state of being plugged with external equipment and the second interface is in a state of being plugged with a charger, the first power supply passage is set to be in a disconnected state, the second charging passage is set to be in a connected state, and the charger charges the battery through the second charging passage.
In a third aspect, an embodiment of the present application provides an electronic device, including:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions that are invoked by the processor to perform the method provided in the first aspect.
In a fourth aspect, embodiments of the present application provide a computer-readable storage medium including a stored program, wherein the program when executed by a processor implements the method provided in the first aspect.
In the embodiment of the application, the terminal equipment is provided with the first interface and the second interface, when the first interface and the second interface are simultaneously connected with the charger, the terminal equipment sets a first charging passage of the first interface to be in a disconnected state and sets a second charging passage of the second interface to be in a connected state, and the charger supplies power for the terminal equipment through the second interface; when the first interface and the second interface are simultaneously connected with the external equipment in an inserting mode, the terminal equipment sets a first power supply passage of the first interface to be in a disconnected state and sets a second power supply passage of the second interface to be in a communicating state, and the terminal equipment supplies power for the external equipment through the second interface; when the first interface is plugged with a charger and the second interface is plugged with an external device, the terminal device sets the first charging path and the second power supply path to be in a communication state, the charger supplies power to the terminal device through the first interface, and the terminal device supplies power to the external device through the second interface; when the first interface is plugged into the external equipment and the second interface is plugged into the charger, the terminal equipment sets the first power supply passage to be in a disconnected state and sets the second charging passage to be in a connected state, the charger supplies power to the terminal equipment through the second interface, and the external equipment does not respond. When a plurality of interfaces of the terminal equipment are simultaneously connected with the external equipment in an inserting mode, normal operation of the external equipment is achieved through controlling connection or disconnection of the charging channel and the power supply channel.
Drawings
Fig. 1 is a flowchart of a device interface control method according to an embodiment of the present application;
fig. 2 is a schematic structural diagram of an equipment interface control system according to an embodiment of the present application;
FIG. 3 is a schematic diagram of another method for controlling an interface of a device according to an embodiment of the present application;
FIG. 4 is a schematic diagram of another device interface control system according to an embodiment of the present application;
fig. 5 is a schematic structural diagram of an apparatus interface control device according to an embodiment of the present application;
fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
Detailed Description
For a better understanding of the technical solutions of the present specification, the following detailed description of the embodiments of the present application refers to the accompanying drawings.
It should be understood that the described embodiments are only some, but not all, of the embodiments of the present description. All other embodiments, which can be made by one of ordinary skill in the art based on the embodiments herein without making any inventive effort, are intended to be within the scope of the present disclosure.
The terminology used in the embodiments of the application is for the purpose of describing particular embodiments only and is not intended to be limiting of the description. As used in this application and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
At present, terminal devices such as a smart phone and the like can simultaneously support a plurality of interfaces, such as an USB Type-C interface and a pogo pin interface, and the embodiment of the application provides a device interface control method which realizes normal operation of external devices by controlling connection or disconnection of a charging channel and a power supply channel.
Fig. 1 is a flowchart of a device interface control method according to an embodiment of the present application. The method can be applied to terminal equipment such as smart phones, and for convenience in description, the terminal equipment in the embodiment of the application is provided with a first interface and a second interface by default. As shown in fig. 1, the method may include:
step 101, determining the states of the first interface and the second interface.
When the terminal device detects a unplugged signal or an plugged signal of the device interface, determining states of the first interface and the second interface, wherein the states specifically include: suspending, plugging a charger or plugging external equipment.
102, if the first interface and the second interface are both in a state of plugging the charger, setting the first charging path to be in a disconnected state and setting the second charging path to be in a connected state, and supplying power to the battery by the charger through the first charging path; if the first interface and the second interface are both in a state of being connected with external equipment in an inserting mode, the first power supply passage is set to be in a disconnected state, the second power supply passage is set to be in a communicating state, and the battery supplies power to the external equipment through the second power supply passage; if the first interface is in a state of plugging the charger and the second interface is in a state of plugging the external equipment, the first charging path and the second power supply path are set to be in a communication state, the charger charges the battery through the first charging path and the battery supplies power to the external equipment through the second power supply path; if the first interface is in a state of plugging the external equipment and the second interface is in a state of plugging the charger, the first power supply passage is set to be in a disconnected state, the second charging passage is set to be in a connected state, and the charger charges the battery through the second charging passage.
In the embodiment of the application, after the terminal equipment detects the inserting signal or the extracting signal of the equipment interface, the state of the first interface and the state of the second interface are determined, and the 4 paths are set to be in a connection state or a disconnection state according to the interface state, so that the charger or the external equipment inserted into the equipment interface can normally operate.
Fig. 2 is a schematic structural diagram of an equipment interface control system according to an embodiment of the present application. As shown in fig. 2, the system may include a battery 210, a charge controller 220, a first interface 230, and a second interface 240. The specific scene of the embodiment of the application is further described through the system.
The first scene is changed from suspension-suspension into other states:
if the second interface 240 remains suspended and the first interface 230 is changed from suspended to a plug-in charger, the charging controller 220 sets the first charging path to be in a connected state after detecting a charger insertion event, and the charger can charge the battery 210 through the first interface 230.
If the second interface 240 remains floating, the first interface 230 is changed from the plug-in charger to floating, and the charging controller 220 sets the first charging path to be in an off state after detecting the charger unplugging event.
If the second interface 240 remains suspended, the first interface 230 is changed from suspended to connected to the external device, and after the charging controller 220 detects the external device connection event, the first power supply path is set to be in a connected state, and the battery 210 can supply power to the external device through the first interface 230.
If the second interface 240 remains suspended, the first interface 230 is changed from plugging the external device to suspended, and after the charging controller 220 detects an external device unplugging event, the first power supply path is set to be in an off state, and the battery 210 stops supplying power outwards;
if the first interface 230 remains suspended and the second interface 240 changes from suspended to a plug-in charger, the charging controller 220 sets the second charging path to be in a connected state after detecting a charger insertion event, and the charger can charge the battery 210 through the second interface 240. In an actual scenario, the first interface 230 is usually an USB Type-C interface, the second interface 240 is a pogo pin interface, and unlike the first interface 230, the second interface 240 inserts a charger as a new event, and needs to reconfigure the related identifier and monitor of the event.
If the first interface 230 remains floating and the second interface 240 changes from being plugged into a charger to being floating, the charging controller 220 sets the second charging path to be in an off state after detecting a charger unplug event. The second interface 240 extracts the charger as a new event, and also needs to process the extracted event separately by newly adding interception, and delete the relevant identifier.
If the first interface 230 remains suspended and the second interface 240 changes from suspended to plug-in with an external device, the charging controller 220 sets the second power supply path to be in a connected state after detecting an external device insertion event, and the battery 210 can supply power to the external device through the second interface 240. And newly adding monitoring of the event, independently processing the external equipment unplugging event, and adding related identifiers. In an actual circuit, the power supply path and the charging path would communicate at the device interface, and the charging controller 220 would also set the second charging path to an off state in order to prevent current from flowing backward. In addition, the charging controller 220 also sets a current limit for the second power supply path, so that the power supply current meets the standard of the external device.
If the first interface 230 remains suspended and the second interface 240 changes from plugging the external device to suspended, the charging controller 220 sets the second power supply path to be in an off state after detecting the external device unplugging event, and the battery 210 stops supplying power. The unplugged event of the second interface 240 is a new event, and the associated identifier is cleared.
The second type of scene is changed from plug-in charger-suspension to other states:
if the first interface 230 remains a plug-in charger, the second interface 240 changes from floating to plug-in charger, and after detecting this event, the charging controller 220 sets the first charging path to an off state and the second charging path to an on state. Because the charger types of the first interface 230 and the second interface 240 are different, the charging parameters are also typically reconfigured. For example, if the charger inserted in the first interface 230 is a fast charger and the charger inserted in the second interface 240 is a normal charger, the normal charging parameters are configured after switching, and the fast charging identifier (three lightning) of the front end interface is switched to the normal charging identifier (single lightning). In the above process, the charger of the first interface 230 is equivalent to unplug, and in consideration of user experience, only the plug-in event may be reported in the software layer, the unplug event is not reported, and the unplug event is not displayed in the front end interface.
If the first interface 230 keeps the plug-in charger, the second interface 240 is changed from the plug-in charger to be suspended, after the charging controller 220 detects the event, the second charging path is set to be in an off state, and meanwhile, the first interface 230 is detected to be plugged into the charger, the charging stop flow is not entered, the first charging path is set to be in a connected state, and the charger charges the battery 210 through the first interface 230. Meanwhile, the charging parameters are reconfigured, and the common charging identification is switched into the quick charging identification.
If the first interface 230 is kept plugged with the charger, the second interface 240 is changed from suspended to plugged with the external device, and the charging controller 220 sets the second charging path to be in a connected state after detecting the event. The charger charges the battery 210 through the first interface 230, and the battery 210 supplies power to the external device through the second interface 240. In an actual scenario, the terminal device is charged through the first interface 230, and performs data interaction through the second interface 240, so as to realize cooperative work of the two device interfaces.
If the first interface 230 keeps the plug-in charger, the second interface 240 is changed from the plug-in external device to be suspended, and the charging controller 220 sets the second power supply path to be in an off state after detecting the event.
The third type of scene is changed from plugging external equipment-suspending into other states:
if the first interface 230 is kept plugged with an external device, the second interface 240 is changed from suspended to plugged with a charger, and after the charging controller 220 detects the event, the first power supply path is set to be in an off state and the second charging path is set to be in an on state. The charger plugged into the second interface 240 is usually low in power, and cannot supply power to the external device plugged into the first interface at the same time, so that the first power supply path needs to be cut off.
If the first interface 230 is kept plugged into an external device, the second interface 240 is suspended from the plug-in charger, and after the charging controller 220 detects the event, the first power supply path is set to be in a connected state and the second charging path is set to be in a disconnected state, so that the battery 210 supplies power to the external device through the first interface 230 again.
If the first interface 230 is kept plugged into the external device, the second interface 240 is changed from suspended to plugged into the external device, and after the charging controller 220 detects the event, the first power supply path is set to be in an off state and the second power supply path is set to be in a connected state, and the battery 210 supplies power to the external device through the second interface 240. At the same time, the second charging path is set to an off state, preventing current from flowing backward. Although both device interfaces are plugged into external devices, the data transmission in the direction of the second interface 240 is ensured, and the data path in the direction of the first interface 230 is cut off, so that the first power supply path is not necessarily kept connected.
If the first interface 230 is kept plugged with the external device, the second interface 240 is changed from the plugged external device to be suspended, and after the charging controller 220 detects the event, the first power supply path is set to be in a connected state and the second power supply path is set to be in a disconnected state, so that the battery 210 supplies power to the external device through the first interface 230 again.
A fourth type of scenario, change from a hover-plug charger to other states:
if the second interface 240 remains a plug-in charger, the first interface 230 is changed from a floating state to a plug-in charger, and after detecting the event, the charging controller 220 does not respond, so as to ensure that the second interface 240 is used for charging preferentially.
If the second interface 240 remains plugged in the charger, the first interface 230 becomes unsettled from the plugged in charger and does not respond after the charging controller 220 detects the event.
If the second interface 240 remains plugged with the charger, the first interface 230 is changed from suspended to plugged with the external device, and the charging controller 220 does not respond after detecting the event, so as to ensure that the second interface 240 is used for charging preferentially.
If the second interface 240 remains plugged into the charger, the first interface 230 becomes unsettled from the plugged external device, and the charging controller 220 does not respond after detecting the event.
It will be appreciated that if the second interface 240 remains plugged in to the charger, the charge controller 220 does not respond to the state change of the first interface 230, and the first power path and the first charging path remain disconnected at all times.
A fifth type of scene is changed from a suspended-plug external device to other states:
if the second interface 240 is kept plugged with an external device, the first interface 230 is changed from suspended to plugged with a charger, and the charging controller 220 sets the first charging path to be in a connected state after detecting the event.
If the second interface 240 keeps plugging the external device, the first interface 230 is changed from plugging the external device to hanging, and the charging controller 220 sets the first charging path to be in an off state after detecting the event.
If the second interface 240 remains plugged into the external device, the first interface 230 is changed from floating to plugging into the external device, and the charging controller 220 does not respond after detecting the event.
If the second interface 240 remains plugged with the external device, the first interface 230 is changed from plugged with the external device to be suspended, and the charging controller 220 does not respond after detecting the event.
In the embodiment of the present invention, all states of the first interface and the second interface may be as shown in fig. 3. When the first interface and the second interface are both inserted into the equipment, if the second interface is inserted into the charger, the charger charges the terminal equipment through the second interface, and the first interface does not work; if the second interface is inserted into the external equipment and the first interface is inserted into the charger, the charger charges the key equipment through the first interface, and the terminal equipment supplies power to the external equipment through the second interface; if the first interface and the second interface are inserted into the external equipment, the terminal equipment supplies power to the external equipment only through the second interface, and the external equipment at the first interface does not interact with the terminal equipment. When only the first interface is inserted into the charger, the charger charges the terminal equipment through the first interface; when only the second interface is inserted into the charger, the charger charges the terminal equipment through the second interface; when only the first interface is inserted into the external equipment, the terminal equipment supplies power to the external equipment through the first interface; when only the second interface is inserted into the external device, the terminal device supplies power to the external device through the second interface.
Through the logic control, the cooperative management of the equipment interfaces can be ensured, and the requirements of different user scenes can be met.
In one embodiment, the specific circuit design of the device interface control system may be as shown in fig. 4. Specifically, the battery pack comprises a battery 410, a charge controller 420, a USB Type-C interface 430, a first switch 431, a pogo pin interface 440, a second switch 441, a BOOST circuit 450, a third switch 451, a data chip 460 and a data switch 461. The USB Type-C interface 430 is a first interface, the pogo pin interface 440 is a second interface, the branch where the first switch 431 is located is a first charging path and a first power supply path, the first charging path and the first power supply path share a physical path, the first switch 431 controls the connection or disconnection of the first charging path and the first power supply path, the branch where the second switch 441 is located is a second charging path, the second switch 441 controls the connection or disconnection of the second charging path, and the BOOST circuit 450 and the third switch 451 form a second power supply path. When USB Type-C interface 430 is plugged into the charger, charge controller 420 sets the first charge path to a connected state by closing first switch 431, where second switch 441 and third switch 451 are normally set to open; when the USB Type-C interface 430 is plugged into an external device, the data chip 460 performs data interaction with the external device through the USB Type-C interface 430, the first switch 431 is closed, the second switch 441 and the third switch 451 are opened, the charging controller 420 enters a power supply mode, the battery 410 is controlled to supply power to the external device in a reverse direction, and compared with the case that the USB Type-C interface 430 is plugged into the external device and the charger is plugged into the external device, the current paths are the same and the directions are opposite. When the pogo pin interface 440 is plugged into the charger, the charging controller sets the first charging path to be in a connected state by closing the second switch 441, and the first switch 431 and the third switch 451 are opened; when the pogo pin interface 440 is plugged into an external device, the data chip 460 performs data interaction with the external device through the pogo pin interface 440, the third switch 451 is closed, the current of the battery 410 flows through the BOOST circuit 450 to supply power to the external device, in order to avoid that the current flows back to the battery 410 (current flows backward) through the second switch 441, the current switch 441 is further opened, and the first switch 431 is also normally set to be opened. When the pogo pin interface 440 is plugged into an external device, the BOOST current 450 may be used to convert the current flowing from the battery 410 to a type that matches the converted current with the external device.
Fig. 5 is a schematic structural diagram of an apparatus interface control device according to an embodiment of the present application. The device may implement the device interface control method provided by the embodiment of the present application, as shown in fig. 5, the device may include: a determination module 510 and a processing module 520.
A determining module 510 is configured to determine states of the first interface and the second interface.
The processing module 520 is configured to set the first charging path to an off state and set the second charging path to an on state if both the first interface and the second interface are in a state of plugging the charger, and the charger supplies power to the battery through the first charging path; if the first interface and the second interface are both in a state of being connected with external equipment in an inserting mode, the first power supply passage is set to be in a disconnected state, the second power supply passage is set to be in a communicating state, and the battery supplies power to the external equipment through the second power supply passage; if the first interface is in a state of plugging the charger and the second interface is in a state of plugging the external equipment, the first charging path and the second power supply path are set to be in a communication state, the charger charges the battery through the first charging path and the battery supplies power to the external equipment through the second power supply path; if the first interface is in a state of plugging the external equipment and the second interface is in a state of plugging the charger, the first power supply passage is set to be in a disconnected state, the second charging passage is set to be in a connected state, and the charger charges the battery through the second charging passage.
Fig. 6 is a schematic structural diagram of an electronic device according to an embodiment of the present application.
The electronic device 600 is deployed on a terminal device such as a smart phone, and the electronic device 600 may include a processor 610, an internal memory 620, and the like.
The processor 610 may include one or more processing units, and the different processing units may be separate devices or may be integrated into one or more processors.
A memory may also be provided in the processor 610 for storing instructions and data. In some embodiments, the memory in the processor 610 is a cache memory. The memory may hold instructions or data that the processor 610 has just used or recycled. If the processor 610 needs to reuse the instruction or data, it may be called directly from the memory. Repeated accesses are avoided, reducing the latency of the processor 610 and thus improving the efficiency of the system.
Internal memory 620 may be used to store computer-executable program code that includes instructions. The internal memory 620 may include a storage program area and a storage data area. In addition, the internal memory 620 may include a high-speed random access memory, and may also include a nonvolatile memory, such as at least one magnetic disk storage device, a flash memory device, a universal flash memory (universal flash storage, UFS), and the like.
In the embodiment of the present application, the processor 610 may be configured to implement a charging controller, and when the processor 610 detects a plug-in signal or a plug-out signal of an interface of a device, the processor invokes an instruction stored in the internal memory 620 and/or an instruction stored in a memory provided in the processor to set the first charging path, the first power supply path, the second charging path, or the second power supply path to be in a connected state or a disconnected state, so as to implement normal operation of a plurality of interfaces of a terminal device.
The embodiment of the application also provides a non-transitory computer readable storage medium, which stores computer instructions that enable the computer to execute the device interface control method provided by the embodiment of the application.
The non-transitory computer readable storage media described above may employ any combination of one or more computer readable media. The computer readable medium may be a computer readable signal medium or a computer readable storage medium. The computer readable storage medium can be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or a combination of any of the foregoing. More specific examples (a non-exhaustive list) of the computer-readable storage medium would include the following: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a Read-Only Memory (ROM), an erasable programmable Read-Only Memory (Erasable Programmable Read Only Memory; EPROM) or flash Memory, an optical fiber, a portable compact disc Read-Only Memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing. In this document, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device.
The computer readable signal medium may include a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take any of a variety of forms, including, but not limited to, electro-magnetic, optical, or any suitable combination of the foregoing. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device.
Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to wireless, wireline, optical fiber cable, RF, etc., or any suitable combination of the foregoing.
In the description of the present specification, a description referring to terms "one embodiment," "some embodiments," "examples," "specific examples," or "some examples," etc., means that a particular feature, structure, material, or characteristic described in connection with the embodiment or example is included in at least one embodiment or example of the present application. In this specification, schematic representations of the above terms are not necessarily directed to the same embodiment or example. Furthermore, the particular features, structures, materials, or characteristics described may be combined in any suitable manner in any one or more embodiments or examples. Furthermore, the different embodiments or examples described in this specification and the features of the different embodiments or examples may be combined and combined by those skilled in the art without contradiction.
Furthermore, the terms "first," "second," and the like, are used for descriptive purposes only and are not to be construed as indicating or implying a relative importance or implicitly indicating the number of technical features indicated. Thus, a feature defining "a first" or "a second" may explicitly or implicitly include at least one such feature. In the description of the present application, the meaning of "plurality" means at least two, for example, two, three, etc., unless specifically defined otherwise.
Any process or method descriptions in flow charts or otherwise described herein may be understood as representing modules, segments, or portions of code which include one or more executable instructions for implementing specific logical functions or steps of the process, and additional implementations are included within the scope of the preferred embodiment of the present application in which functions may be executed out of order from that shown or discussed, including substantially concurrently or in reverse order from that shown or discussed, depending on the functionality involved, as would be understood by those reasonably skilled in the art of the embodiments of the present application.

Claims (15)

1. A device interface control method, wherein the method is applied to a charging controller of a terminal device, the terminal device is further provided with a battery, a first interface and a second interface, the battery is connected with the first interface through a first charging path and a first power supply path, and the battery is connected with the second interface through a second charging path and a second power supply path, the method comprises:
If the first interface and the second interface are both in a state of being connected with a charger in an inserted mode, the first charging passage is set to be in an off state, the second charging passage is set to be in a communication state, and the charger supplies power to the battery through the first charging passage;
if the first interface and the second interface are both in a state of being connected with external equipment in an inserting mode, the first power supply passage is set to be in a disconnected state, the second power supply passage is set to be in a communicating state, and the battery supplies power to the external equipment through the second power supply passage;
if the first interface is in a state of plugging a charger and the second interface is in a state of plugging an external device, the first charging passage and the second power supply passage are set to be in a communication state, the charger charges the battery through the first charging passage and the battery supplies power to the external device through the second power supply passage;
if the first interface is in a state of being plugged with external equipment and the second interface is in a state of being plugged with a charger, the first power supply passage is set to be in a disconnected state, the second charging passage is set to be in a connected state, and the charger charges the battery through the second charging passage.
2. The method according to claim 1, wherein the method further comprises:
if the first interface is kept in a suspended state, the state of the second interface is changed from suspended to plug-in external equipment, the second charging passage is set to be in a disconnected state, and meanwhile the second power supply passage is set to be in a connected state and current limiting is set for the second power supply passage;
if the first interface is kept in a suspended state, the state of the second interface is changed from the plug-in external equipment to be suspended, the second power supply passage is set to be in a disconnected state, and the second charging passage is set to be in a connected state.
3. The method according to claim 1, wherein the method further comprises:
if the first interface keeps the state of the plug-in charger and the state of the second interface is changed from suspended state to the plug-in charger, the first charging passage is set to be in a disconnected state and the second charging passage is set to be in a connected state;
if the first interface keeps the state of the plug-in charger and the state of the second interface is changed from the plug-in charger to be suspended, the second charging passage is set to be in a disconnected state and the first charging passage is set to be in a connected state.
4. A method according to claim 3, characterized in that the method further comprises:
if the charger plugged in the first interface is a quick charging charger, after the first charging passage is set to be in a disconnected state and the second charging passage is set to be in a connected state, the quick charging identifier of the front end interface is switched to be a common charging identifier; and after the second charging path is set to be in an off state and the first charging path is set to be in a communication state, switching the common charging identifier of the front interface to the quick charging identifier.
5. The method according to claim 1, wherein the method further comprises:
if the first interface keeps the state of plugging the charger and the state of the second interface is changed from suspended to plugged with external equipment, the second charging passage is set to be in a disconnected state, and the second power supply passage is set to be in a connected state and is provided with a current limit;
if the first interface keeps the state of the plug-in charger and the state of the second interface is changed from the plug-in external equipment to be suspended, the second power supply passage is set to be in a disconnected state.
6. The method according to claim 1, wherein the method further comprises:
If the first interface keeps the state of plugging the external equipment and the state of the second interface is changed from suspended state to plugging the charger, the first power supply passage is set to be in a disconnected state and the second charging passage is set to be in a connected state;
if the first interface keeps the state of plugging the external equipment and the state of the second interface is changed from the plugging charger to be suspended, the first power supply passage is set to be in a connected state and the second charging passage is set to be in a disconnected state.
7. The method according to claim 1, wherein the method further comprises:
if the first interface keeps the state of plugging the external equipment, and the state of the second interface is changed from suspended to plugged the external equipment, the first power supply passage is set to be in a disconnected state, and the second power supply passage is set to be in a connected state;
if the first interface keeps the state of plugging the external equipment, the state of the second interface is changed from the state of plugging the external equipment to the suspended state, the first power supply passage is set to be in a connected state, and the second power supply passage is set to be in a disconnected state.
8. The method according to claim 1, wherein the method further comprises:
If the second interface keeps the state of the plug-in charger, the state of the first interface is changed from suspended state to the plug-in charger, and the original state of the first charging path is not changed;
if the second interface keeps the state of the plug-in charger, the state of the first interface is changed from the plug-in charger to be suspended, and the original state of the first charging path is not changed;
if the second interface keeps the state of the plug-in charger, the state of the first interface is changed from suspended to plug-in external equipment, and the original state of the first power supply channel is not changed;
if the second interface keeps the state of the plug-in charger, the state of the first interface is changed from the plug-in external equipment to be suspended, and the original state of the first power supply channel is not changed.
9. The method according to claim 1, wherein the method further comprises:
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from suspended state to plugging the charger, and the first charging path is set to be in a communication state;
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from a plugging charger to be suspended, and the first charging path is set to be in a disconnected state.
10. The method according to claim 1, wherein the method further comprises:
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from suspended to plugged the external equipment, and the original state of the first power supply channel is not changed;
if the second interface keeps the state of plugging the external equipment, the state of the first interface is changed from the state of plugging the external equipment to be suspended, and the original state of the first power supply channel is not changed.
11. The method of any of claims 1 to 10, wherein the terminal device further comprises a first switch, a second switch, a third switch, and a BOOST circuit;
the branch circuit where the first switch is located is a physical channel shared by the first charging channel and the first power supply channel, and the charging controller sets the first charging channel or the first power supply channel to be in an open state or a connected state by opening or closing the first switch;
the branch where the second switch is located is the second charging passage, and the charging controller sets the second charging passage to be in an open state or a connected state by opening or closing the second switch;
The third switch and the BOOST circuit form the second power supply path, the charging controller sets the second power supply path to be in an open state or a connection state by opening or closing the third switch, and the BOOST circuit is used for converting the current type so that the converted current is matched with a charger or external equipment plugged in the second interface;
the first interface is a universal serial bus C-Type USB Type-C interface, and the second interface is a spring pin pogo pin interface.
12. The method of claim 11, wherein the method further comprises:
if the first interface and the second interface are in a state of plugging a charger, the first switch and the third switch are opened, and the second switch is closed;
if the first interface and the second interface are in a state of being connected with external equipment in an inserting mode, the first switch and the second switch are opened, and the third switch is closed;
if the first interface is in a state of plugging in a charger and the second interface is in a state of plugging in an external device, closing the first switch and the third switch and switching off the second switch;
If the first interface is in a state of plugging external equipment and the second interface is in a state of plugging a charger, the first switch and the third switch are opened, and the second switch is closed.
13. The utility model provides a device interface controlling means, its characterized in that, the device is disposed in terminal equipment's charge controller, terminal equipment still is equipped with battery, first interface and second interface, the battery pass through first charging path, first power supply path with first interface connection, the battery pass through second charging path, second power supply path with second interface connection, the device includes:
the processing module is used for setting the first charging passage to be in a disconnected state and setting the second charging passage to be in a connected state if the first interface and the second interface are in a state of being connected with a charger, and the charger supplies power to the battery through the first charging passage; if the first interface and the second interface are both in a state of being connected with external equipment in an inserting mode, the first power supply passage is set to be in a disconnected state, the second power supply passage is set to be in a communicating state, and the battery supplies power to the external equipment through the second power supply passage; if the first interface is in a state of plugging a charger and the second interface is in a state of plugging an external device, the first charging passage and the second power supply passage are set to be in a communication state, the charger charges the battery through the first charging passage and the battery supplies power to the external device through the second power supply passage; if the first interface is in a state of being plugged with external equipment and the second interface is in a state of being plugged with a charger, the first power supply passage is set to be in a disconnected state, the second charging passage is set to be in a connected state, and the charger charges the battery through the second charging passage.
14. An electronic device, comprising:
at least one processor; and
at least one memory communicatively coupled to the processor, wherein:
the memory stores program instructions that are called by the processor to be able to perform the method of any one of claims 1 to 12.
15. A computer readable storage medium, characterized in that the computer readable storage medium comprises a stored program, wherein the program when executed by a processor implements the method according to any of claims 1 to 12.
CN202211522427.9A 2022-11-30 2022-11-30 Equipment interface control method and device Active CN116667471B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202211522427.9A CN116667471B (en) 2022-11-30 2022-11-30 Equipment interface control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202211522427.9A CN116667471B (en) 2022-11-30 2022-11-30 Equipment interface control method and device

Publications (2)

Publication Number Publication Date
CN116667471A true CN116667471A (en) 2023-08-29
CN116667471B CN116667471B (en) 2023-11-21

Family

ID=87710536

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202211522427.9A Active CN116667471B (en) 2022-11-30 2022-11-30 Equipment interface control method and device

Country Status (1)

Country Link
CN (1) CN116667471B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN112838635A (en) * 2021-01-06 2021-05-25 闻泰通讯股份有限公司 Interface circuit and intelligent device
CN114079302A (en) * 2020-08-18 2022-02-22 荣耀终端有限公司 Charging circuit, charging chip, electronic device and charging method

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN114079302A (en) * 2020-08-18 2022-02-22 荣耀终端有限公司 Charging circuit, charging chip, electronic device and charging method
CN112838635A (en) * 2021-01-06 2021-05-25 闻泰通讯股份有限公司 Interface circuit and intelligent device

Also Published As

Publication number Publication date
CN116667471B (en) 2023-11-21

Similar Documents

Publication Publication Date Title
KR101504104B1 (en) System and method for providing power through a reverse local data transfer connection
US8898492B2 (en) System, method and mobile terminal for sharing battery between mobile terminals
CN103219770B (en) Mobile terminal with multi-port charging control function
CN108988431B (en) Multi-protocol charging device and multi-protocol charging method
CN101783427B (en) Intelligent charging method and intelligent charging device of terminal
CN106066840A (en) A kind of method switching electronic equipment master slave mode and a kind of electronic equipment
CN100454188C (en) Connection seat of portable electronic device
CN102981916B (en) A kind of mobile terminal and control method thereof and device
CN105098563A (en) Method and system for realizing positive and negative plugging of universal series bus (USB) interface and USB data line
CN105518967A (en) Apparatus and method to change current limit
CN101882701A (en) Charging method and system
CN101853970A (en) Method and device for charging through universal serial bus (USB) interface
CN201039411Y (en) A mobile phone with self-adapted charging device
WO2021027882A1 (en) Charging management system, method, and apparatus, and storage medium
WO2014006619A1 (en) Method and system of charging a mobile device
CN102185972A (en) Novel mobile terminal software upgrading system and method as well as mobile terminal
CN106921192A (en) Terminal and electricity sharing method
CN105048018A (en) Charging method and device for terminal having on-the-go (OTG) function
CN116667471B (en) Equipment interface control method and device
CN108181978B (en) Power control method and device for electronic equipment
CN106451628A (en) OTG charging control circuit and charging control method
CN101359836B (en) Self-switching charging circuit
CN216530587U (en) Power supply connector for supplying power to master equipment and slave equipment
CN214314637U (en) One-to-two quick-charging data line adopting TYPE-C interface input
CN109066906B (en) Charging circuit and integral type head-mounted apparatus

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant