CN109669909A - External equipment implementation method, device, terminal and storage medium - Google Patents
External equipment implementation method, device, terminal and storage medium Download PDFInfo
- Publication number
- CN109669909A CN109669909A CN201811536488.4A CN201811536488A CN109669909A CN 109669909 A CN109669909 A CN 109669909A CN 201811536488 A CN201811536488 A CN 201811536488A CN 109669909 A CN109669909 A CN 109669909A
- Authority
- CN
- China
- Prior art keywords
- power supply
- terminal
- usb
- supply voltage
- voltage signal
- 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
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/266—Arrangements to supply power to external peripherals either directly from the computer or under computer control, e.g. supply of power through the communication port, computer controlled power-strips
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F1/00—Details not covered by groups G06F3/00 - G06F13/00 and G06F21/00
- G06F1/26—Power supply means, e.g. regulation thereof
- G06F1/28—Supervision thereof, e.g. detecting power-supply failure by out of limits supervision
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Power Sources (AREA)
Abstract
The embodiment of the invention discloses a kind of external equipment implementation method, device, terminal and storage mediums, wherein, this method comprises: the power supply voltage signal detected on the power supply line in terminal usb signal line opens charge mode if power supply voltage signal meets preset condition;It detects and whether there is USB ID signal on the ID line in terminal usb signal line, if there is USB ID signal, then reporting terminal is carries out USB enumeration after main equipment, to carry out data transmission with external equipment.The embodiment of the present invention solves the problems, such as that terminal cannot combine OTG function and charging in the prior art, the effect that terminal is carried out data transmission based on its OTG function and external equipment simultaneously during the charging process is realized, while solving the problems, such as to cause terminal power sharply to decline because of access external equipment.
Description
Technical field
The present embodiments relate to electronic technology field more particularly to a kind of external equipment implementation method, device, terminal and
Storage medium.
Background technique
With the development of science and technology, On-The-Go (OTG) function is gradually popularized, by OTG function, user can be by mobile phone
Or the terminals such as plate and universal serial bus (Universal Serial Bus, USB) storage equipment connect, and carry out data friendship
It changes, keyboard, mouse or other external equipments can also be connected as the input equipment of terminal.
Since the OTG functional interface and charge function interface of terminal are the same interface, OTG function and charge function can not
It uses simultaneously;And during using OTG function, need terminal for the USB device power supply of its connection, so that the function of terminal
Consumption increases, it is easy to cause user to have to stop using OTG function, charge for terminal, user experience is poor.
Summary of the invention
The embodiment of the present invention provides a kind of external equipment implementation method, device, terminal and storage medium, to realize that terminal can
To combine the effect of its OTG function and charging, the phenomenon that causing terminal power sharply to decline because of access external equipment is avoided.
In a first aspect, the embodiment of the invention provides a kind of external equipment implementation methods, this method comprises:
The power supply voltage signal on the power supply line in terminal usb signal line is detected, if the power supply voltage signal meets
Preset condition then opens charge mode;
It detects on the ID line in the terminal usb signal line with the presence or absence of USB ID signal, if there is USB ID signal,
Report the terminal to carry out USB enumeration after main equipment, then to carry out data transmission with external equipment.
Second aspect, the embodiment of the invention also provides a kind of external equipment realization device, which includes:
Power supply voltage signal detection module, for detecting the power supply voltage signal on the power supply line in terminal usb signal line;
USB ID signal detection module, for detecting on the ID line in the terminal usb signal line with the presence or absence of USB ID
Signal;
First processing module, for detecting that the power supply voltage signal meets in the power supply voltage signal detection module
Charge mode is opened when preset condition, and when the USB ID signal detection module detects the presence of USB ID signal, is reported
The terminal is carries out USB enumeration after main equipment, to carry out data transmission with external equipment.
The third aspect, the embodiment of the invention also provides a kind of terminal, which includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processing
Device realizes the external equipment implementation method as described in any embodiment of the present invention.
Fourth aspect, the embodiment of the invention also provides a kind of computer readable storage mediums, are stored thereon with computer
Program realizes the external equipment implementation method as described in any embodiment of the present invention when the program is executed by processor.
The embodiment of the present invention passes through the power supply voltage signal detected on the power supply line in terminal usb signal line first, if
Whether power supply voltage signal meets preset condition, then opens charge mode, then detect and deposit on the ID line in terminal usb signal line
In USB ID signal, if there is USB ID signal, then reporting terminal is to carry out USB enumeration after main equipment, so that terminal and outer
It connects equipment to carry out data transmission, solves the problems, such as that terminal cannot combine OTG function and charging in the prior art, realize
The effect that terminal is carried out data transmission based on its OTG function and external equipment simultaneously during the charging process, while solving because connecing
Enter the problem of external equipment causes terminal power sharply to decline, ensure that data transmission quality.
Detailed description of the invention
Fig. 1 is the flow diagram for the external equipment implementation method that the embodiment of the present invention one provides;
Fig. 2 is the flow diagram of external equipment implementation method provided by Embodiment 2 of the present invention;
Fig. 3 is the flow diagram for the external equipment implementation method that the embodiment of the present invention three provides;
Fig. 4 is the structural schematic diagram for the external equipment realization device that the embodiment of the present invention four provides;
Fig. 5 is a kind of structure chart for terminal that the embodiment of the present invention five provides.
Specific embodiment
The present invention is described in further detail with reference to the accompanying drawings and examples.It is understood that this place is retouched
The specific embodiment stated is used only for explaining the present invention rather than limiting the invention.It also should be noted that in order to just
Only the parts related to the present invention are shown in description, attached drawing rather than entire infrastructure.
Embodiment one
Fig. 1 is the flow diagram for the external equipment implementation method that the embodiment of the present invention one provides, and the present embodiment is applicable
During using terminal OTG function simultaneously be terminal charge the case where, this method can be by external equipment realization device
It executes, which can be realized by the mode of software and/or hardware, and can be integrated in the terminal for supporting OTG function, such as
Support the smart machines such as mobile phone or the tablet computer of OTG function.
As shown in Figure 1, external equipment implementation method provided in this embodiment may include:
The power supply voltage signal on power supply line in S101, detection terminal usb signal line, if power supply voltage signal meets
Preset condition then opens charge mode.
Support the terminal of OTG function can pass through a USB interface and connect at least two simultaneously external to set in the present embodiment
It is standby, for example, terminal passes through the external equipment that the connection of its USB interface has data storage function, then external power supply power supply first
It is connect by this external equipment with terminal.By the signal in detection terminal usb signal line, terminal can identify different outer
Connect equipment.In signal detection process, the power supply voltage signal on the power supply line in terminal usb signal line, and root are detected first
Whether meet preset condition according to the power supply voltage signal, determines whether terminal opens charge mode.Wherein, preset condition refers to inspection
The power supply voltage signal measured is within the scope of the specification power supply voltage signal of terminal charge, and specification power supply voltage signal range can
It is configured with the safe voltage section being able to bear according to terminal.For example, if the power supply voltage signal detected is in
Between 4.5V-5.5V, then it is assumed that external power supply plant-grid connection terminal, terminal initiate traps to open charge mode, based on filling
Electric agreement is charged using the electric energy that external power supply power supply provides.
Terminal in the present embodiment supports USB fast charge agreement, such as Quick Charge and USB Power
The agreements such as Delivery, may be implemented quick charge.
It whether there is USB ID signal on ID line in S102, detection terminal usb signal line, believe if there is USB ID
Number, then reporting terminal is carries out USB enumeration after main equipment, to carry out data transmission with external equipment.
After terminal opens charge mode, continue to test with the presence or absence of USB ID signal on the ID line in its usb signal line, such as
Fruit USB ID signal exists, then illustrates that the OTG function of terminal is opened.At this point, to terminal system reporting terminal be main equipment, it is external
Equipment is from equipment, wherein the terminal system refers to the processing system for supporting the terminal of OTG function.Then, by terminal and outside
The communication channel for connecing equipment foundation carries out USB enumeration to external equipment, i.e., carries out enumerating configuration to external equipment, such as execute and obtain
It takes port status (Get Port Status), configures external equipment address (Set Address), parse the description of external equipment
The sequence of operations such as symbol and carry driving, allow terminal to identify external equipment, and carry out data transmission.
In the technical solution of the present embodiment, in the case where terminal is in charged state and detects USB ID signal, still
It is main equipment to terminal system reporting terminal, allows terminal system to access for current only external equipment, so that opening OTG
Function and allow external power supply be terminal charge while be possibly realized, it is ensured that the company of terminal and external equipment in the case
Connecing will not interrupt, and can continue the OTG function based on terminal and carry out data transmission with external equipment, so that carrying out data transmission
While for terminal charge operation.
It should be noted that in the prior art, to the detection ordering of terminal USB access situation are as follows: detection terminal first
USB ID signal, main equipment (A-Device) is determined and from equipment (B-Device), for example, usually using OTG equipment
The equipment of ID wire pin ground connection in plug is known as main equipment, and the hanging equipment of ID wire pin is known as from equipment;Then actively
The power supply line in main equipment usb signal line is enabled, main device is made to power from equipment.However, in the present embodiment, examining first
Survey the power supply voltage signal on the power supply line in terminal usb signal line;Then detect that terminal USB believes under terminal charge mode
It is main equipment to terminal system reporting terminal, but terminal actually at this time there are when USB ID signal on ID line in number line
Outward power supply, therefore, compared with the prior art, it is believed that in the present embodiment to terminal system reporting terminal be main equipment
Operation belong to a kind of " false " and operate.
By the power supply voltage signal and USB ID signal detection order that are different from the prior art and about main equipment
False operation, operation while ensure that terminal charge and terminal OTG function.If signal detection order changes or lacks
" false " operation, terminal will become conventional connection by the connection of USB interface and external equipment and external power supply power supply, i.e., commonly
Charging connection is connected with common OTG.
Optionally, this method further include:
During carrying out data transmission with external equipment, real-time monitoring power supply voltage signal;
When power supply voltage signal is unsatisfactory for preset condition, then the power supply line in detection terminal usb signal line is continued to execute
On power supply voltage signal operation.
By real-time monitoring power supply voltage signal in data transmission procedure, external power supply power supply and terminal can be found in time
Whether normally connect, whether it is executed normally for terminal charge, avoids in data transmission procedure power consumption of terminal consumption larger, electricity is sharply
Decline, data transmission are forced to terminate, and influence data transmission quality and efficiency.
Illustratively, external power supply power supply passes through the USB interface of external equipment A access terminal, in external equipment A and terminal
During carrying out data transmission, the connection of external power supply power supply and terminal is interrupted, such as external power supply power supply is moved out of,
At this point, the power supply voltage signal on power supply line in terminal usb signal line is lower, it is unsatisfactory for preset condition, then executes inspection again
The operation of the power supply voltage signal on the power supply line in terminal usb signal line is surveyed, until the power supply voltage signal detected meets
Terminal charge mode is opened when preset condition.Wherein, about the electricity on the power supply line executed in detection terminal usb signal line again
Source voltage signal can be and carry out interval detection according to the preset time cycle, or determined according to preset detection time
When detect;It can also be when external power supply power supply is reconnected by external equipment A and terminal, send charge request to terminal
Signal, the charge request signal are used to indicate terminal unlatching charge mode and then detect after terminal receives the charge request signal
The power supply voltage signal on power supply line in terminal usb signal line.Compared to real-time detection power supply voltage signal, pass through above-mentioned
Every detection, timing detection or charge request signal detection trigger, external power supply power supply and end can be reduced to a certain extent
The power consumption of terminal after the connection at end is interrupted.
In addition, the connection of external power supply power supply and external equipment A disconnect, but external after external power supply power supply is moved out of
The connection of equipment A and terminal is not interrupted, and there are still USB ID signal on the ID line in terminal usb signal line, terminal is
The role of main equipment does not change, therefore, normal data transmission can be still carried out between terminal and external equipment A, terminal
OTG function is kept it turned on.
The present embodiment technical solution passes through the power supply voltage signal detected on the power supply line in terminal usb signal line first,
If power supply voltage signal meets preset condition, charge mode is opened, then detecting on the ID line in terminal usb signal line is
No there are USB ID signals, and if there is USB ID signal, then reporting terminal is carries out USB enumeration after main equipment, so that terminal
Carry out data transmission with external equipment.Since after realizing data transmission, reporting terminal is main equipment, and non-disconnected end fills
Electrical connection, thus solve the problems, such as that terminal cannot combine OTG function and charging in the prior art, it realizes terminal and is filling
The effect carried out data transmission simultaneously based on its OTG function and external equipment in electric process, while solving because accessing external set
Standby the problem of causing terminal power sharply to decline, it ensure that data transmission quality.
Embodiment two
Fig. 2 is the flow diagram of external equipment implementation method provided by Embodiment 2 of the present invention, and the present embodiment is upper
Further progress extends and optimizes on the basis of stating embodiment.As shown in Fig. 2, this method may include:
The power supply voltage signal on power supply line in S201, detection terminal usb signal line.
S202, judge whether power line voltage meets preset condition.
If satisfied, S203 is then executed, if not satisfied, then executing S204.
S203, charge mode is opened, and detected with the presence or absence of USB ID signal on the ID line in terminal usb signal line, such as
There are USB ID signals for fruit, then USB enumeration are carried out after being main equipment to terminal system reporting terminal, so that terminal and external equipment
Carry out data transmission.
It whether there is USB ID signal on ID line in S204, detection terminal usb signal line, believe if there is USB ID
Number, then USB enumeration is carried out after opening power supply voltage signal, so that terminal and external equipment carry out data transmission.
When the power supply voltage signal initially detected is unsatisfactory for preset condition, it is believed that terminal does not access outer at this time
Portion's power supply, at this point, the connection of terminal and external equipment belongs to conventional connection type, i.e., in data transmission procedure, terminal
It can power to external equipment.Therefore, it when detecting on the ID line in terminal usb signal line there are when USB ID signal, opens
USB enumeration is carried out to external equipment again after power supply voltage signal, terminal may be implemented and power to external equipment.
Optionally, this method further include:
During carrying out data transmission with external equipment, real-time monitoring power supply voltage signal;
When power supply voltage signal meets preset condition, then continue to execute on the power supply line in detection terminal usb signal line
Power supply voltage signal operation.
Illustratively, external equipment has been only accessed in the initial stage, terminal without accessing external power supply power supply, still
In data transmission procedure, external power supply power supply is connect by the external equipment that terminal currently connects with terminal, if detected
The power supply voltage signal on power supply line in terminal usb signal line meets preset condition, then terminal opens charge mode, is filled
Electricity.
In the present embodiment technical solution, if the power supply voltage signal in the terminal usb signal line detected on power supply line
Meet preset condition, then opens the USB ID signal for continuing to test terminal after charge mode;If the supply voltage letter detected
Number it is unsatisfactory for preset condition, then directly detects the USB ID signal of terminal, and opened on the power supply line in terminal usb signal line
External equipment is carried out after power supply voltage signal to enumerate setting.The case where the power supply voltage signal detected meets preset condition
Under, since after realizing data transmission, reporting terminal is main equipment, and the charging connection of non-disconnected end, thus is solved existing
There is the problem of terminal cannot combine OTG function and charging in technology, realizes terminal during the charging process while based on it
The effect that OTG function and external equipment carry out data transmission, while solving because access external equipment leads to terminal power sharply
The problem of decline, ensure that data transmission quality;In the case where undetected power supply voltage signal meets preset condition, eventually
End switches to conventional connection type with external equipment, i.e., can be to external while terminal and external equipment carry out data transmission
Equipment power supply, again such that data transmission can be normally carried out.
Embodiment three
Fig. 3 is the flow diagram for the external equipment implementation method that the embodiment of the present invention three provides, in above-described embodiment
On the basis of advanced optimize, as shown in figure 3, this method may include:
The power supply voltage signal on power supply line in S301, detection terminal usb signal line.
S302, judge whether power supply voltage signal meets preset condition.
If satisfied, then executing S303;If not satisfied, then executing S304.
S303, charge mode is opened, and executes S304.
It whether there is USB ID signal on ID line in S304, detection terminal usb signal line.
It if it is after opening charge mode, detects USB ID signal, then executes S306, if being not turned on charging mould
Formula directly detects USB ID signal, then executes S305;If not detecting USB ID signal, S307 is executed.
S305, USB enumeration is carried out after opening power supply voltage signal, to carry out data transmission with external equipment.
S306, reporting terminal is carry out USB enumeration after main equipment, to carry out data transmission with external equipment.
S307, terminate current detection operation.
At this point, continuing to charge if terminal has been in charged state.
S308, real-time monitoring power supply voltage signal, and return to S302.
No matter whether terminal opens charge mode, during terminal and external equipment carry out data transmission, holding pair
The real-time monitoring of power supply voltage signal confirms the connection of external power supply power supply and terminal.
The present embodiment technical solution by successively detect terminal usb signal line in power supply line on power supply voltage signal and
USB ID signal on ID line in terminal usb signal line, identifies external equipment, also, in the number of terminal and external equipment
According to real-time monitoring power supply voltage signal in transmission process, detection power supply voltage signal and USB ID signal are repeated, is solved
Terminal cannot combine the problem of OTG function and charging in the prior art, realize terminal during the charging process while being based on
The effect that its OTG function and external equipment carry out data transmission, while solving because access external equipment causes terminal power anxious
The problem of play decline, it ensure that data transmission quality.
Example IV
Fig. 4 is the structural schematic diagram for the external equipment realization device that the embodiment of the present invention four provides, and the present embodiment is applicable
During using terminal OTG function simultaneously be terminal charge the case where.The device can be by the side of software and/or hardware
Formula is realized, and can be integrated in the terminal for supporting OTG function, such as the intelligence such as mobile phone or tablet computer for supporting OTG function is set
It is standby.
External equipment realization device provided in an embodiment of the present invention can be performed provided by any embodiment of the invention external
Equipment implementation method has the corresponding functional module of execution method and beneficial effect.The not skill of detailed description in the present embodiment
Art details, reference can be made to the content of any means embodiment of the present invention is explained.
As shown in figure 4, external equipment realization device provided in this embodiment may include power supply voltage signal detection module
410, USB ID signal detection module 420 and first processing module 430, in which:
Power supply voltage signal detection module 410, for detecting the letter of the supply voltage on the power supply line in terminal usb signal line
Number;
USB ID signal detection module 420 is believed on the ID line in terminal usb signal line with the presence or absence of USB ID for detecting
Number;
First processing module 430, it is pre- for detecting that power supply voltage signal meets in power supply voltage signal detection module 410
If opening charge mode when condition, and when USB ID signal detection module 420 detects the presence of USB ID signal, reporting terminal
To carry out USB enumeration after main equipment, to carry out data transmission with external equipment.
Optionally, the device further include:
Second processing module, it is pre- for detecting that power supply voltage signal is unsatisfactory in power supply voltage signal detection module 410
If condition, and when USB ID signal detection module 420 detects the presence of USB ID signal, it is carried out after opening power supply voltage signal
USB enumeration, to carry out data transmission with external equipment.
Optionally, the device further include:
First power supply voltage signal monitoring modular, for during carrying out data transmission with external equipment, real-time monitoring
Power supply voltage signal, and when power supply voltage signal is unsatisfactory for preset condition, then turn by power supply voltage signal detection module 410
It executes.
Optionally, the device further include:
Second source voltage signal monitoring modular, for during carrying out data transmission with external equipment, real-time monitoring
Power supply voltage signal, and when power supply voltage signal meets preset condition, then turn to be held by power supply voltage signal detection module 410
Row.
The present embodiment technical solution passes through the power supply voltage signal detected on the power supply line in terminal usb signal line first,
If power supply voltage signal meets preset condition, charge mode is opened, then detecting on the ID line in terminal usb signal line is
No there are USB ID signals, and if there is USB ID signal, then reporting terminal is carries out USB enumeration after main equipment, so that terminal
Carry out data transmission with external equipment.After realizing data transmission, reporting terminal is main equipment, and does not break this implementation technical solution
The charging connection for opening terminal solves the problems, such as that terminal cannot combine OTG function and charging in the prior art, realize
OTG function and external equipment based on terminal are simultaneously the effect of terminal charge during carrying out data transmission, and are solved simultaneously
The problem of causing terminal power sharply to decline because of access external equipment, it ensure that data transmission quality.
Embodiment five
Fig. 5 is a kind of structural schematic diagram for terminal that the embodiment of the present invention five provides.Fig. 5, which is shown, to be suitable for being used to realizing this
The block diagram of the exemplary terminal 512 of invention embodiment.The terminal 512 that Fig. 5 is shown is only an example, should not be to the present invention
The function and use scope of embodiment bring any restrictions.
As shown in figure 5, terminal 512 is showed in the form of general purpose terminal.The component of terminal 512 can include but is not limited to:
One or more processor 516, storage device 528 connect different system components (including storage device 528 and processor
516) bus 518.
Bus 518 indicates one of a few class bus structures or a variety of, including storage device bus or storage device control
Device processed, peripheral bus, graphics acceleration port, processor or total using the local of any bus structures in a variety of bus structures
Line.For example, these architectures include but is not limited to industry standard architecture (Industry Subversive
Alliance, ISA) bus, microchannel architecture (Micro Channel Architecture, MAC) bus is enhanced
Isa bus, Video Electronics Standards Association (Video Electronics Standards Association, VESA) local are total
Line and peripheral component interconnection (Peripheral Component Interconnect, PCI) bus.
Terminal 512 typically comprises a variety of computer system readable media.These media can be it is any can be by terminal
The usable medium of 512 access, including volatile and non-volatile media, moveable and immovable medium.
Storage device 528 may include the computer system readable media of form of volatile memory, such as arbitrary access
Memory (Random Access Memory, RAM) 530 and/or cache memory 532.Terminal 512 can be wrapped further
Include other removable/nonremovable, volatile/non-volatile computer system storage mediums.Only as an example, storage system
534 can be used for reading and writing immovable, non-volatile magnetic media (Fig. 5 do not show, commonly referred to as " hard disk drive ").Although
It is not shown in Fig. 5, the disc driver for reading and writing to removable non-volatile magnetic disk (such as " floppy disk ") can be provided, and
To removable anonvolatile optical disk, such as CD-ROM (Compact Disc Read-Only Memory, CD-ROM), number
Optic disk (Digital Video Disc-Read Only Memory, DVD-ROM) or other optical mediums) read-write CD drive
Dynamic device.In these cases, each driver can be connected by one or more data media interfaces with bus 518.It deposits
Storage device 528 may include at least one program product, which has one group of (for example, at least one) program module, this
A little program modules are configured to perform the function of various embodiments of the present invention.
Program/utility 540 with one group of (at least one) program module 542 can store in such as storage dress
It sets in 528, such program module 542 includes but is not limited to operating system, one or more application program, other program moulds
It may include the realization of network environment in block and program data, each of these examples or certain combination.Program module
542 usually execute function and/or method in embodiment described in the invention.
Terminal 512 can also be logical with one or more external equipments 514 (such as keyboard, direction terminal, display 524 etc.)
Letter, can also be enabled a user to one or more terminal interact with the terminal 512 communicate, and/or with make the terminal 512
Any terminal (such as network interface card, modem etc.) communication that can be communicated with one or more of the other computing terminal.This
Kind communication can be carried out by input/output (I/O) interface 522.Also, terminal 512 can also by network adapter 520 with
One or more network (such as local area network (Local Area Network, LAN), wide area network (Wide Area Network,
WAN) and/or public network, for example, internet) communication.As shown in figure 5, network adapter 520 passes through bus 518 and terminal 512
Other modules communication.It should be understood that although not shown in the drawings, other hardware and/or software mould can be used in conjunction with terminal 512
Block, including but not limited to: microcode, terminal driver, redundant processor, external disk drive array, disk array
(Redundant Arrays of Independent Disks, RAID) system, tape drive and data backup storage system
System etc..
The program that processor 516 is stored in storage device 528 by operation, thereby executing various function application and number
According to processing, such as realize external equipment implementation method provided by any embodiment of the invention, this method may include:
The power supply voltage signal on the power supply line in terminal usb signal line is detected, is preset if power supply voltage signal meets
Condition then opens charge mode;
Detect terminal usb signal line in ID line on whether there is USB ID signal, if there is USB ID signal, then on
Report terminal is carries out USB enumeration after main equipment, to carry out data transmission with external equipment.
In other embodiments, the program that processor 516 is stored in storage device 528 by operation, thereby executing each
Kind functional application and data processing, can also realize external equipment implementation method provided by above-mentioned any embodiment.
Embodiment six
The embodiment of the present invention six additionally provides a kind of computer readable storage medium, is stored thereon with computer program, should
Realize that such as external equipment implementation method provided by any embodiment of the invention, this method can wrap when program is executed by processor
It includes:
The power supply voltage signal on the power supply line in terminal usb signal line is detected, is preset if power supply voltage signal meets
Condition then opens charge mode;
Detect terminal usb signal line in ID line on whether there is USB ID signal, if there is USB ID signal, then on
Report terminal is carries out USB enumeration after main equipment, to carry out data transmission with external equipment.
The computer storage medium of the embodiment of the present invention, can be using any of one or more computer-readable media
Combination.Computer-readable medium can be computer-readable signal media or computer readable storage medium.It is computer-readable
Storage medium for example may be-but not limited to-the system of electricity, magnetic, optical, electromagnetic, infrared ray or semiconductor, device or
Device, or any above combination.The more specific example (non exhaustive list) of computer readable storage medium includes: tool
There are electrical connection, the portable computer diskette, hard disk, random access memory (RAM), read-only memory of one or more conducting wires
(ROM), erasable programmable read only memory (EPROM or flash memory), optical fiber, portable compact disc read-only memory (CD-
ROM), light storage device, magnetic memory device or above-mentioned any appropriate combination.In this document, computer-readable storage
Medium can be any tangible medium for including or store program, which can be commanded execution system, device or device
Using or it is in connection.
Computer-readable signal media may include in a base band or as carrier wave a part propagate data-signal,
Wherein carry computer-readable program code.The data-signal of this propagation can take various forms, including but unlimited
In electromagnetic signal, optical signal or above-mentioned any appropriate combination.Computer-readable signal media can also be that computer can
Any computer-readable medium other than storage medium is read, which can send, propagates or transmit and be used for
By the use of instruction execution system, device or device or program in connection.
The program code for including on computer-readable medium can transmit with any suitable medium, including --- but it is unlimited
In wireless, electric wire, optical cable, RF etc. or above-mentioned any appropriate combination.
The computer for executing operation of the present invention can be write with one or more programming languages or combinations thereof
Program code, described program design language include object oriented program language-such as Java, Smalltalk, C++,
Further include conventional procedural programming language-such as " C " language or similar programming language.Program code can be with
It fully executes, partly execute on the user computer on the user computer, being executed as an independent software package, portion
Divide and partially executes or executed on a remote computer or server completely on the remote computer on the user computer.?
Be related in the situation of remote computer, remote computer can pass through the network of any kind --- including local area network (LAN) or
Wide area network (WAN)-be connected to subscriber computer, or, it may be connected to outer computer (such as mentioned using Internet service
It is connected for quotient by internet).
Note that the above is only a better embodiment of the present invention and the applied technical principle.It will be appreciated by those skilled in the art that
The invention is not limited to the specific embodiments described herein, be able to carry out for a person skilled in the art it is various it is apparent variation,
It readjusts and substitutes without departing from protection scope of the present invention.Therefore, although being carried out by above embodiments to the present invention
It is described in further detail, but the present invention is not limited to the above embodiments only, without departing from the inventive concept, also
It may include more other equivalent embodiments, and the scope of the invention is determined by the scope of the appended claims.
Claims (10)
1. a kind of external equipment implementation method characterized by comprising
The power supply voltage signal on the power supply line in terminal usb signal line is detected, is preset if the power supply voltage signal meets
Condition then opens charge mode;
Detect on the ID line in the terminal usb signal line with the presence or absence of USB ID signal, if there is USB ID signal, then on
Report the terminal to carry out USB enumeration after main equipment, to carry out data transmission with external equipment.
2. the method according to claim 1, wherein the method also includes:
If the power supply voltage signal is unsatisfactory for preset condition, detect on the ID line in the terminal usb signal line whether
There are USB ID signals;
If there is USB ID signal, then USB enumeration is carried out after opening the power supply voltage signal, to carry out with external equipment
Data transmission.
3. the method according to claim 1, wherein the method also includes:
During carrying out data transmission with external equipment, power supply voltage signal described in real-time monitoring;
When the power supply voltage signal is unsatisfactory for preset condition, then the electricity in the detection terminal usb signal line is continued to execute
The operation of power supply voltage signal on the line of source.
4. according to the method described in claim 2, it is characterized in that, the method also includes:
During carrying out data transmission with external equipment, power supply voltage signal described in real-time monitoring;
When the power supply voltage signal meets preset condition, then the power supply in the detection terminal usb signal line is continued to execute
The operation of power supply voltage signal on line.
5. a kind of external equipment realization device characterized by comprising
Power supply voltage signal detection module, for detecting the power supply voltage signal on the power supply line in terminal usb signal line;
USB ID signal detection module, for detecting on the ID line in the terminal usb signal line with the presence or absence of USB ID signal;
First processing module, it is default for detecting that the power supply voltage signal meets in the power supply voltage signal detection module
Charge mode is opened when condition, and when the USB ID signal detection module detects the presence of USB ID signal, report described
Terminal is carries out USB enumeration after main equipment, to carry out data transmission with external equipment.
6. device according to claim 5, which is characterized in that described device further include:
Second processing module, it is pre- for detecting that the power supply voltage signal is unsatisfactory in the power supply voltage signal detection module
If condition, and when the USB ID signal detection module detects the presence of USB ID signal, open the power supply voltage signal
After carry out USB enumeration, to carry out data transmission with external equipment.
7. device according to claim 5, which is characterized in that described device further include:
First power supply voltage signal monitoring modular, for during carrying out data transmission with external equipment, described in real-time monitoring
Power supply voltage signal, and when the power supply voltage signal is unsatisfactory for preset condition, then turn to be examined by the power supply voltage signal
Module is surveyed to execute.
8. device according to claim 6, which is characterized in that described device further include:
Second source voltage signal monitoring modular, for during carrying out data transmission with external equipment, described in real-time monitoring
Power supply voltage signal, and when the power supply voltage signal meets preset condition, then turn to be detected by the power supply voltage signal
Module executes.
9. a kind of terminal, which is characterized in that the terminal includes:
One or more processors;
Storage device, for storing one or more programs,
When one or more of programs are executed by one or more of processors, so that one or more of processors are real
The now external equipment implementation method as described in any in claim 1-4.
10. a kind of computer readable storage medium, is stored thereon with computer program, which is characterized in that the program is by processor
The external equipment implementation method as described in any in claim 1-4 is realized when execution.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811536488.4A CN109669909A (en) | 2018-12-14 | 2018-12-14 | External equipment implementation method, device, terminal and storage medium |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201811536488.4A CN109669909A (en) | 2018-12-14 | 2018-12-14 | External equipment implementation method, device, terminal and storage medium |
Publications (1)
Publication Number | Publication Date |
---|---|
CN109669909A true CN109669909A (en) | 2019-04-23 |
Family
ID=66143985
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201811536488.4A Pending CN109669909A (en) | 2018-12-14 | 2018-12-14 | External equipment implementation method, device, terminal and storage medium |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN109669909A (en) |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114442778A (en) * | 2020-11-02 | 2022-05-06 | 微盟电子(昆山)有限公司 | Power supply access method, power supply switching method and electronic equipment |
Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101675420A (en) * | 2007-05-02 | 2010-03-17 | Sk电信有限公司 | Multimedia system by using external connection apparatus and external connection apparatus therefor |
CN101901201A (en) * | 2010-08-06 | 2010-12-01 | 中兴通讯股份有限公司 | Method and device for realizing USB OTG function on electronic equipment |
US8064613B1 (en) * | 2008-03-03 | 2011-11-22 | Maxim Integrated Products, Inc. | Electret microphone detection using a current source |
CN102890666A (en) * | 2012-07-13 | 2013-01-23 | 华为终端有限公司 | Device and method for sharing interface, and mobile communication terminal |
CN105896662A (en) * | 2016-05-11 | 2016-08-24 | 深圳市高拓新能科技有限公司 | Single-port mobile power control circuit and control method thereof |
CN107329520A (en) * | 2017-06-12 | 2017-11-07 | 北京小米移动软件有限公司 | USB interface connection method, equipment and the system of mobile terminal |
CN107562166A (en) * | 2017-08-25 | 2018-01-09 | 维沃移动通信有限公司 | Connection method, mobile terminal and the computer-readable recording medium of external equipment |
CN108268411A (en) * | 2016-12-30 | 2018-07-10 | 维沃移动通信有限公司 | The method and mobile terminal of a kind of data transmission |
CN108845655A (en) * | 2018-06-21 | 2018-11-20 | Oppo广东移动通信有限公司 | Control method of electronic device, device, control circuit and electronic equipment |
-
2018
- 2018-12-14 CN CN201811536488.4A patent/CN109669909A/en active Pending
Patent Citations (9)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101675420A (en) * | 2007-05-02 | 2010-03-17 | Sk电信有限公司 | Multimedia system by using external connection apparatus and external connection apparatus therefor |
US8064613B1 (en) * | 2008-03-03 | 2011-11-22 | Maxim Integrated Products, Inc. | Electret microphone detection using a current source |
CN101901201A (en) * | 2010-08-06 | 2010-12-01 | 中兴通讯股份有限公司 | Method and device for realizing USB OTG function on electronic equipment |
CN102890666A (en) * | 2012-07-13 | 2013-01-23 | 华为终端有限公司 | Device and method for sharing interface, and mobile communication terminal |
CN105896662A (en) * | 2016-05-11 | 2016-08-24 | 深圳市高拓新能科技有限公司 | Single-port mobile power control circuit and control method thereof |
CN108268411A (en) * | 2016-12-30 | 2018-07-10 | 维沃移动通信有限公司 | The method and mobile terminal of a kind of data transmission |
CN107329520A (en) * | 2017-06-12 | 2017-11-07 | 北京小米移动软件有限公司 | USB interface connection method, equipment and the system of mobile terminal |
CN107562166A (en) * | 2017-08-25 | 2018-01-09 | 维沃移动通信有限公司 | Connection method, mobile terminal and the computer-readable recording medium of external equipment |
CN108845655A (en) * | 2018-06-21 | 2018-11-20 | Oppo广东移动通信有限公司 | Control method of electronic device, device, control circuit and electronic equipment |
Cited By (1)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN114442778A (en) * | 2020-11-02 | 2022-05-06 | 微盟电子(昆山)有限公司 | Power supply access method, power supply switching method and electronic equipment |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US8135883B2 (en) | USB hub apparatus supporting multiple high speed devices and a single super speed device | |
US8843770B2 (en) | Device charging over USB using a plurality of handshakes | |
EP2860638B1 (en) | Serial communication over communication control pin | |
US20170194756A1 (en) | Usb data cable containing extension interface and control method thereof | |
US20120311203A1 (en) | Usb switch which allows primary usb connection in response to usb signaling | |
US20180241232A1 (en) | Techniques for serial interface charging | |
CN108845655B (en) | Electronic equipment control method and device, control circuit and electronic equipment | |
EP2669761A2 (en) | System, apparatus, and method of performing charging operation in host mode | |
CN112799985B (en) | USB interface control method, USB control circuit and intelligent networking equipment mainboard | |
CN104836877B (en) | A kind of method for debugging detection mobile phone | |
CN108054794A (en) | Charging and discharging method and device for intelligent terminal, terminal and storage medium | |
US10324512B2 (en) | Device power management based on detected power source | |
CN109254210A (en) | Electronic device port type detection method, apparatus, detection circuit and electronic equipment | |
CN107681730A (en) | A kind of battery, terminal device, charging system, the recognition methods of battery and device | |
CN109669909A (en) | External equipment implementation method, device, terminal and storage medium | |
CN107480084A (en) | Type C mobile terminals charge and data transmission method, device and storage medium | |
CN110493646A (en) | Method, apparatus, TV and the system of TV upgrading are carried out by external equipment | |
CN109542604A (en) | The method, apparatus, equipment and storage medium of grouting socket in thread | |
CN115333968A (en) | Network card batch test system and method with NCSI function | |
CN109522174A (en) | Control adb enabled method, apparatus, terminal and storage medium | |
Stan et al. | Role of usb communication in modem engineering education | |
CN205809774U (en) | A kind of server and the server master board of inside thereof | |
CN202422137U (en) | Computer and built-in functional daughter board thereof | |
CN105450843A (en) | Method and device of arranging operation mode of mobile terminal | |
CN216014148U (en) | Server and server backboard |
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 |
Application publication date: 20190423 |
|
RJ01 | Rejection of invention patent application after publication |