CN108988404A - A kind of method and mobile terminal of mobile terminal charging - Google Patents
A kind of method and mobile terminal of mobile terminal charging Download PDFInfo
- Publication number
- CN108988404A CN108988404A CN201710400366.1A CN201710400366A CN108988404A CN 108988404 A CN108988404 A CN 108988404A CN 201710400366 A CN201710400366 A CN 201710400366A CN 108988404 A CN108988404 A CN 108988404A
- Authority
- CN
- China
- Prior art keywords
- mobile terminal
- terminal
- movement
- interface
- battery
- 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.)
- Pending
Links
Classifications
-
- H—ELECTRICITY
- H02—GENERATION; CONVERSION OR DISTRIBUTION OF ELECTRIC POWER
- H02J—CIRCUIT ARRANGEMENTS OR SYSTEMS FOR SUPPLYING OR DISTRIBUTING ELECTRIC POWER; SYSTEMS FOR STORING ELECTRIC ENERGY
- H02J7/00—Circuit arrangements for charging or depolarising batteries or for supplying loads from batteries
- H02J7/34—Parallel operation in networks using both storage and other dc sources, e.g. providing buffering
- H02J7/342—The other DC source being a battery actively interacting with the first one, i.e. battery to battery charging
Landscapes
- Engineering & Computer Science (AREA)
- Power Engineering (AREA)
- Charge And Discharge Circuits For Batteries Or The Like (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention provides a kind of method and devices of mobile terminal charging, wherein the method includes when detect connect by the Type-C interface with the second mobile terminal when, the battery capacity of acquisition second mobile terminal;Judge whether the battery capacity of the first movement terminal is greater than the battery capacity of second mobile terminal;If so, setting main equipment for the first movement terminal, charge to the battery of second mobile terminal;If it is not, then the first movement terminal is set as being charged from equipment by battery of second mobile terminal to the first movement terminal.Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment, when solving two mobile terminals connections, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Description
Technical field
The present invention relates to fields of communication technology, more particularly, to the method and mobile terminal of a kind of charging of mobile terminal.
Background technique
With the development of electronic technology and the communication technology, intelligent mobile terminal have become people's routine work, life
Necessary article.
Mobile terminal can listen to music, take pictures, storing data, two mobile terminals with OTG (On-The-Go) function
It can also realize interconnection.
Currently, when two mobile terminals with OTG function are connected, one of them can be defaulted as main equipment, another
As from equipment, default master from equipment to being charged or powered.But the main equipment of default setting is likely to be
The lower mobile terminal of battery capacity will cause low battery mobile terminal at this time and charge to high electric quantity mobile terminal, this has
The wish that may wish that high electric quantity mobile terminal charges to low battery mobile terminal with user is not inconsistent.
Summary of the invention
The embodiment of the present invention proposes the method and mobile terminal of a kind of mobile terminal charging, mobile to solve mesh the first two
When terminal connects, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
In a first aspect, being connect the embodiment of the invention provides a kind of method of mobile terminal charging applied to Type-C
The first movement terminal of mouth, which comprises
When detect connect by the Type-C interface with the second mobile terminal when, obtain second mobile terminal
Battery capacity;
Judge whether the battery capacity of the first movement terminal is greater than the battery capacity of second mobile terminal;
If so, setting main equipment for the first movement terminal, the battery of second mobile terminal is filled
Electricity;
If it is not, then setting the first movement terminal to from equipment, moved by second mobile terminal to described first
The battery of dynamic terminal charges.
Second aspect, provides a kind of mobile terminal, and the mobile terminal is that the first movement with Type-C interface is whole
End, the mobile terminal include:
Electricity obtain module, for when detect connect by the Type-C interface with the second mobile terminal when, acquisition
The battery capacity of second mobile terminal;
Electricity judgment module, for judging it is mobile whole whether the battery capacity of the first movement terminal is greater than described second
The battery capacity at end;
First setup module, for setting main equipment for the first movement terminal, to second mobile terminal
Battery charges;
Second setup module, for setting the first movement terminal to from equipment, by second mobile terminal pair
The battery of the first movement terminal charges.
In embodiments of the present invention, it is connect by Type-C interface with the second mobile terminal when first movement terminal is detected
When, the battery capacity of the second mobile terminal is obtained, and it is mobile whole to judge whether the battery capacity of first movement terminal is greater than second
The battery capacity at end charges to the battery of the second mobile terminal if so, setting main equipment for first movement terminal,
If it is not, then be set as being charged from equipment by battery of second mobile terminal to first movement terminal by first movement terminal,
Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment,
When solving the connection of two mobile terminals, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Detailed description of the invention
In order to illustrate the technical solution of the embodiments of the present invention more clearly, below by institute in the description to the embodiment of the present invention
Attached drawing to be used is needed to be briefly described, it should be apparent that, the accompanying drawings in the following description is only some implementations of the invention
Example, for those of ordinary skill in the art, without any creative labor, can also be according to these attached drawings
Obtain other attached drawings.
Fig. 1 is a kind of step flow chart of the method for mobile terminal charging of the embodiment of the present invention one;
Fig. 2 is a kind of step flow chart of the method for mobile terminal charging of the embodiment of the present invention two;
Fig. 3 A is a kind of one of the structural block diagram of mobile terminal of the embodiment of the present invention three;
Fig. 3 B is the two of the structural block diagram of a kind of mobile terminal of the embodiment of the present invention three;
Fig. 3 C is the three of the structural block diagram of a kind of mobile terminal of the embodiment of the present invention three;
Fig. 3 D is the four of the structural block diagram of a kind of mobile terminal of the embodiment of the present invention three;
Fig. 3 E is the five of the structural block diagram of a kind of mobile terminal of the embodiment of the present invention three;
Fig. 4 is a kind of structural block diagram of mobile terminal of the embodiment of the present invention four;
Fig. 5 is a kind of structural schematic diagram of mobile terminal of the embodiment of the present invention five.
Specific embodiment
Following will be combined with the drawings in the embodiments of the present invention, and technical solution in the embodiment of the present invention carries out clear, complete
Site preparation description, it is clear that described embodiments are some of the embodiments of the present invention, instead of all the embodiments.Based on this hair
Embodiment in bright, every other implementation obtained by those of ordinary skill in the art without making creative efforts
Example, shall fall within the protection scope of the present invention.
Embodiment one
Fig. 1 is a kind of step flow chart of the method for mobile terminal charging of the embodiment of the present invention one.
Shown in referring to Fig.1, a kind of method of mobile terminal charging of the embodiment of the present invention is applied to have Type-C interface
First movement terminal, this method comprises:
Step 101, when detect connect by the Type-C interface with the second mobile terminal when, obtain it is described second move
The battery capacity of dynamic terminal.
In the embodiment of the present invention, first movement terminal and the second mobile terminal are provided with Type-C interface, and first movement is whole
End can be connected with the second mobile terminal by Type-C interface, and first movement terminal and the second mobile terminal all can serve as
Main equipment or from equipment.Specifically, the first movement terminal of the embodiment of the present invention and the second mobile terminal have the function of OTG,
It all can serve as main equipment;Therefore, can when first movement terminal is connected with the second mobile terminal by Type-C interface,
First movement terminal obtains the battery capacity of the second mobile terminal, it is of course also possible to be the second acquisition for mobile terminal first movement
The battery capacity of terminal.
Step 102, judge whether the battery capacity of the first movement terminal is greater than the battery of second mobile terminal
Electricity.
In the embodiment of the present invention, first movement terminal can obtain the electricity of first movement terminal from the system data of itself
Pond electricity.After the battery capacity for receiving the second mobile terminal, in order to determine first movement terminal as main equipment still from
Equipment, it can be determined that whether the battery capacity of first movement terminal is greater than the battery capacity of the second mobile terminal;If so, executing step
Rapid 103;If it is not, executing step 104.
Step 103, main equipment is set by the first movement terminal, the battery of second mobile terminal is filled
Electricity.
When the battery capacity of first movement terminal is greater than the battery capacity of the second mobile terminal, to realize that high electricity is mobile
Terminal charges to low battery mobile terminal, can set first movement terminal to main equipment, be attached thereto accordingly
Second mobile terminal is automatically set as from equipment, to realize that first movement terminal fills the battery of the second mobile terminal
Electricity.
Step 104, it sets the first movement terminal to from equipment, is moved by second mobile terminal to described first
The battery of dynamic terminal charges.
It is mobile to solve low battery when battery capacity of the battery capacity of first movement terminal less than the second mobile terminal
The problem of terminal charges to high electric quantity mobile terminal can set first movement terminal to from equipment, accordingly therewith
Second mobile terminal of connection is automatically set as main equipment, thus realize the second mobile terminal to the battery of first movement terminal into
Row charging.
In embodiments of the present invention, when detecting that first movement terminal connect by Type-C interface with the second mobile terminal
When, the battery capacity of the second mobile terminal is obtained, and it is mobile whole to judge whether the battery capacity of first movement terminal is greater than second
The battery capacity at end;If so, setting main equipment for first movement terminal, charge to the battery of the second mobile terminal;
If it is not, then first movement terminal is set as being charged from equipment by battery of second mobile terminal to first movement terminal.
Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment,
When solving the connection of two mobile terminals, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Embodiment two
Fig. 2 is a kind of step flow chart of the method for mobile terminal charging of the embodiment of the present invention two.
Referring to shown in Fig. 2, a kind of method of mobile terminal charging of the embodiment of the present invention is applied to have Type-C interface
First movement terminal, this method comprises:
Step 201, the voltage of the CC1 or CC2 pin of the Type-C interface is detected.
In the embodiment of the present invention, first movement terminal and the second mobile terminal are provided with Type-C interface, and first movement is whole
End can be connected with the second mobile terminal by Type-C interface.The Type-C interface have multiple groups pin, including TX, RX,
The pins such as CC1, CC2, D+, D-, SBU1, SBU2;Wherein CC1 and CC2 is two key pins, can be used for realizing detection access,
Distinguish front and back sides, distinguish principal and subordinate, configure other modes etc..First movement terminal and the second mobile terminal can be connect by Type-C
CC1 pin, the CC2 pin of mouth carry out handshake communication, and main equipment is arranged and from equipment, identifies the device type of opposite end, e.g.
Store equipment, charging equipment or main equipment etc..Therefore can by detect first movement terminal Type C interface CC1 or
The voltage value of person's CC2 pin, to determine whether the second mobile terminal is connected to first movement terminal.
Step 202, when the voltage is predeterminated voltage, the first movement terminal is confirmly detected described in
Type-C interface is connect with second mobile terminal.
In the embodiment of the present invention, the voltage value and device type mapping table of CC1 CC2 pin can be preset, is led to
The voltage value in relation table is crossed, may indicate that the device type of CC1 CC2 pin opposite end connection.Implement specific to the present invention
In example, when can preset the second mobile terminal and being connected to first movement terminal, CC1 the CC2 pin of first movement terminal
Voltage value;When detecting the voltage value, it can determine that the second mobile terminal is connected in first movement terminal.
Step 203, the battery capacity of second mobile terminal is obtained.
It is provided with voltameter in first movement terminal and the second mobile terminal, first can be obtained in real time by voltameter
The battery capacity of the battery capacity of mobile terminal and the second mobile terminal, the second mobile terminal can pass through Type-C interface
At least one set in the pins such as TX, RX, CC1, CC2, D+, D-, SBU1, SBU2 is sent to first movement terminal.
Step 204, judge whether the battery capacity of the first movement terminal is greater than the battery of second mobile terminal
Electricity.
In the embodiment of the present invention, first movement terminal can obtain the electricity of first movement terminal from the system data of itself
Pond electricity, after through battery capacity of the Type-C interface to the second mobile terminal, in order to determine that first movement terminal is made
It is main equipment still from equipment, it can be determined that whether the battery capacity of first movement terminal is greater than the battery electricity of the second mobile terminal
Amount;If so, executing step 205;If it is not, executing step 206.
Step 205, main equipment is set by the first movement terminal, the battery of second mobile terminal is filled
Electricity.
When the battery capacity of first movement terminal is greater than the battery capacity of the second mobile terminal, to realize that high electricity is mobile
Terminal charges to low battery mobile terminal, can set first movement terminal to main equipment, be attached thereto accordingly
Second mobile terminal is automatically set as from equipment.
In embodiments of the present invention, step 205 may include following sub-step:
CC1 the or CC2 pin of the Type-C interface of the first movement terminal is pulled to high level by sub-step 2051,
Using by the first movement terminal as main equipment.
In the main equipment of Type-C interface and from equipment setting, it can be and CC1 pin or CC2 are drawn by pull-up resistor
The equipment that the level of foot is drawn high is made as main equipment by the equipment that pull down resistor drags down the level of CC1 pin or CC2 pin
For from equipment.Therefore, in the embodiment of the present invention, CC1 the or CC2 pin of the Type-C interface of first movement terminal can be passed through
Pull-up resistor is drawn high to high level, using first movement terminal as main equipment;Second mobile terminal detects first movement end
After the CC1 pin or CC2 pin at end are pulled to high level, the second mobile terminal leads to CC1 the or CC2 pin of its Type-C interface
It crosses pull down resistor and is pulled low to low level, such as pull down to ground, using the second mobile terminal as from equipment.
Sub-step 2052 exports charging voltage by the Vbus pin of the Type-C interface, with mobile to described second
The battery of terminal charges.
After first movement terminal and the second mobile terminal complete master and slave equipment setting, filled by CC1 or CC2 pin
Charging voltage is arranged in electro-detection, first movement terminal, naturally it is also possible to be setting charging current, then be exported by Vbus pin
Charging voltage or charging current are charged with the battery to the second mobile terminal.
Step 206, it sets the first movement terminal to from equipment, is moved by second mobile terminal to described first
The battery of dynamic terminal charges.
It is mobile to solve low battery when battery capacity of the battery capacity of first movement terminal less than the second mobile terminal
The problem of terminal charges to high electric quantity mobile terminal can set first movement terminal to from equipment, accordingly therewith
Second mobile terminal of connection is automatically set as main equipment, then step 206 may include following sub-step:
CC1 the or CC2 pin of the Type-C interface of the first movement terminal is pulled down to low level by sub-step 2061,
Using by the first movement terminal as from equipment.
In the embodiment of the present invention, if the battery capacity of first movement terminal less than the battery capacity of the second mobile terminal,
CC1 the or CC2 pin of the Type-C interface of first movement terminal can be pulled low to low level by pull down resistor, by first
Mobile terminal is used as from equipment;Second mobile terminal detects that the CC1 pin of first movement terminal or CC2 pin are pulled down to low electricity
After flat, the second mobile terminal draws high CC1 the or CC2 pin of its Type-C interface to high level by pull-up resistor, by the
Two mobile terminals are as main equipment.
Sub-step 2062, when second mobile terminal exports charging voltage to the Vbus pin, by described
The Vbus pin of Type-C interface charges to the battery of the first movement terminal.
After first movement terminal and the second mobile terminal complete master and slave equipment setting, filled by CC1 or CC2 pin
Electro-detection, the second mobile terminal, which is arranged after charging voltage, exports charging voltage by Vbus pin.It can certainly be that setting is filled
Then electric current is exported charging voltage or charging current by Vbus pin, is filled with the battery to first movement terminal
Electricity.
Step 207, when the battery capacity of the first movement terminal is equal with the battery capacity of second mobile terminal
When, stop charging between the first movement terminal and second mobile terminal.
In the embodiment of the present invention, the voltameter real-time detection battery capacity of first movement terminal and the second mobile terminal, when
When the battery capacity of first movement terminal is equal with the battery capacity of the second mobile terminal, stop charging.Such as in first movement
When terminal charges to the battery of the second mobile terminal, the voltameter of the second mobile terminal obtains the second mobile terminal of detection
Battery capacity, and it is sent to first movement terminal, after first movement terminal receives the battery capacity of the second mobile terminal, with
The battery capacity of one mobile terminal is compared, and when the two electricity is equal, stops charging.Main equipment can also be set certainly
Electricity stops charging etc. when being lower than mobile threshold value, to guarantee the normal operation as the mobile terminal of main equipment.
In the embodiment of the present invention, it is connect by Type-C interface with the second mobile terminal when first movement terminal is detected
When, the battery capacity of the second mobile terminal is obtained, and it is mobile whole to judge whether the battery capacity of first movement terminal is greater than second
The battery capacity at end;If so, setting main equipment for first movement terminal, charge to the battery of the second mobile terminal;
If it is not, then first movement terminal is set as being charged from equipment by battery of second mobile terminal to first movement terminal.
Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment,
When solving the connection of two mobile terminals, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Embodiment three
Fig. 3 A is a kind of structural block diagram of mobile terminal of the embodiment of the present invention three.
Referring to shown in Fig. 3 A, a kind of mobile terminal 300 provided in an embodiment of the present invention, the mobile terminal 300 be with
The first movement terminal of Type-C interface, the mobile terminal 300 include:
Electricity obtain module 301, for when detect connect by the Type-C interface with the second mobile terminal when, obtain
Take the battery capacity of second mobile terminal;
Electricity judgment module 302 is moved for judging whether the battery capacity of the first movement terminal is greater than described second
The battery capacity of dynamic terminal;
First setup module 303, for setting main equipment for the first movement terminal, to second mobile terminal
Battery charge;
Second setup module 304, for setting the first movement terminal to from equipment, by second mobile terminal
It charges to the battery of the first movement terminal.
Referring to shown in Fig. 3 B, in a kind of mobile terminal 300 of the embodiment of the present invention further include:
Voltage detection module 305, the voltage of the CC1 or CC2 pin for detecting the Type-C interface;
Determining module 306 is connected, for confirmly detecting the first movement terminal when the voltage is predeterminated voltage
It is connect by the Type-C interface with second mobile terminal.
Referring to shown in Fig. 3 C, in a kind of mobile terminal 300 of the embodiment of the present invention, the first setup module 303 includes:
Submodule 3031 is arranged in main equipment, for by CC1 the or CC2 pin of the Type-C interface of the first movement terminal
It is pulled to high level, using the first movement terminal as main equipment;
Charging voltage output sub-module 3032, for exporting charging voltage by the Vbus pin of the Type-C interface,
It is charged with the battery to second mobile terminal.
Referring to shown in Fig. 3 D, in a kind of mobile terminal 300 of the embodiment of the present invention, the second setup module 304 includes:
Submodule 3041 is set from equipment, for by CC1 the or CC2 pin of the Type-C interface of the first movement terminal
It is pulled down to low level, using the first movement terminal as from equipment;
Charge submodule 3042, for leading to when second mobile terminal exports charging voltage to the Vbus pin
The Vbus pin for crossing the Type-C interface charges to the battery of the first movement terminal;
Referring to shown in Fig. 3 E, in a kind of mobile terminal 300 of the embodiment of the present invention further include:
Charge stopping modular 307, for the battery capacity and second mobile terminal when the first movement terminal
When battery capacity is equal, stop charging between the first movement terminal and second mobile terminal.
Mobile terminal can be realized each process that mobile terminal is realized in the embodiment of the method for Fig. 1 to Fig. 2, to avoid weight
Multiple, which is not described herein again.
In embodiments of the present invention, it is connect by Type-C interface with the second mobile terminal when first movement terminal is detected
When, the battery capacity of the second mobile terminal is obtained, and it is mobile whole to judge whether the battery capacity of first movement terminal is greater than second
The battery capacity at end charges to the battery of the second mobile terminal if so, setting main equipment for first movement terminal,
If it is not, then be set as being charged from equipment by battery of second mobile terminal to first movement terminal by first movement terminal,
Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment,
When solving the connection of two mobile terminals, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Example IV
Fig. 4 is a kind of structural block diagram for mobile terminal that the embodiment of the present invention four provides, mobile terminal 1000 shown in Fig. 4
It include: at least one processor 1001, memory 1002, at least one network interface 1004, user interface 1003.Mobile terminal
Various components in 1000 are coupled by bus system 1005.It is understood that bus system 1005 is for realizing these groups
Connection communication between part.Bus system 1005 further includes power bus, control bus and state in addition to including data/address bus
Signal bus.But for the sake of clear explanation, various buses are all designated as bus system 1005 in Fig. 4.
Wherein, user interface 1003 may include display, keyboard or pointing device (for example, mouse, trace ball
(trackball), touch-sensitive plate or touch screen etc..
It is appreciated that the memory 1002 in the embodiment of the present invention can be volatile memory or non-volatile memories
Device, or may include both volatile and non-volatile memories.Wherein, nonvolatile memory can be read-only memory
(Read-Only Memory, ROM), programmable read only memory (Programmable ROM, PROM), erasable programmable are only
Read memory (Erasable PROM, EPROM), electrically erasable programmable read-only memory (Electrically EPROM,
) or flash memory EEPROM.Volatile memory can be random access memory (Random Access Memory, RAM), use
Make External Cache.By exemplary but be not restricted explanation, the RAM of many forms is available, such as static random-access
Memory (Static RAM, SRAM), dynamic random access memory (Dynamic RAM, DRAM), synchronous dynamic random-access
Memory (Synchronous DRAM, SDRAM), double data speed synchronous dynamic RAM (Double Data
RateSDRAM, DDRSDRAM), enhanced Synchronous Dynamic Random Access Memory (EnhancedSDRAM, ESDRAM), synchronous connect
Connect dynamic random access memory (Synchlink DRAM, SLDRAM) and direct rambus random access memory
(Direct Rambus RAM, DRRAM).The embodiment of the present invention description system and method memory 1002 be intended to include but
It is not limited to the memory of these and any other suitable type.
In some embodiments, memory 1002 stores following element, executable modules or data structures, or
Their subset of person or their superset: operating system 10021 and application program 10022.
Wherein, operating system 10021 include various system programs, such as ccf layer, core library layer, driving layer etc., are used for
Realize various basic businesses and the hardware based task of processing.Application program 10022 includes various application programs, such as matchmaker
Body player (Media Player), browser (Browser) etc., for realizing various applied business.Realize that the present invention is implemented
The program of example method may be embodied in application program 10022.
In embodiments of the present invention, by the program or instruction of calling memory 1002 to store, specifically, can be application
The program or instruction stored in program 10022, processor 1001, which is used to work as, to be detected through the Type-C interface and the second shifting
When dynamic terminal connection, the battery capacity of second mobile terminal is obtained;Judging the battery capacity of the first movement terminal is
The no battery capacity greater than second mobile terminal;If so, main equipment is set by the first movement terminal, to described
The battery of second mobile terminal charges;If it is not, then the first movement terminal is set as being moved from equipment by described second
Dynamic terminal charges to the battery of the first movement terminal.
The method that the embodiments of the present invention disclose can be applied in processor 1001, or real by processor 1001
It is existing.Processor 1001 may be a kind of IC chip, the processing capacity with signal.During realization, the above method
Each step can be completed by the instruction of the integrated logic circuit of the hardware in processor 1001 or software form.Above-mentioned
Processor 1001 can be general processor, digital signal processor (Digital Signal Processor, DSP), dedicated
Integrated circuit (Application Specific Integrated Circuit, ASIC), ready-made programmable gate array
(FieldProgrammable Gate Array, FPGA) either other programmable logic device, discrete gate or transistor are patrolled
Collect device, discrete hardware components.It may be implemented or execute disclosed each method, step and the logical box in the embodiment of the present invention
Figure.General processor can be microprocessor or the processor is also possible to any conventional processor etc..In conjunction with the present invention
The step of method disclosed in embodiment, can be embodied directly in hardware decoding processor and execute completion, or use decoding processor
In hardware and software module combination execute completion.Software module can be located at random access memory, and flash memory, read-only memory can
In the storage medium of this fields such as program read-only memory or electrically erasable programmable memory, register maturation.The storage
Medium is located at memory 1002, and processor 1001 reads the information in memory 1002, completes the above method in conjunction with its hardware
Step.
It is understood that the embodiment of the present invention description these embodiments can with hardware, software, firmware, middleware,
Microcode or combinations thereof is realized.For hardware realization, processing unit be may be implemented in one or more specific integrated circuits
(Application Specific Integrated Circuits, ASIC), digital signal processor (Digital Signal
Processing, DSP), digital signal processing appts (DSP Device, DSPD), programmable logic device (Programmable
Logic Device, PLD), field programmable gate array (Field-Programmable Gate Array, FPGA), general place
It manages in device, controller, microcontroller, microprocessor, other electronic units for executing herein described function or combinations thereof.
For software implementations, can by execute the embodiment of the present invention described in function module (such as process, function etc.) come
Realize technology described in the embodiment of the present invention.Software code is storable in memory and is executed by processor.Memory can
With portion realizes in the processor or outside the processor.
Preferably, processor 1001 is also used to: detecting the voltage of the CC1 or CC2 pin of the Type-C interface;When described
When voltage is predeterminated voltage, it is whole by the Type-C interface and second movement to confirmly detect the first movement terminal
End connection.
Preferably, processor 1001 is also used to: by CC1 the or CC2 pin of the Type-C interface of the first movement terminal
It is pulled to high level, using the first movement terminal as main equipment;It is exported by the Vbus pin of the Type-C interface
Charging voltage is charged with the battery to second mobile terminal.
Preferably, processor 1001 is also used to: by CC1 the or CC2 pin of the Type-C interface of the first movement terminal
It is pulled down to low level, using the first movement terminal as from equipment;When second mobile terminal is to the Vbus pin
When exporting charging voltage, charged by the Vbus pin of the Type-C interface to the battery of the first movement terminal.
Preferably, processor 1001 is also used to: when the battery capacity of the first movement terminal and second movement are whole
When the battery capacity at end is equal, stop charging between the first movement terminal and second mobile terminal.
Mobile terminal 1000 can be realized each process that mobile terminal is realized in the embodiment of the method for Fig. 1 to Fig. 2, to keep away
Exempt to repeat, which is not described herein again.
The mobile terminal 1000 of the embodiment of the present invention is connect by Type-C interface with the second mobile terminal when detecting
When, the battery capacity of the second mobile terminal is obtained, and it is mobile whole to judge whether the battery capacity of first movement terminal is greater than second
The battery capacity at end charges to the battery of the second mobile terminal if so, setting main equipment for first movement terminal,
If it is not, then be set as being charged from equipment by battery of second mobile terminal to first movement terminal by first movement terminal,
Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment,
When solving the connection of two mobile terminals, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for mobile terminal that the embodiment of the present invention five provides.Specifically, the movement in Fig. 5
Terminal 1100 can be mobile phone, tablet computer, personal digital assistant (Personal DigitalAssistant, PDA) or vehicle
Carry computer etc..
Mobile terminal 1100 in Fig. 5 includes radio frequency (Radio Frequency, RF) circuit 1101, memory 1102, defeated
Enter unit 1103, display unit 1104, processor 1106, voicefrequency circuit 1107, WiFi (Wireless Fidelity) module
1108 and power supply 1109.
Wherein, input unit 1103 can be used for receiving the number or character information of user's input, and generate with movement eventually
The related signal input of the user setting and function control at end 1100.Specifically, in the embodiment of the present invention, the input unit
1103 may include touch panel 11031.Touch panel 11031, also referred to as touch screen collect user on it or nearby
Touch operation (for example user uses the operations of any suitable object or attachment on touch panel 11031 such as finger, stylus),
And corresponding attachment device is driven according to preset formula.Optionally, touch panel 11031 may include touch detecting apparatus
With two parts of touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation bring
Signal transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and it is converted
At contact coordinate, then the processor 1106 is given, and order that processor 1106 is sent can be received and executed.In addition, can
To realize touch panel 11031 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch surface
Plate 11031, input unit 1103 can also include other input equipments 11032, other input equipments 11032 may include but not
It is limited to one of physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating stick etc.
Or it is a variety of.
Wherein, display unit 1104 can be used for showing information input by user or be supplied to the information and movement of user
The various menu interfaces of terminal 1100.Display unit 1104 may include display panel 11041, optionally, using LCD or can have
The forms such as machine light emitting diode (Organic Light-EmittingDiode, OLED) configure display panel 11041.
It should be noted that touch panel 11031 can cover display panel 11041, touch display screen is formed, when the touch is shown
After screen detects touch operation on it or nearby, processor 1106 is sent to determine the type of touch event, is then located
It manages device 1106 and provides corresponding visual output in touch display screen according to the type of touch event.
Touch display screen includes Application Program Interface viewing area and common control viewing area.The Application Program Interface viewing area
And arrangement mode of the common control viewing area does not limit, can be arranged above and below, left-right situs etc. can distinguish two it is aobvious
Show the arrangement mode in area.The Application Program Interface viewing area is displayed for the interface of application program.Each interface can be with
The interface elements such as the icon comprising at least one application program and/or widget desktop control.The Application Program Interface viewing area
Or the empty interface not comprising any content.This commonly uses control viewing area for showing the higher control of utilization rate, for example,
Application icons such as button, interface number, scroll bar, phone directory icon etc. are set.
Wherein processor 1106 is the control centre of mobile terminal 1100, utilizes various interfaces and connection whole mobile phone
Various pieces, by running or execute the software program and/or module that are stored in first memory 11021, and call
The data being stored in second memory 11022 execute the various functions and processing data of mobile terminal 1100, thus to movement
Terminal 1100 carries out integral monitoring.Optionally, processor 1106 may include one or more processing units.
In embodiments of the present invention, by calling the software program and/or module that store in the first memory 11021
And/or the data in the second memory 11022, processor 1106 are used to work as and detect through the Type-C interface and second
When mobile terminal connects, the battery capacity of second mobile terminal is obtained;Judge the battery capacity of the first movement terminal
Whether the battery capacity of second mobile terminal is greater than;If so, main equipment is set by the first movement terminal, to institute
The battery for stating the second mobile terminal charges;If it is not, then setting the first movement terminal to from equipment, by described second
Mobile terminal charges to the battery of the first movement terminal.
Preferably, processor 1106 is also used to: detecting the voltage of the CC1 or CC2 pin of the Type-C interface;When described
When voltage is predeterminated voltage, it is whole by the Type-C interface and second movement to confirmly detect the first movement terminal
End connection.
Preferably, processor 1106 is also used to: by CC1 the or CC2 pin of the Type-C interface of the first movement terminal
It is pulled to high level, using the first movement terminal as main equipment;It is exported by the Vbus pin of the Type-C interface
Charging voltage is charged with the battery to second mobile terminal.
Preferably, processor 1106 is also used to: by CC1 the or CC2 pin of the Type-C interface of the first movement terminal
It is pulled down to low level, using the first movement terminal as from equipment;When second mobile terminal is to the Vbus pin
When exporting charging voltage, charged by the Vbus pin of the Type-C interface to the battery of the first movement terminal.
Preferably, processor 1106 is also used to: when the battery capacity of the first movement terminal and second movement are whole
When the battery capacity at end is equal, stop charging between the first movement terminal and second mobile terminal.
Mobile terminal 1100 can be realized each process that mobile terminal is realized in previous embodiment, to avoid repeating, this
In repeat no more.
The mobile terminal 1100 of the embodiment of the present invention is connect by Type-C interface with the second mobile terminal when detecting
When, the battery capacity of the second mobile terminal is obtained, and it is mobile whole to judge whether the battery capacity of first movement terminal is greater than second
The battery capacity at end charges to the battery of the second mobile terminal if so, setting main equipment for first movement terminal,
If it is not, then be set as being charged from equipment by battery of second mobile terminal to first movement terminal by first movement terminal,
Using the embodiment of the present invention, main equipment is set by the mobile terminal of high electricity, the mobile terminal of low battery is set as from equipment,
When solving the connection of two mobile terminals, the problem of low battery mobile terminal charges to high electric quantity mobile terminal.
Those of ordinary skill in the art may be aware that the embodiment in conjunction with disclosed in the embodiment of the present invention describe it is each
Exemplary unit and algorithm steps can be realized with the combination of electronic hardware or computer software and electronic hardware.These
Function is implemented in hardware or software actually, the specific application and design constraint depending on technical solution.Profession
Technical staff can use different methods to achieve the described function each specific application, but this realization is not answered
Think beyond the scope of this invention.
It is apparent to those skilled in the art that for convenience and simplicity of description, the system of foregoing description,
The specific work process of device and unit, can refer to corresponding processes in the foregoing method embodiment, and details are not described herein.
In embodiment provided herein, it should be understood that disclosed device and method can pass through others
Mode is realized.For example, the apparatus embodiments described above are merely exemplary, for example, the division of the unit, only
A kind of logical function partition, there may be another division manner in actual implementation, for example, multiple units or components can combine or
Person is desirably integrated into another system, or some features can be ignored or not executed.Another point, shown or discussed is mutual
Between coupling or direct-coupling or call connection can be through some interfaces, the INDIRECT COUPLING of device or unit or call connect
It connects, can be electrical property, mechanical or other forms.
The unit as illustrated by the separation member may or may not be physically separated, aobvious as unit
The component shown may or may not be physical unit, it can and it is in one place, or may be distributed over multiple
In network unit.It can select some or all of unit therein according to the actual needs to realize the mesh of this embodiment scheme
's.
It, can also be in addition, the functional units in various embodiments of the present invention may be integrated into one processing unit
It is that each unit physically exists alone, can also be integrated in one unit with two or more units.
It, can be with if the function is realized in the form of SFU software functional unit and when sold or used as an independent product
It is stored in a computer readable storage medium.Based on this understanding, technical solution of the present invention is substantially in other words
The part of the part that contributes to existing technology or the technical solution can be embodied in the form of software products, the meter
Calculation machine software product is stored in a storage medium, including some instructions are used so that a computer equipment (can be a
People's computer, server or network equipment etc.) it performs all or part of the steps of the method described in the various embodiments of the present invention.
And storage medium above-mentioned includes: that USB flash disk, mobile hard disk, ROM, RAM, magnetic or disk etc. are various can store program code
Medium.
The above description is merely a specific embodiment, but scope of protection of the present invention is not limited thereto, any
Those familiar with the art in the technical scope disclosed by the present invention, can easily think of the change or the replacement, and should all contain
Lid is within protection scope of the present invention.Therefore, protection scope of the present invention should be subject to the protection scope in claims.
Claims (10)
1. a kind of method of mobile terminal charging, applied to the first movement terminal with Type-C interface, which is characterized in that institute
The method of stating includes:
When detect connect by the Type-C interface with the second mobile terminal when, obtain the battery of second mobile terminal
Electricity;
Judge whether the battery capacity of the first movement terminal is greater than the battery capacity of second mobile terminal;
If so, setting main equipment for the first movement terminal, charge to the battery of second mobile terminal;
If it is not, then set the first movement terminal to from equipment, it is whole to the first movement by second mobile terminal
The battery at end charges.
2. the method according to claim 1, wherein detecting that the first movement terminal is logical in the following manner
The Type-C interface is crossed to connect with second mobile terminal:
Detect the voltage of the CC1 or CC2 pin of the Type-C interface;
When the voltage be predeterminated voltage when, confirmly detect the first movement terminal by the Type-C interface with it is described
The connection of second mobile terminal.
3. method according to claim 1 or 2, which is characterized in that it is described by the first movement terminal setting based on set
Standby, the step of charging to the battery of second mobile terminal, includes:
CC1 the or CC2 pin of the Type-C interface of the first movement terminal is pulled to high level, by the first movement
Terminal is as main equipment;
Charging voltage is exported by the Vbus pin of the Type-C interface, is filled with the battery to second mobile terminal
Electricity.
4. method according to claim 1 or 2, which is characterized in that described to set the first movement terminal to from setting
Standby, the step of being charged by battery of second mobile terminal to the first movement terminal, includes:
CC1 the or CC2 pin of the Type-C interface of the first movement terminal is pulled down to low level, by the first movement
Terminal is used as from equipment;
When second mobile terminal exports charging voltage to the Vbus pin, drawn by the Vbus of the Type-C interface
Foot charges to the battery of the first movement terminal.
5. method according to claim 1 or 2, which is characterized in that the method also includes:
When the battery capacity of the first movement terminal is equal with the battery capacity of second mobile terminal, described first is moved
Stop charging between dynamic terminal and second mobile terminal.
6. a kind of mobile terminal, the mobile terminal is the first movement terminal with Type-C interface, which is characterized in that described
Mobile terminal includes:
Electricity obtains module, for when detect connect by the Type-C interface with the second mobile terminal when, described in acquisition
The battery capacity of second mobile terminal;
Electricity judgment module, for judging whether the battery capacity of the first movement terminal is greater than second mobile terminal
Battery capacity;
First setup module, for setting main equipment for the first movement terminal, to the battery of second mobile terminal
It charges;
Second setup module, for setting the first movement terminal to from equipment, by second mobile terminal to described
The battery of first movement terminal charges.
7. mobile terminal according to claim 6, which is characterized in that the mobile terminal further include:
Voltage detection module, the voltage of the CC1 or CC2 pin for detecting the Type-C interface;
Determining module is connected, for the first movement terminal being confirmly detected and passing through institute when the voltage is predeterminated voltage
Type-C interface is stated to connect with second mobile terminal.
8. mobile terminal according to claim 6 or 7, which is characterized in that first setup module includes:
Submodule is arranged in main equipment, for CC1 the or CC2 pin pull-up of the Type-C interface of the first movement terminal is supreme
Level, using the first movement terminal as main equipment;
Charging voltage output sub-module, for exporting charging voltage by the Vbus pin of the Type-C interface, to described
The battery of second mobile terminal charges.
9. mobile terminal according to claim 6 or 7, which is characterized in that second setup module includes:
From equipment, submodule is set, it is low for CC1 the or CC2 pin of the Type-C interface of the first movement terminal to be pulled down to
Level, using the first movement terminal as from equipment;
Charge submodule, is used for when second mobile terminal exports charging voltage to the Vbus pin, by described
The Vbus pin of Type-C interface charges to the battery of the first movement terminal.
10. mobile terminal according to claim 6 or 7, which is characterized in that the mobile terminal further include:
Charge stopping modular, for when the battery capacity of the first movement terminal and the battery capacity of second mobile terminal
When equal, stop charging between the first movement terminal and second mobile terminal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710400366.1A CN108988404A (en) | 2017-05-31 | 2017-05-31 | A kind of method and mobile terminal of mobile terminal charging |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201710400366.1A CN108988404A (en) | 2017-05-31 | 2017-05-31 | A kind of method and mobile terminal of mobile terminal charging |
Publications (1)
Publication Number | Publication Date |
---|---|
CN108988404A true CN108988404A (en) | 2018-12-11 |
Family
ID=64501372
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201710400366.1A Pending CN108988404A (en) | 2017-05-31 | 2017-05-31 | A kind of method and mobile terminal of mobile terminal charging |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108988404A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116707048A (en) * | 2022-09-06 | 2023-09-05 | 荣耀终端有限公司 | OTG-based charging control method and related device |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130132738A1 (en) * | 2011-11-22 | 2013-05-23 | International Business Machines Corporation | Externally Powered System Access |
CN104978296A (en) * | 2014-04-09 | 2015-10-14 | 诺基亚公司 | Method and apparatus for determining direction of power delivery |
CN105098273A (en) * | 2015-07-20 | 2015-11-25 | 小米科技有限责任公司 | Charging method and device |
CN105790349A (en) * | 2016-01-27 | 2016-07-20 | 努比亚技术有限公司 | Mutual charging control method and device for mobile terminals |
CN105955912A (en) * | 2016-05-16 | 2016-09-21 | 芯海科技(深圳)股份有限公司 | Device detection method for USB Type-C interface |
CN106445856A (en) * | 2015-08-07 | 2017-02-22 | 小米科技有限责任公司 | Interface circuit, and state switching method and apparatus |
CN106655358A (en) * | 2016-11-29 | 2017-05-10 | 努比亚技术有限公司 | Charging control apparatus and method used between mobile terminals |
CN106681231A (en) * | 2017-03-03 | 2017-05-17 | 南京异或科技有限公司 | Type-C detection method |
-
2017
- 2017-05-31 CN CN201710400366.1A patent/CN108988404A/en active Pending
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
US20130132738A1 (en) * | 2011-11-22 | 2013-05-23 | International Business Machines Corporation | Externally Powered System Access |
CN104978296A (en) * | 2014-04-09 | 2015-10-14 | 诺基亚公司 | Method and apparatus for determining direction of power delivery |
CN105098273A (en) * | 2015-07-20 | 2015-11-25 | 小米科技有限责任公司 | Charging method and device |
CN106445856A (en) * | 2015-08-07 | 2017-02-22 | 小米科技有限责任公司 | Interface circuit, and state switching method and apparatus |
CN105790349A (en) * | 2016-01-27 | 2016-07-20 | 努比亚技术有限公司 | Mutual charging control method and device for mobile terminals |
CN105955912A (en) * | 2016-05-16 | 2016-09-21 | 芯海科技(深圳)股份有限公司 | Device detection method for USB Type-C interface |
CN106655358A (en) * | 2016-11-29 | 2017-05-10 | 努比亚技术有限公司 | Charging control apparatus and method used between mobile terminals |
CN106681231A (en) * | 2017-03-03 | 2017-05-17 | 南京异或科技有限公司 | Type-C detection method |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN116707048A (en) * | 2022-09-06 | 2023-09-05 | 荣耀终端有限公司 | OTG-based charging control method and related device |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN106844067B (en) | A kind of processing method and mobile terminal of content | |
CN106843739B (en) | A kind of display control method and mobile terminal of mobile terminal | |
CN106844265B (en) | A kind of control method and mobile terminal of general-purpose serial bus USB interface | |
CN108268388B (en) | A kind of Type-C interface protective circuit and method, mobile terminal | |
CN106648857B (en) | A kind of open method and mobile terminal of the OTG function of mobile terminal | |
CN107193482A (en) | The operating method and mobile terminal of a kind of mobile terminal screen | |
CN108268389A (en) | The insertion detection method and mobile terminal of a kind of equipment | |
CN107071264A (en) | A kind of image resolution ratio method of adjustment and mobile terminal | |
CN108268403A (en) | A kind of Type-C interface protective circuits and method, mobile terminal | |
CN206878505U (en) | A kind of charging circuit and mobile terminal | |
CN108271093A (en) | The processing method and mobile terminal of a kind of access device | |
CN107465234B (en) | A kind of charge control method, mobile terminal and adapter | |
CN108268397A (en) | The processing method and mobile terminal of a kind of access device | |
CN108268395A (en) | A kind of method and mobile terminal of data communication | |
CN108347070A (en) | A kind of method and mobile terminal, charging equipment of charging | |
CN106685016B (en) | A kind of charging unit and control method | |
CN108270253A (en) | A kind of charging method and mobile terminal | |
CN106684967B (en) | A kind of charging method and mobile terminal of mobile terminal | |
CN108988404A (en) | A kind of method and mobile terminal of mobile terminal charging | |
CN108270255B (en) | A kind of charging method and mobile terminal | |
CN108268396A (en) | The processing method and mobile terminal of a kind of access device | |
CN108271092A (en) | The processing method and mobile terminal of a kind of access device | |
CN108268393A (en) | The processing method and mobile terminal of a kind of access device | |
CN108268402A (en) | Protection circuit, guard method and the mobile terminal of Type-C interfaces | |
CN106888267B (en) | A kind of based reminding method and terminal of network state |
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 | ||
RJ01 | Rejection of invention patent application after publication | ||
RJ01 | Rejection of invention patent application after publication |
Application publication date: 20181211 |