CN106292977B - A kind of adapter recognition methods and terminal - Google Patents

A kind of adapter recognition methods and terminal Download PDF

Info

Publication number
CN106292977B
CN106292977B CN201610597603.3A CN201610597603A CN106292977B CN 106292977 B CN106292977 B CN 106292977B CN 201610597603 A CN201610597603 A CN 201610597603A CN 106292977 B CN106292977 B CN 106292977B
Authority
CN
China
Prior art keywords
adapter
terminal
type
input voltage
voltage
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.)
Active
Application number
CN201610597603.3A
Other languages
Chinese (zh)
Other versions
CN106292977A (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.)
Guangdong Oppo Mobile Telecommunications Corp Ltd
Original Assignee
Guangdong Oppo Mobile Telecommunications Corp 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 Guangdong Oppo Mobile Telecommunications Corp Ltd filed Critical Guangdong Oppo Mobile Telecommunications Corp Ltd
Priority to CN201610597603.3A priority Critical patent/CN106292977B/en
Publication of CN106292977A publication Critical patent/CN106292977A/en
Application granted granted Critical
Publication of CN106292977B publication Critical patent/CN106292977B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F1/00Details not covered by groups G06F3/00 – G06F13/00 and G06F21/00
    • G06F1/26Power supply means, e.g. regulation thereof
    • GPHYSICS
    • G06COMPUTING; CALCULATING; COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling

Abstract

The embodiment of the invention provides a kind of adapter recognition methods, which comprises by being attached between the matched general-purpose serial bus USB line of adapter and the adapter, wherein the VBUS line of the USB line is at least connected a resistance;After the adapter accesses power supply, the input voltage by the adapter input terminal is determined;The adapter is identified according to the input voltage, obtains the type of the adapter.The embodiment of the invention also provides a kind of terminals.The production cost of adapter can be reduced through the embodiment of the present invention.

Description

A kind of adapter recognition methods and terminal
Technical field
The present invention relates to technical field of data processing, and in particular to a kind of adapter recognition methods and terminal.
Background technique
With information technology fast development, terminal (such as mobile phone, tablet computer) has become inseparable in user's life The a part cut, it is generally the case that the charging interface of terminal by universal serial bus (Universal Serial Bus, USB) line is connect with adapter, after adapter accesses power supply, is charged to terminal.In the prior art, to the same type Adapter identification, it will usually when design adapter using different in-built, the corresponding different types of adaptation of identification Device needs to be produced with different technique between different types of adapter, therefore, will cause the higher cost of adapter.
Summary of the invention
The embodiment of the invention provides a kind of adapter recognition methods and terminals, can reduce the production cost of adapter.
First aspect of the embodiment of the present invention provides a kind of adapter recognition methods, comprising:
By being attached between the matched general-purpose serial bus USB line of adapter and the adapter, wherein described The VBUS line of USB line is at least connected a resistance;
After the adapter accesses power supply, the input voltage by the adapter input terminal is determined;
The adapter is identified according to the input voltage, obtains the type of the adapter.
Second aspect of the embodiment of the present invention provides a kind of terminal, comprising:
Connection unit, for by being carried out between the matched general-purpose serial bus USB line of adapter and the adapter Connection, wherein the VBUS line of the USB line is at least connected a resistance;
First determination unit, for determining by the defeated of the adapter input terminal after the adapter accesses power supply Enter voltage;
Recognition unit obtains the class of the adapter for identifying according to the input voltage to the adapter Type.
The third aspect of the embodiment of the present invention provides a kind of terminal, comprising:
Processor and memory;
Wherein, the processor is used to call the executable program code in the memory, executes first aspect Some or all of step.
The implementation of the embodiments of the present invention has the following beneficial effects:
As can be seen that through the embodiment of the present invention, being adapted to by general-purpose serial bus USB line matched with adapter with this Be attached between device, wherein the VBUS line of the USB line is at least connected a resistance, after adapter accesses power supply, determine by The input voltage of adapter input terminal identifies adapter according to input voltage, obtains the type of adapter.Therefore, The type of adapter is determined using the input voltage of adapter input terminal, can reduce design to type of adapter structure and Process complexity, thus, the production cost of adapter can be reduced.
Detailed description of the invention
To describe the technical solutions in the embodiments of the present invention more clearly, make required in being described below to embodiment Attached drawing is briefly described, it should be apparent that, drawings in the following description are some embodiments of the invention, for ability For the those of ordinary skill of domain, without creative efforts, it can also be obtained according to these attached drawings other attached Figure.
Fig. 1 is a kind of schematic diagram of charging interface provided in an embodiment of the present invention;
Fig. 2 is a kind of schematic diagram of charging interface connection adapter provided in an embodiment of the present invention;
Fig. 3 is a kind of first embodiment flow diagram of adapter recognition methods provided in an embodiment of the present invention;
Fig. 4 is a kind of second embodiment flow diagram of adapter recognition methods provided in an embodiment of the present invention;
Fig. 5 a is a kind of schematic structural diagram of the first embodiment of terminal provided in an embodiment of the present invention;
Fig. 5 b is the another structural schematic diagram of terminal described in Fig. 5 a provided in an embodiment of the present invention;
Fig. 5 c is the another structural schematic diagram of terminal described in Fig. 5 a provided in an embodiment of the present invention;
Fig. 5 d is the another structural schematic diagram of terminal described in Fig. 5 a provided in an embodiment of the present invention;
Fig. 5 e is the another structural schematic diagram of terminal described in Fig. 5 a provided in an embodiment of the present invention;
Fig. 6 is a kind of schematic structural diagram of the second embodiment of terminal provided in an embodiment of the present invention.
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.
Description and claims of this specification and term " first ", " second ", " third " and " in the attached drawing Four " etc. are not use to describe a particular order for distinguishing different objects.In addition, term " includes " and " having " and it Any deformation, it is intended that cover and non-exclusive include.Such as it contains the process, method of a series of steps or units, be System, product or equipment are not limited to listed step or unit, but optionally further comprising the step of not listing or list Member, or optionally further comprising other step or units intrinsic for these process, methods, product or equipment.
Referenced herein " embodiment " is it is meant that a particular feature, structure, or characteristic described can wrap in conjunction with the embodiments Containing at least one embodiment of the present invention.Each position in the description occur the phrase might not each mean it is identical Embodiment, nor the independent or alternative embodiment with other embodiments mutual exclusion.Those skilled in the art explicitly and Implicitly understand, embodiment described herein can be combined with other embodiments.
Terminal described in the embodiment of the present invention may include smart phone (such as Android phone, iOS mobile phone, Windows Phone mobile phone etc.), tablet computer, palm PC, laptop, mobile internet device (MID, Mobile Internet Devices) or wearable device etc., above-mentioned terminal is only citing, and non exhaustive, including but not limited to above-mentioned end End.
It in the embodiment of the present invention, is illustrated by taking smart phone as an example, as shown in FIG. 1, FIG. 1 is the charging interfaces of terminal Simple schematic diagram, common smart phone charging interface are as follows: including five signal pins, it may be assumed that VBUS pin, D+ pin, D- draw Foot, ID pin and GND pin, also, connect with the adapter using USB line matched with adapter or directly and power supply Connection after accessing power supply, and charges to the battery of terminal by VBUS pin, at the same time it can also pass through D+ pin, D- Pin carries out data communication, and since charging interface belongs to the prior art, details are not described herein for the function of other pins.It is above-mentioned USB line includes a plurality of line, and in particular to arrives VBUS line, D+ data line and D- data line.For adaptor charge, adapter 220V alternating current is become into 5V direct current, then, 5V voltage is added into VBUS line, VBUS line is powered by USB line to terminal, Terminal charges after getting the 5V voltage.As shown in Fig. 2, Fig. 2 is that the charging interface of terminal connects the signal of adapter Figure, wherein the charging interface on the left side is the charging interface of terminal, and dotted portion is USB line (i.e. by VBUS line, D+ data line, D- Data line and GND line are encapsulated in a cable), (resistance can be equivalent electricity to one resistance of series connection on the VBUS line of USB line Resistance), the charging interface on the right is connect with adapter, after adapter powers on, can be powered by this way to terminal.
Optionally, in the embodiment of the present invention, the relationship between adapter and the matched USB line of the adapter can be divided into as follows Two kinds of situations: the first situation, in adapter production, USB line can connect together as a whole with adapter, in this way, When needing to be inserted into power supply, adapter one end is by USB line access terminal, and the other end of adapter is inserted into power supply, in this way, can be to end End charging;Second situation: USB line is detachable with adapter, and in this case, USB line is mating with adapter, i.e., each is suitable Orchestration has its corresponding USB line, it is thus desirable to USB line one end couple in adapter, adapter is inserted into power supply when being inserted into power supply, The USB line other end and the charging interface (USB interface) of terminal connect, can be to terminal charge, certainly, in this case, USB line There are also other purposes, such as: computer socket is inserted into USB line one end, and the charging interface connection of the other end and terminal can fill terminal Electricity, in this case, USB line can not only be used to transmit data, but also can be used to charge.
Based on above-mentioned Fig. 1 and Fig. 2, referring to Fig. 3, for the of a kind of adapter recognition methods provided in an embodiment of the present invention One embodiment flow diagram.Adapter recognition methods as described in this embodiment, comprising the following steps:
301, by being attached between the matched general-purpose serial bus USB line of adapter and the adapter, wherein The VBUS line of the USB line is at least connected a resistance.
Wherein, USB line need to be mating with adapter in embodiments of the present invention.The charging interface (USB interface) and USB of terminal One end of line is attached, and the other end couple in adapter of USB line, certainly, adapter need to access power supply, wherein USB line VBUS line can at least connect a resistance, which is regarded as an equivalent resistance, i.e. the equivalent resistance can be by Multiple resistance are in series or in parallel.Wherein, the purpose of at least one resistance is reduced defeated by adapter to be depressured processing Enter the input voltage of terminal.
302, after the adapter accesses power supply, the input voltage by the adapter input terminal is determined.
Wherein, after adapter accesses power supply, herein, terminal, which can be detected, has external power supply to charge for terminal, eventually End can enter charge mode, it is of course also possible to display terminal is by access external equipment (such as: terminal is connect with another terminal), from And terminal can determine that adapter inputs the input voltage of the terminal.Specifically, terminal can be determined by ADC switch technology by fitting The input voltage of orchestration input terminal.If there is no series resistance in VBUS line, then, by the input of adapter input terminal Voltage is equal to 5V or is approximately 5V, resistance if VBUS line has at least been connected, then, by the input of adapter input terminal Voltage can be less than 5V.
303, the adapter is identified according to the input voltage, obtains the type of the adapter.
Optionally, since above-mentioned input voltage is different, it may be determined that type of adapter it is also different, therefore, can be pre- in advance If the mapping relations between voltage value and type of adapter, then, according between the preset voltage value and type of adapter Mapping relations determine the type of adapter.In this way, input voltage can be divided into multiple grades, the corresponding adaptation of each grade Therefore device type after determining input voltage, can determine the type of adapter according to the voltage value of input voltage.
Optionally, after step 303, may further comprise the step of: according between preset type of adapter and application program Mapping relations, start corresponding with the type of adapter application program.Each type of adapter can with some or Mapping relations are established between multiple application programs.Type of adapter can correspond mapping relations between application program, for example, Type of adapter is that the corresponding application program of A (any kind) is starting alarm clock, and type of adapter is B (different from the type of A) Corresponding application program is terminal mute processing, it is of course also possible to which type of adapter one-to-many between application program can reflect Relationship is penetrated, for example, it is starting alarm clock and terminal mute processing that type of adapter, which is the corresponding application program of A (any kind),.
Optionally, after step 303, may also include that according to reflecting between preset type of adapter and operating mode Relationship is penetrated, operating mode corresponding with the type of the adapter is started.Optionally, operating mode may include, but are not limited to: Conference model, outdoor mode, silent mode, offline mode etc..Certainly, it is deposited between preset type of adapter and operating mode In one-to-one mapping relations.For example, it is silent mode that type of adapter, which is the corresponding operating mode of A (any kind), fit Orchestration type is that the corresponding operating mode of B (different from the type of A) is offline mode.
Optionally, after step 303, may also include the steps of:
110) voltage of the battery of the terminal, is determined;
120) it, is charged according to the voltage of the battery of the terminal.
From the foregoing, it will be observed that in step 110, can first determine that the voltage of the battery of terminal can determine according to the voltage and fill certainly At least one of piezoelectric voltage, charging current and charge power can first be charged with the normal charging mode of low current, then It is charged with the fast charge mode of larger current, may include constant-current charge and constant-voltage charge during the charging process certainly This two process.
Optionally, at least one above-mentioned resistance includes adjustable resistance, and certainly, adjustable resistance can be used for adjusting the big of resistance Small, after the voltage value for adjusting adjustable resistance, the input voltage of adapter input terminal can then change, as a result, can also be The charging charged to terminal is adjusted in voltage range, current range or the output power range that type of adapter is supported Parameter (such as: electric current, voltage or power) because any terminal there is it to be supported suitable charging voltage, charging current or Person's charge power may make terminal to enter best charge state, therefore, it can be achieved that accelerate the fast electricity to terminal by this way Speed.
As can be seen that through the embodiment of the present invention, being adapted to by general-purpose serial bus USB line matched with adapter with this Be attached between device, wherein the VBUS line of the USB line is at least connected a resistance, after adapter accesses power supply, determine by The input voltage of adapter input terminal identifies adapter according to input voltage, obtains the type of adapter.Therefore, The type of adapter is determined using the input voltage of adapter input terminal, can reduce design to type of adapter structure and Process complexity, thus, the production cost of adapter can be reduced.
It is understood that adapter can be any adapter in the embodiment of the present invention, USB line is to match with the adapter The USB line of set includes at least one resistance on the VBUS line of the USB line, should be mainly used for reducing to a resistance by adapter The input voltage of input terminal determines the type of adapter according to the size of the input voltage.To can avoid the prior art In, more difference design (for distinguishing the type of adapter) is done to the internal structure of adapter, but directly USB line is carried out It improves, thus, reduce the production cost of adapter.
Consistent with the abovely, referring to Fig. 4, for a kind of second reality of adapter recognition methods provided in an embodiment of the present invention Apply a flow diagram.Adapter recognition methods as described in this embodiment, comprising the following steps:
401, by being attached between the matched general-purpose serial bus USB line of adapter and the adapter, wherein institute The VBUS line for stating USB line is at least connected a resistance.
402, after the adapter accesses power supply, judge that the adapter is in USB charge mode or adapter fills Power mode.
If 403, the adapter is in the adaptor charge mode, charge, is determined by described to the terminal The input voltage of adapter input terminal.
404, the adapter is identified according to the input voltage, obtains the type of the adapter.
Wherein, step 401 and step 404 can refer to the correspondence step in adapter recognition methods described in Fig. 3.
It optionally,, can be by judging whether the D+ pin of USB line, D- pin connect when being inserted into adapter in step 402 Together, if it is, adapter is in USB charge mode, then the USB charging of 500mA is directly carried out, if it is not, then adapter In adaptor charge mode.
It should be noted that in step 403, it, can be further to adapter if adapter is in adaptor charge mode Low current charge (purpose is to prevent high current from damaging battery), such as 100mA is then fixed in the identification of type, the first step, The electric current flows through on the VBUS line of USB line after resistance, then generate fixed different pressure drop (specifically pressure drop, it is big with resistance Small correlation), for example, resistance is 1 Europe, then the pressure drop of 0.1V may be generated, for another example, resistance is 5 Europe, then can generate 0.5V Pressure drop, thus, so that the voltage that terminal obtains is 4.9V and 4.5V.In addition, above-mentioned pressure drop cannot be too big, it is generally kept in 4V It is ok above, because if pressure drop is too big, may result in adapter can not charge to terminal.
It is specific as follows the following are the device for implementing adapter recognition methods provided by above-mentioned Fig. 3 or Fig. 4:
Fig. 5 a is please referred to, is a kind of schematic structural diagram of the first embodiment of terminal provided in an embodiment of the present invention.This implementation Terminal described in example, comprising: connection unit 501, the first determination unit 502 and recognition unit 503, specific as follows:
Connection unit 501, for by between the matched general-purpose serial bus USB line of adapter and the adapter into Row connection, wherein the VBUS line of the USB line is at least connected a resistance;
First determination unit 502, for determining by the adapter input terminal after the adapter accesses power supply Input voltage;
Recognition unit 503 obtains the adapter for identifying according to the input voltage to the adapter Type.
Optionally, the recognition unit 503 is specifically used for:
According to the mapping relations between preset voltage value and type of adapter, the corresponding adaptation of the input voltage is determined The type of device.
Optionally, such as Fig. 5 b, terminal shown in Fig. 5 a may also include that judging unit 504 and the first charhing unit 505, have Body is as follows:
Judging unit 504, for determining the input electricity by the adapter input terminal in first determination unit 502 Before pressure, judge that the adapter is in USB charge mode or adaptor charge mode;
First charhing unit 505, if the judging result for the judging unit 504 is that the adapter is in described suitable Orchestration charge mode charges to the terminal, is determined by first determination unit 502 by the adapter input terminal Input voltage.
Optionally, such as Fig. 5 c, terminal shown in Fig. 5 a may also include that the first start unit 506, specific as follows:
First start unit 506, for being carried out according to the input voltage to the adapter in the recognition unit 503 Identification, after obtaining the type of the adapter, according to the mapping relations between preset type of adapter and application program, is opened Move application program corresponding with the type of the adapter;
Optionally, such as Fig. 5 d, terminal shown in Fig. 5 a may also include that the second start unit 507, specific as follows:
Second start unit 507, for being carried out according to the input voltage to the adapter in the recognition unit 503 Identification, after obtaining the type of the adapter, according to the mapping relations between preset type of adapter and operating mode, is opened Move operating mode corresponding with the type of the adapter.
Optionally, such as Fig. 5 e, terminal shown in Fig. 5 a may also include that the second determination unit 508 and the second charhing unit 509, specific as follows:
Second determination unit 508, for being carried out according to the input voltage to the adapter in the recognition unit 503 Identification, after obtaining the type of the adapter, determines the voltage of the battery of the terminal;
Second charhing unit 509, the voltage for the battery according to the terminal charge.
As can be seen that terminal described in through the embodiment of the present invention, passes through universal serial bus matched with adapter It is attached between USB line and the adapter, wherein the VBUS line of the USB line is at least connected a resistance, is accessed in adapter After power supply, determines the input voltage by adapter input terminal, adapter is identified according to input voltage, obtains adapter Type.Therefore, the type of adapter is determined using the input voltage of adapter input terminal, can be reduced to type of adapter The design and process complexity of structure, thus, the production cost of adapter can be reduced.
Referring to Fig. 6, being a kind of schematic structural diagram of the second embodiment of terminal provided in an embodiment of the present invention.The present embodiment Described in terminal, comprising: at least one input equipment 1000;At least one output equipment 2000;At least one processor 3000, such as CPU;With memory 4000, above-mentioned input equipment 1000, output equipment 2000, processor 3000 and memory 4000 are connected by bus 5000.
Wherein, above-mentioned input equipment 1000 concretely touch panel, physical button or mouse.
Above-mentioned output equipment 2000 concretely display screen.
Above-mentioned memory 4000 can be high speed RAM memory, can also be nonvolatile storage (non-volatile ), such as magnetic disk storage memory.Above-mentioned memory 4000 is used to store a set of program code, above-mentioned input equipment 1000, defeated Equipment 2000 and processor 3000 are used to call the program code stored in memory 4000 out, perform the following operations:
Above-mentioned processor 3000, is used for:
By being attached between the matched general-purpose serial bus USB line of adapter and the adapter, wherein described The VBUS line of USB line is at least connected a resistance;
After the adapter accesses power supply, the input voltage by the adapter input terminal is determined;
The adapter is identified according to the input voltage, obtains the type of the adapter.
Optionally, above-mentioned processor 3000 identifies the adapter according to the input voltage, obtains described suitable The type of orchestration, comprising:
According to the mapping relations between preset voltage value and type of adapter, the corresponding adaptation of the input voltage is determined The type of device.
Optionally, before above-mentioned processor 3000 determines the input voltage by the adapter input terminal, the method Further include;
Judge that the adapter is in USB charge mode or adaptor charge mode;
If the adapter is in the adaptor charge mode, charge to the terminal, execute the determination by The input voltage of the adapter input terminal.
Optionally, above-mentioned processor 3000 identifies the adapter according to the input voltage, obtains described suitable After the type of orchestration, also particularly useful for:
According to the mapping relations between preset type of adapter and application program, the type pair of starting and the adapter The application program answered;
Alternatively,
According to the mapping relations between preset type of adapter and operating mode, the type pair of starting and the adapter The operating mode answered.
Optionally, above-mentioned processor 3000 identifies the adapter according to the input voltage, obtains described suitable After the type of orchestration, also particularly useful for:
Determine the voltage of the battery of the terminal;
It is charged according to the voltage of the battery of the terminal.
The embodiment of the present invention also provides a kind of computer storage medium, wherein the computer storage medium can be stored with journey Sequence, the program include some or all of any adapter recognition methods recorded in above method embodiment step when executing Suddenly.
Although combining each embodiment herein, invention has been described, however, implementing the claimed invention In the process, those skilled in the art are by checking the attached drawing, disclosure and the appended claims, it will be appreciated that and it is real Other variations of the existing open embodiment.In the claims, " comprising " (comprising) word is not excluded for other compositions Part or step, "a" or "an" are not excluded for multiple situations.Claim may be implemented in single processor or other units In several functions enumerating.Mutually different has been recited in mutually different dependent certain measures, it is not intended that these are arranged It applies to combine and generates good effect.
It will be understood by those skilled in the art that the embodiment of the present invention can provide as method, apparatus (equipment) or computer journey Sequence product.Therefore, complete hardware embodiment, complete software embodiment or combining software and hardware aspects can be used in the present invention The form of embodiment.Moreover, it wherein includes the calculating of computer usable program code that the present invention, which can be used in one or more, The computer program implemented in machine usable storage medium (including but not limited to magnetic disk storage, CD-ROM, optical memory etc.) The form of product.Computer program is stored/distributed in suitable medium, is provided together with other hardware or as the one of hardware Part can also use other distribution forms, such as pass through the wired or wireless telecommunication system of Internet or other.
The present invention be referring to the embodiment of the present invention method, apparatus (equipment) and computer program product flow chart with/ Or block diagram describes.It should be understood that each process that can be realized by computer program instructions in flowchart and/or the block diagram and/ Or the combination of the process and/or box in box and flowchart and/or the block diagram.It can provide these computer program instructions To general purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices processor to generate one A machine so that by the instruction that the processor of computer or other programmable data processing devices executes generate for realizing The device for the function of being specified in one or more flows of the flowchart and/or one or more blocks of the block diagram.
These computer program instructions, which may also be stored in, is able to guide computer or other programmable data processing devices with spy Determine in the computer-readable memory that mode works, so that it includes referring to that instruction stored in the computer readable memory, which generates, Enable the manufacture of device, the command device realize in one box of one or more flows of the flowchart and/or block diagram or The function of being specified in multiple boxes.
These computer program instructions also can be loaded onto a computer or other programmable data processing device, so that counting Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, thus in computer or The instruction executed on other programmable devices is provided for realizing in one or more flows of the flowchart and/or block diagram one The step of function of being specified in a box or multiple boxes.
Although in conjunction with specific features and embodiment, invention has been described, it is clear that, do not departing from this hair In the case where bright spirit and scope, it can be carry out various modifications and is combined.Correspondingly, the specification and drawings are only institute The exemplary illustration of the invention that attached claim is defined, and be considered as covered in the scope of the invention any and all and repair Change, change, combining or equivalent.Obviously, those skilled in the art various changes and modifications can be made to the invention without It is detached from the spirit and scope of the present invention.If in this way, these modifications and changes of the present invention belong to the claims in the present invention and its Within the scope of equivalent technologies, then the present invention is also intended to include these modifications and variations.

Claims (9)

1. a kind of adapter recognition methods characterized by comprising
By being attached between the matched general-purpose serial bus USB line of adapter and the adapter, wherein the USB The VBUS line of line is at least connected a resistance;
After the adapter accesses power supply, the input voltage by the adapter input terminal is determined;
The adapter is identified according to the input voltage, obtains the type of the adapter;
According to the mapping relations between preset type of adapter and application program, start corresponding with the type of the adapter Application program;
Alternatively,
According to the mapping relations between preset type of adapter and operating mode, start corresponding with the type of the adapter Operating mode, wherein the operating mode includes conference model, outdoor mode, silent mode and offline mode.
2. the method according to claim 1, wherein described carry out the adapter according to the input voltage Identification, obtains the type of the adapter, comprising:
According to the mapping relations between preset voltage value and type of adapter, the corresponding adapter of the input voltage is determined Type.
3. the method according to any one of claims 1 and 2, which is characterized in that the determination is inputted eventually by the adapter Before the input voltage at end, the method also includes:
Judge that the adapter is in USB charge mode or adaptor charge mode;
If the adapter is in the adaptor charge mode, charges to the terminal, execute the determination by described The input voltage of adapter input terminal.
4. the method according to any one of claims 1 and 2, which is characterized in that it is described according to the input voltage to described Adapter is identified, after obtaining the type of the adapter, the method also includes:
Determine the voltage of the battery of the terminal;
It is charged according to the voltage of the battery of the terminal.
5. a kind of terminal characterized by comprising
Connection unit, for by being attached between the matched general-purpose serial bus USB line of adapter and the adapter, Wherein, the VBUS line of the USB line is at least connected a resistance;
First determination unit, for after the adapter accesses power supply, determining the input electricity by the adapter input terminal Pressure;
Recognition unit obtains the type of the adapter for identifying according to the input voltage to the adapter;
First start unit is obtained for being identified according to the input voltage to the adapter in the recognition unit After the type of the adapter, according to the mapping relations between preset type of adapter and application program, starting with it is described The corresponding application program of the type of adapter;
Alternatively,
Second start unit is obtained for being identified according to the input voltage to the adapter in the recognition unit After the type of the adapter, according to the mapping relations between preset type of adapter and operating mode, starting with it is described The corresponding operating mode of the type of adapter;Wherein, the operating mode include conference model, outdoor mode, silent mode and Offline mode.
6. terminal according to claim 5, which is characterized in that the recognition unit is specifically used for:
According to the mapping relations between preset voltage value and type of adapter, the corresponding adapter of the input voltage is determined Type.
7. according to the described in any item terminals of claim 5 or 6, which is characterized in that the terminal further include:
Judging unit, for sentencing before the input voltage that first determination unit determines by the adapter input terminal The adapter that breaks is in USB charge mode or adaptor charge mode;
First charhing unit, if the judging result for the judging unit is that the adapter is in the adaptor charge mould Formula charges to the terminal, is determined by first determination unit by the input voltage of the adapter input terminal.
8. according to the described in any item terminals of claim 5 or 6, which is characterized in that the terminal further include:
Second determination unit is obtained for being identified according to the input voltage to the adapter in the recognition unit After the type of the adapter, the voltage of the battery of the terminal is determined;
Second charhing unit, the voltage for the battery according to the terminal charge.
9. a kind of computer readable storage medium, which is characterized in that be stored in the computer readable storage medium code or Instruction, the code or instruction are for executing the method as described in Claims 1-4 any one after calling for computer.
CN201610597603.3A 2016-07-26 2016-07-26 A kind of adapter recognition methods and terminal Active CN106292977B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610597603.3A CN106292977B (en) 2016-07-26 2016-07-26 A kind of adapter recognition methods and terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610597603.3A CN106292977B (en) 2016-07-26 2016-07-26 A kind of adapter recognition methods and terminal

Publications (2)

Publication Number Publication Date
CN106292977A CN106292977A (en) 2017-01-04
CN106292977B true CN106292977B (en) 2019-04-02

Family

ID=57652477

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610597603.3A Active CN106292977B (en) 2016-07-26 2016-07-26 A kind of adapter recognition methods and terminal

Country Status (1)

Country Link
CN (1) CN106292977B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN107069844B (en) * 2017-01-13 2019-07-16 Oppo广东移动通信有限公司 Charging method, device and terminal

Family Cites Families (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US5506490A (en) * 1993-11-09 1996-04-09 Motorola, Inc. Method and apparatus for determining external power supply type
CN100375942C (en) * 2003-09-26 2008-03-19 纬创资通股份有限公司 System unit having recognizable mains adaptor and identifying method thereof
CN101169456B (en) * 2007-11-29 2010-06-09 北京飞天诚信科技有限公司 USB bus current detection device
CN102684270B (en) * 2012-05-31 2014-12-10 华为技术有限公司 Method for identifying type of universal serial bus (USB) chargers and USB device
CN204215023U (en) * 2014-09-26 2015-03-18 小米科技有限责任公司 Terminal charge parameter testing line
CN105140985B (en) * 2015-08-05 2017-08-25 青岛海信移动通信技术股份有限公司 Mobile terminal, can directly charge source adapter and charging method

Also Published As

Publication number Publication date
CN106292977A (en) 2017-01-04

Similar Documents

Publication Publication Date Title
US10374450B2 (en) Battery charging method and electronic device
CN104951034B (en) Mobile terminal and its USB interface condition control method and device
CN104538996B (en) Mobile terminal and its matching and recognition method with charging unit
EP2849023A1 (en) Electronic device and control method therefor
CN106532882B (en) A kind of charge control method and device
CN105137356B (en) Detect the method and device of charged state
KR20160030261A (en) Apparatus and method to change current limit
TWI573368B (en) Portable electronic device and charging method therefor
CN106300501B (en) A kind of adapter recognition methods and intelligent mobile terminal
CN104242365A (en) Portable electronic device and use method
US10439403B2 (en) Smart bag with display for charging a device
CN104362687A (en) Bidirectional power balance method and device based on USB-OTG
US10720778B2 (en) Method for identifying type of cable, power adapter and cable
CN108132401A (en) Charge abnormal detection method, device, storage medium and mobile terminal
CN106786903A (en) Information Authentication method, device, wireless charging device and mobile terminal
CN106786960A (en) Charge control method, device and terminal
CN106026232A (en) Detecting method and apparatus for USB port type
CN106646085B (en) Leakage tests method, apparatus and equipment
CN106292977B (en) A kind of adapter recognition methods and terminal
CN108808785A (en) Electronic equipment charge control method, device, electronic equipment and storage medium
CN103138343A (en) Mobile device and charging method thereof
TWM496204U (en) Universal power delivery cable, power delivery controller applied to a universal serial bus cable, and universal serial bus cable
CN106300252A (en) A kind of electrical leakage detecting method, device and terminal unit
TW200838086A (en) Connector and method thereof
EP2993757A1 (en) Method of managing the charging of battery and electronic device adapted thereto

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
CB02 Change of applicant information
CB02 Change of applicant information

Address after: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant after: OPPO Guangdong Mobile Communications Co., Ltd.

Address before: 523860 No. 18, Wu Sha Beach Road, Changan Town, Dongguan, Guangdong

Applicant before: Guangdong OPPO Mobile Communications Co., Ltd.

GR01 Patent grant
GR01 Patent grant