CN108446246A - A kind of implementation method, device and the computer storage media of OTG functions - Google Patents
A kind of implementation method, device and the computer storage media of OTG functions Download PDFInfo
- Publication number
- CN108446246A CN108446246A CN201810164895.0A CN201810164895A CN108446246A CN 108446246 A CN108446246 A CN 108446246A CN 201810164895 A CN201810164895 A CN 201810164895A CN 108446246 A CN108446246 A CN 108446246A
- Authority
- CN
- China
- Prior art keywords
- receiving
- input signal
- port
- tunnel
- receiving port
- Prior art date
- Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
- Granted
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/40—Bus structure
- G06F13/4063—Device-to-bus coupling
- G06F13/4068—Electrical coupling
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72403—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality
- H04M1/72409—User interfaces specially adapted for cordless or mobile telephones with means for local support of applications that increase the functionality by interfacing with external accessories
-
- H—ELECTRICITY
- H04—ELECTRIC COMMUNICATION TECHNIQUE
- H04M—TELEPHONIC COMMUNICATION
- H04M1/00—Substation equipment, e.g. for use by subscribers
- H04M1/72—Mobile telephones; Cordless telephones, i.e. devices for establishing wireless links to base stations without route selection
- H04M1/724—User interfaces specially adapted for cordless or mobile telephones
- H04M1/72448—User interfaces specially adapted for cordless or mobile telephones with means for adapting the functionality of the device according to specific conditions
Landscapes
- Engineering & Computer Science (AREA)
- Human Computer Interaction (AREA)
- Computer Networks & Wireless Communication (AREA)
- Signal Processing (AREA)
- General Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Computer Hardware Design (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Telephone Function (AREA)
Abstract
The embodiment of the invention discloses a kind of OTG functions realization devices.Described device includes:Receiving portion, for receiving first via input signal and the second tunnel input signal according to the reception mode of setting;Turning part, for obtaining first via output signal and the second tunnel output signal according to the reception mode corresponding conduction mode conducting first via input signal and the second tunnel input signal, the first via output signal is used for data transmission, and second tunnel output signal is for providing electric energy.The embodiment of the invention also discloses a kind of OTG function realizing methods.
Description
Technical field
The present embodiments relate to a kind of power technique fields more particularly to OTG (On The Go, in progress) work(
It can implementation method.
Background technology
OTG technologies are exactly to realize the data transmission of equipment room in the case of no host.Such as digital camera directly connects
It is connected on printer, by OTG technologies, connects the USB port of two equipment rooms, the photograph taken is printed immediately;Also may be used
By the data in digital camera, to be sent on the mobile hard disk of USB interface by OTG, field operation is just not necessarily to take
With expensive storage card, or one portable computer of the back of the body.
With the development of science and technology, smart mobile phone already becomes the center of personal information, smart mobile phone single product is in function
Upper stronger and stronger, OTG functions are also primary demand.In the prior art, when OTG functions are used in smart mobile phone, but not
Support charge function, and when smart mobile phone does not support OTG functions to use just in charging process.Smart mobile phone can not be compatible with OTG
Function and charge function are problems to be solved in the prior art.
Invention content
In order to solve the above technical problems, an embodiment of the present invention is intended to provide a kind of implementation methods of OTG functions.This method makes
OTG functions and charge function can be compatible with by obtaining terminal, promote user experience.
The technical proposal of the invention is realized in this way:
In a first aspect, an embodiment of the present invention provides a kind of OTG functions realization device, described device includes:
Receiving portion, for receiving first via input signal and the second tunnel input signal according to the reception mode of setting;
Turning part, for the first via input signal to be connected according to the corresponding conduction mode of the reception mode
First via output signal and the second tunnel output signal are obtained with the second tunnel input signal, the first via output signal is used for data
Transmission, second tunnel output signal is for providing electric energy.
In the above scheme, the receiving portion includes:
First receiving port, the second receiving port, for receiving first via input signal and the second tunnel input signal.
In the above scheme, the turning part includes:
First output port, for exporting first via output signal;
Second output terminal mouth, for exporting the second tunnel output signal.
In the above scheme, the receiving portion includes:First receiving port is for receiving the first via input
Signal, second receiving port is for receiving second tunnel input signal;Or, first receiving port is for receiving institute
The second tunnel input signal is stated, second receiving port is for receiving the first via input signal.
In the above scheme, the realization device of the OTG functions includes:
With first receiving port for receiving the first via input signal, second receiving port is for receiving
Second tunnel input signal, it is corresponding,
First receiving port of the receiving portion is connected with first output port of the turning part;Institute
Second receiving port for stating receiving portion is connected with the second output terminal mouth of the turning part.
In the above scheme, the realization device of the OTG functions includes:
With first receiving port for receiving second tunnel input signal, second receiving port is for receiving
The first via input signal, it is corresponding,
Second receiving port of the receiving portion is connected with first output port of the turning part;Institute
First receiving port for stating receiving portion is connected with the second output terminal mouth of the turning part.
In the above scheme, the receiving portion further includes:First control port and the second control port, for receiving the
One control signal and second control signal.
In the above scheme, the receiving portion includes:
When the voltage value of first control port meets the first predeterminated voltage, determine that first receiving port receives
The first via input signal, second receiving port receive second tunnel input signal;
When the voltage value of second control port meets the first predeterminated voltage, determine that first receiving port receives
Second tunnel input signal, second receiving port receive the first via input signal.
In the above scheme, the turning part further includes:
First enable port and the second enable port, first enable port are used to provide voltage for data transmission;Institute
State output of second enable port for enabling the second tunnel output signal.
In the above scheme, the turning part includes:
When the voltage of the first enable port meets the second predeterminated voltage, the first via output signal is exported.
In the above scheme, the turning part includes:
When the voltage of the second enable port meets third predeterminated voltage, second tunnel output signal is exported.
Second aspect, an embodiment of the present invention provides a kind of implementation method of OTG functions, the method includes:
First via input signal and the second tunnel input signal are received according to the reception mode of setting;
The first via input signal and the input of the second tunnel is connected according to the corresponding conduction mode of the reception mode
Signal obtains first via output signal and the second tunnel output signal, and the first via output signal is used for data transmission, and described the
Two tunnel output signals are for providing electric energy.
In the above scheme, the reception mode includes:Positive receive is received with reversal connection;Positive receive includes the first receiving terminal
Mouth receives the first via input signal, and the second receiving port receives second tunnel input signal;The reversal connection packet receiving includes
One receiving port receives second tunnel input signal, and the second receiving port receives the first via input signal.
In the above scheme, the conduction mode includes:Positive conducting is led to anti-ballistic;The positive conducting and the positive reception phase
It is corresponding, it is described anti-ballistic logical corresponding with reversal connection receipts;The positive conducting includes the input for receiving the first receiving port
Signal conduction to the first output port obtains the first via output signal, the input that second receiving port is received
Signal conduction to second output terminal mouth obtains second tunnel output signal, it is described it is anti-ballistic it is logical include receiving the first receiving port
The input signal be conducted to second output terminal mouth and obtain second tunnel output signal, second receiving port is received
The input signal be conducted to first output port and obtain the first via output signal.
An embodiment of the present invention provides a kind of OTG functions realization device and method, a kind of OTG functions realization device packet
It includes:
Receiving portion, for receiving first via input signal and the second tunnel input signal according to the reception mode of setting;
Turning part, for the first via input signal to be connected according to the corresponding conduction mode of the reception mode
First via output signal and the second tunnel output signal are obtained with the second tunnel input signal, the first via output signal is used for data
Transmission, second tunnel output signal is for providing electric energy.
Based on above-mentioned OTG realization devices, it can be compatible with OTG functions and charge function, improve user experience.
Description of the drawings
Fig. 1 is a kind of hardware architecture diagram of mobile terminal provided in an embodiment of the present invention;
Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention;
Fig. 3 is a kind of structural schematic diagram of OTG functions realization device provided in an embodiment of the present invention;
Fig. 4 is a kind of hardware architecture diagram of receiving portion provided in an embodiment of the present invention;
Fig. 5 is a kind of hardware architecture diagram of turning part provided in an embodiment of the present invention;
Fig. 6 is a kind of hardware architecture diagram of OTG functions realization device provided in an embodiment of the present invention;
Fig. 7 is a kind of circuit connection diagram of OTG functions realization device provided in an embodiment of the present invention;
Fig. 8 is the circuit connection diagram of another kind OTG function realization devices provided in an embodiment of the present invention;
Fig. 9 is a kind of flow chart of OTG function realizing methods provided in an embodiment of the present invention.
Specific implementation mode
It should be appreciated that the specific embodiments described herein are merely illustrative of the present invention, it is not intended to limit the present invention.
In subsequent description, using for indicating that the suffix of such as " module ", " component " or " unit " of element is only
The explanation for being conducive to the present invention, itself does not have a specific meaning.Therefore, " module ", " component " or " unit " can mix
Ground uses.
Terminal can be implemented in a variety of manners.For example, terminal described in the present invention may include such as mobile phone, tablet
Computer, laptop, palm PC, personal digital assistant (Personal Digital Assistant, PDA), portable
The shiftings such as media player (Portable Media Player, PMP), navigation device, wearable device, Intelligent bracelet, pedometer
The fixed terminals such as dynamic terminal, and number TV, desktop computer.
It will be illustrated by taking mobile terminal as an example in subsequent descriptions, it will be appreciated by those skilled in the art that in addition to special
Except element for moving purpose, construction according to the embodiment of the present invention can also apply to the terminal of fixed type.
Referring to Fig. 1, a kind of hardware architecture diagram of its mobile terminal of each embodiment to realize the present invention, the shifting
Moving terminal 100 may include:RF (Radio Frequency, radio frequency) unit 101, WiFi module 102, audio output unit
103, A/V (audio/video) input unit 104, sensor 105, display unit 106, user input unit 107, interface unit
108, the components such as memory 109, processor 110 and power supply 111.It will be understood by those skilled in the art that shown in Fig. 1
Mobile terminal structure does not constitute the restriction to mobile terminal, and mobile terminal may include components more more or fewer than diagram,
Either combine certain components or different components arrangement.
The all parts of mobile terminal are specifically introduced with reference to Fig. 1:
Radio frequency unit 101 can be used for receiving and sending messages or communication process in, signal sends and receivees, specifically, by base station
Downlink information receive after, to processor 110 handle;In addition, the data of uplink are sent to base station.In general, radio frequency unit 101
Including but not limited to antenna, at least one amplifier, transceiver, coupler, low-noise amplifier, duplexer etc..In addition, penetrating
Frequency unit 101 can also be communicated with network and other equipment by radio communication.Above-mentioned wireless communication can use any communication
Standard or agreement, including but not limited to GSM (Global System of Mobile communication, global system for mobile telecommunications
System), GPRS (General Packet Radio Service, general packet radio service), CDMA2000 (Code
Division Multiple Access 2000, CDMA 2000), WCDMA (Wideband Code Division
Multiple Access, wideband code division multiple access), TD-SCDMA (Time Division-Synchronous Code
Division Multiple Access, TD SDMA), FDD-LTE (Frequency Division
Duplexing-Long Term Evolution, frequency division duplex long term evolution) and TDD-LTE (Time Division
Duplexing-Long Term Evolution, time division duplex long term evolution) etc..
WiFi belongs to short range wireless transmission technology, and mobile terminal can help user to receive and dispatch electricity by WiFi module 102
Sub- mail, browsing webpage and access streaming video etc., it has provided wireless broadband internet to the user and has accessed.Although Fig. 1 shows
Go out WiFi module 102, but it is understood that, and it is not belonging to must be configured into for mobile terminal, it completely can be according to need
It to be omitted in the range for the essence for not changing invention.
Audio output unit 103 can be in call signal reception pattern, call mode, record mould in mobile terminal 100
When under the isotypes such as formula, speech recognition mode, broadcast reception mode, it is that radio frequency unit 101 or WiFi module 102 are received or
The audio data stored in memory 109 is converted into audio signal and exports to be sound.Moreover, audio output unit 103
The relevant audio output of specific function executed with mobile terminal 100 can also be provided (for example, call signal receives sound, disappears
Breath receives sound etc.).Audio output unit 103 may include loud speaker, buzzer etc..
A/V input units 104 are for receiving audio or video signal.A/V input units 104 may include graphics processor
(Graphics Processing Unit, GPU) 1041 and microphone 1042, graphics processor 1041 is in video acquisition mode
Or the image data of the static images or video obtained by image capture apparatus (such as camera) in image capture mode carries out
Reason.Treated, and picture frame may be displayed on display unit 106.Through graphics processor 1041, treated that picture frame can be deposited
Storage is sent in memory 109 (or other storage mediums) or via radio frequency unit 101 or WiFi module 102.Mike
Wind 1042 can connect in telephone calling model, logging mode, speech recognition mode etc. operational mode via microphone 1042
Quiet down sound (audio data), and can be audio data by such acoustic processing.Audio that treated (voice) data can
To be converted to the format output that can be sent to mobile communication base station via radio frequency unit 101 in the case of telephone calling model.
Microphone 1042 can implement various types of noises elimination (or inhibition) algorithms and send and receive sound to eliminate (or inhibition)
The noise generated during frequency signal or interference.
Mobile terminal 100 further includes at least one sensor 105, such as optical sensor, motion sensor and other biographies
Sensor.Specifically, optical sensor includes ambient light sensor and proximity sensor, wherein ambient light sensor can be according to environment
The light and shade of light adjusts the brightness of display panel 1061, and proximity sensor can close when mobile terminal 100 is moved in one's ear
Display panel 1061 and/or backlight.As a kind of motion sensor, accelerometer sensor can detect in all directions (general
For three axis) size of acceleration, size and the direction of gravity are can detect that when static, can be used to identify the application of mobile phone posture
(such as horizontal/vertical screen switching, dependent game, magnetometer pose calibrating), Vibration identification correlation function (such as pedometer, percussion) etc.;
The fingerprint sensor that can also configure as mobile phone, pressure sensor, iris sensor, molecule sensor, gyroscope, barometer,
The other sensors such as hygrometer, thermometer, infrared sensor, details are not described herein.
Display unit 106 is for showing information input by user or being supplied to the information of user.Display unit 106 can wrap
Display panel 1061 is included, liquid crystal display (Liquid Crystal Display, LCD), Organic Light Emitting Diode may be used
Forms such as (Organic Light-Emitting Diode, OLED) configure display panel 1061.
User input unit 107 can be used for receiving the number or character information of input, and generate the use with mobile terminal
Family is arranged and the related key signals input of function control.Specifically, user input unit 107 may include touch panel 1071 with
And other input equipments 1072.Touch panel 1071, also referred to as touch screen collect user on it or neighbouring touch operation
(for example user uses any suitable objects or attachment such as finger, stylus on touch panel 1071 or in touch panel 1071
Neighbouring operation), and corresponding attachment device is driven according to preset formula.Touch panel 1071 may include touch detection
Two parts of device and touch controller.Wherein, the touch orientation of touch detecting apparatus detection user, and detect touch operation band
The signal come, transmits a signal to touch controller;Touch controller receives touch information from touch detecting apparatus, and by it
It is converted into contact coordinate, then gives processor 110, and order that processor 110 is sent can be received and executed.In addition, can
To realize touch panel 1071 using multiple types such as resistance-type, condenser type, infrared ray and surface acoustic waves.In addition to touch panel
1071, user input unit 107 can also include other input equipments 1072.Specifically, other input equipments 1072 can wrap
It includes but is not limited in physical keyboard, function key (such as volume control button, switch key etc.), trace ball, mouse, operating lever etc.
It is one or more, do not limit herein specifically.
Further, touch panel 1071 can cover display panel 1061, when touch panel 1071 detect on it or
After neighbouring touch operation, processor 110 is sent to determine the type of touch event, is followed by subsequent processing device 110 according to touch thing
The type of part provides corresponding visual output on display panel 1061.Although in Fig. 1, touch panel 1071 and display panel
1061 be to realize the function that outputs and inputs of mobile terminal as two independent components, but in certain embodiments, can
The function that outputs and inputs of mobile terminal is realized so that touch panel 1071 and display panel 1061 is integrated, is not done herein specifically
It limits.
Interface unit 108 be used as at least one external device (ED) connect with mobile terminal 100 can by interface.For example,
External device (ED) may include wired or wireless headphone port, external power supply (or battery charger) port, wired or nothing
Line data port, memory card port, the port for connecting the device with identification module, audio input/output (I/O) end
Mouth, video i/o port, ear port etc..Interface unit 108 can be used for receiving the input from external device (ED) (for example, number
It is believed that breath, electric power etc.) and the input received is transferred to one or more elements in mobile terminal 100 or can be with
For the transmission data between mobile terminal 100 and external device (ED).
Memory 109 can be used for storing software program and various data.Memory 109 can include mainly storing program area
And storage data field, wherein storing program area can storage program area, application program (such as the sound needed at least one function
Sound playing function, image player function etc.) etc.;Storage data field can store according to mobile phone use created data (such as
Audio data, phone directory etc.) etc..In addition, memory 109 may include high-speed random access memory, can also include non-easy
The property lost memory, a for example, at least disk memory, flush memory device or other volatile solid-state parts.
Processor 110 is the control centre of mobile terminal, utilizes each of various interfaces and the entire mobile terminal of connection
A part by running or execute the software program and/or module that are stored in memory 109, and calls and is stored in storage
Data in device 109 execute the various functions and processing data of mobile terminal, to carry out integral monitoring to mobile terminal.Place
Reason device 110 may include one or more processing units;Preferably, processor 110 can integrate application processor and modulatedemodulate is mediated
Manage device, wherein the main processing operation system of application processor, user interface and application program etc., modem processor is main
Processing wireless communication.It is understood that above-mentioned modem processor can not also be integrated into processor 110.
Mobile terminal 100 can also include the power supply 111 (such as battery) powered to all parts, it is preferred that power supply 111
Can be logically contiguous by power-supply management system and processor 110, to realize management charging by power-supply management system, put
The functions such as electricity and power managed.
Although Fig. 1 is not shown, mobile terminal 100 can also be including bluetooth module etc., and details are not described herein.
Embodiment to facilitate the understanding of the present invention, below to the communications network system that is based on of mobile terminal of the present invention into
Row description.
Referring to Fig. 2, Fig. 2 is a kind of communications network system Organization Chart provided in an embodiment of the present invention, the communication network system
System is the LTE system of universal mobile communications technology, which includes communicating UE (User Equipment, the use of connection successively
Family equipment) (the lands Evolved UMTS Terrestrial RadioAccess Network, evolved UMTS 201, E-UTRAN
Ground wireless access network) 202, EPC (Evolved Packet Core, evolved packet-based core networks) 203 and operator IP operation
204。
Specifically, UE201 can be above-mentioned terminal 100, and details are not described herein again.
E-UTRAN202 includes eNodeB2021 and other eNodeB2022 etc..Wherein, eNodeB2021 can be by returning
Journey (backhaul) (such as X2 interface) is connect with other eNodeB2022, and eNodeB2021 is connected to EPC203,
ENodeB2021 can provide the access of UE201 to EPC203.
EPC203 may include MME (Mobility Management Entity, mobility management entity) 2031, HSS
(Home Subscriber Server, home subscriber server) 2032, other MME2033, SGW (Serving Gate Way,
Gateway) 2034, PGW (PDN Gate Way, grouped data network gateway) 2035 and PCRF (Policy and
Charging Rules Function, policy and rate functional entity) 2036 etc..Wherein, MME2031 be processing UE201 and
The control node of signaling, provides carrying and connection management between EPC203.HSS2032 is all to manage for providing some registers
Such as the function of home location register (not shown) etc, and some are preserved in relation to use such as service features, data rates
The dedicated information in family.All customer data can be sent by SGW2034, and PGW2035 can provide the IP of UE 201
Address is distributed and other functions, and PCRF2036 is strategy and the charging control strategic decision-making of business data flow and IP bearing resources
Point, it selects and provides available strategy and charging control decision with charge execution function unit (not shown) for strategy.
IP operation 204 may include internet, Intranet, IMS (IP Multimedia Subsystem, IP multimedia
System) or other IP operations etc..
Although above-mentioned be described by taking LTE system as an example, those skilled in the art it is to be understood that the present invention not only
Suitable for LTE system, be readily applicable to other wireless communication systems, such as GSM, CDMA2000, WCDMA, TD-SCDMA with
And the following new network system etc., it does not limit herein.
Based on above-mentioned mobile terminal hardware configuration and communications network system, each embodiment of the method for the present invention is proposed.
Embodiment one
Referring to Fig. 3, it illustrates a kind of OTG functions realization device provided in an embodiment of the present invention, which includes:
Receiving portion, for receiving first via input signal and the second tunnel input signal according to the reception mode of setting;
Turning part, for the first via input signal to be connected according to the corresponding conduction mode of the reception mode
First via output signal and the second tunnel output signal are obtained with the second tunnel input signal, the first via output signal is used for data
Transmission, second tunnel output signal is for providing electric energy.
It is worth noting that two-way input signal and two-way output signal are all differential signals.
Further, as shown in figure 4, the receiving portion specifically includes:First receiving port, the second receiving port are used
In reception first via input signal and the second tunnel input signal.
It is appreciated that the first receiving port of the receiving portion can be, but not limited to DP1, DN1 pin in Fig. 4;Institute
The second receiving port for stating receiving portion can be, but not limited to DP2, DN2 pin in Fig. 4.Implement in order to facilitate the present invention is introduced
Example, is DP1, DN1 pin with the first receiving port, and the second receiving port implements to be illustrated for DP2, DN2 pin
When, the first receiving port, the second receiving port can be the signal input part of USB interface.
Further, first receiving port is for receiving the first via input signal, second receiving port
For receiving second tunnel input signal;Or, first receiving port is for receiving second tunnel input signal, it is described
Second receiving port is for receiving the first via input signal.
It is appreciated that since prior art USB interface supports the positive insertion of external equipment and anti-plug to enter, so USB interface
The input signal and input port received can intersect.
Further, as shown in figure 5, the turning part specifically includes:First output port, it is defeated for exporting the first via
Go out signal;Second output terminal mouth, for exporting the second tunnel output signal.
First output port of the turning part can be, but not limited to DP1a, DN1a pin in Fig. 5;The conducting portion
The second output terminal mouth divided can be, but not limited to DP2a, DN2a pin in Fig. 5.The embodiment of the present invention is introduced for convenience, with
First output port be DP1a, DN1a pin, second output terminal mouth be DP2a, DN2a pin for illustrate.
Further, the realization device of the OTG functions includes:
With first receiving port for receiving the first via input signal, second receiving port is for receiving
Second tunnel input signal, it is corresponding,
First receiving port of the receiving portion is connected with first output port of the turning part;Institute
Second receiving port for stating receiving portion is connected with the second output terminal mouth of the turning part.
Referring to Fig. 6, it illustrates the hardware configurations of the realization device of OTG functions.It is to be appreciated that when specific implementation, it is unlimited
The hardware configuration of the realization device of OTG functions processed is design shown in Fig. 6.Due to DP1, DN1, DP2, DN2, DP1a, DN1a,
DP2a, DN2a are I/O mouthfuls, therefore receiving portion is not limited to right part in Fig. 6, and turning part is not limited to left part.
Introduce the embodiment of the present invention for convenience, using receiving portion as right part, turning part be left part for illustrate.
The realization device of OTG functions, DP1, DN1 pin can receive first via input signal, and DP2, DN2 pin can receive the second tunnel
The circuit connection of output signal, the realization device of OTG functions can be that DP1, DN1 as shown in Figure 7 connect DP1a, DN1a output the
Output signal all the way, DP2, DN2 connect DP2a, DN2a and export the second tunnel output signal, to realize first via input signal
It is conducted to the first output port from the first receiving port and exports first via output signal, the second tunnel input signal is received from second
Port is conducted to the effect that second output terminal mouth exports the second tunnel output signal.
Further, the realization device of the OTG functions includes:
With first receiving port for receiving second tunnel input signal, second receiving port is for receiving
The first via input signal, it is corresponding,
Second receiving port of the receiving portion is connected with first output port of the turning part;Institute
First receiving port for stating receiving portion is connected with the second output terminal mouth of the turning part.
It is appreciated that the realization device of OTG functions, DP1, DN1 pin can receive the second tunnel input signal, DP2, DN2
Pin can receive first via input signal, and the circuit connection of the realization device of OTG functions can be as shown in figure 8, DP1, DN1
DP2a, DN2a are connected, DP2, DN2 connect DP1a, DN1a, and first via input signal is connected from the second receiving port to realize
First via output signal is exported to the first output port, the second tunnel input signal is conducted to the second output from the first receiving port
Port exports the effect of the second tunnel output signal.
Further, the receiving portion further includes:First control port and the second control port, for receiving the first control
Signal processed and second control signal.
As shown in figure 4, wherein the first control port can be, but not limited to as the design of CC1 pins, the second control port can
With but be not limited to the designs of CC2 pins.It is herein CC1 with the first control port, the second control port is said for being CC2
It is bright.
Further, the receiving portion includes:
When the voltage value of first control port meets the first predeterminated voltage, determine that first receiving port receives
The first via input signal, second receiving port receive second tunnel input signal;
When the voltage value of second control port meets the first predeterminated voltage, determine that first receiving port receives
Second tunnel input signal, second receiving port receive the first via input signal.It is appreciated that when the electricity of CC1
When pressure meets the first predeterminated voltage, determine that DP1, DN1 receive first via input signal, DP2, DN2 receive the second tunnel input signal;
When the voltage of CC2 meets the first predeterminated voltage, DP2, DN2 receive first via input signal, and DP1, DN1 receive the input of the second tunnel
Signal.Preferably, the first predeterminated voltage can be 0.35V~0.45V.
Further, the turning part further includes:
First enable port and the second enable port, first enable port are used to provide voltage for data transmission;Institute
State output of second enable port for enabling the second tunnel output signal.
As shown in fig. 6, wherein the first enable port can be, but not limited to as the design of Vbus1a or Vbus1 pins, second
Control port can be, but not limited to as the design of Vbus2a or Vbus2 pins.It is herein Vbus1a with the first enable port, second
Control port illustrates for being Vbus2a.Vbus1a pins provide voltage for the transmission of data, Vbus2a pins enabled the
The output of two output signals.
Further, the turning part includes:
When the voltage of the first enable port meets the second predeterminated voltage, the first via output signal is exported.
Preferably, the second predeterminated voltage can be 5V.It is appreciated that when the output voltage of Vbus1a is 5V, output
DP1a, DN1a signal.
Further, the turning part includes:
When the voltage of the second enable port meets third predeterminated voltage, second tunnel output signal is exported.
Preferably, third predeterminated voltage is 4.2V~10V.It is appreciated that when the output voltage of Vbus2a is 4.2V~10V
When, export DP2a, DN2a signals.
Embodiment two
Based on the identical inventive concept of previous embodiment, referring to Fig. 9, the present embodiment provides a kind of OTG function realizing methods,
This method may include:
First via input signal and the second tunnel input signal are received according to the reception mode of setting;
The first via input signal and the input of the second tunnel is connected according to the corresponding conduction mode of the reception mode
Signal obtains first via output signal and the second tunnel output signal, and the first via output signal is used for data transmission, and described the
Two tunnel output signals are for providing electric energy.
In the above-mentioned technical solutions, the reception mode includes:
Positive receive is received with reversal connection;The positive reception includes the first receiving port reception first via input signal, and second
Receiving port receives second tunnel input signal;The reversal connection packet receiving includes the first receiving port and receives the second tunnel input letter
Number, the second receiving port receives the first via input signal.
In the above-mentioned technical solutions, the conduction mode includes:
Positive conducting is led to anti-ballistic;The positive conducting is just receiving corresponding, the anti-ballistic logical and reversal connection receipts phase with described
It is corresponding;The positive conducting includes that the input signal that the first receiving port receives is conducted to described in the first output port obtains
First via output signal, by the input signal that second receiving port receives be conducted to second output terminal mouth obtain it is described
Second tunnel output signal, it is described it is anti-ballistic it is logical include that the input signal that the first receiving port receives is conducted to second output terminal
Mouth obtains second tunnel output signal, and it is defeated that the input signal that second receiving port receives is conducted to described first
Exit port obtains the first via output signal.
In above-mentioned technical proposal, signal of the two-way input signal to two-way output signal in OTG function realization devices passes
Defeated to be introduced in embodiment one, this will not be repeated here.
It should be understood by those skilled in the art that, the embodiment of the present invention can be provided as method, system or computer program
Product.Therefore, the shape of hardware embodiment, software implementation or embodiment combining software and hardware aspects can be used in the present invention
Formula.Moreover, the present invention can be used can use storage in the computer that one or more wherein includes computer usable program code
The form for the computer program product implemented on medium (including but not limited to magnetic disk storage and optical memory etc.).
The present invention be with reference to according to the method for the embodiment of the present invention, the flow of equipment (system) and computer program product
Figure and/or block diagram describe.It should be understood that can be realized by computer program instructions every first-class in flowchart and/or the block diagram
The combination of flow and/or box in journey and/or box and flowchart and/or the block diagram.These computer programs can be provided
Instruct the processor of all-purpose computer, special purpose computer, Embedded Processor or other programmable data processing devices to produce
A raw machine so that the instruction executed by computer or the processor of other programmable data processing devices is generated for real
The device for the function of being specified in present one flow of flow chart or one box of multiple flows and/or block diagram or multiple boxes.
These computer program instructions, which may also be stored in, can guide computer or other programmable data processing devices with spy
Determine in the computer-readable memory that mode works so that instruction generation stored in the computer readable memory includes referring to
Enable the manufacture of device, the command device realize in one flow of flow chart or multiple flows and/or one box of 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 count
Series of operation steps are executed on calculation machine or other programmable devices to generate computer implemented processing, in computer or
The instruction executed on other programmable devices is provided for realizing in one flow of flow chart or multiple flows and/or block diagram one
The step of function of being specified in a box or multiple boxes.
The foregoing is only a preferred embodiment of the present invention, is not intended to limit the scope of the present invention.
Claims (14)
1. a kind of realization device of OTG functions, described device include:
Receiving portion, for receiving first via input signal and the second tunnel input signal according to the reception mode of setting;
Turning part, for the first via input signal and the to be connected according to the corresponding conduction mode of the reception mode
Two tunnel input signals obtain first via output signal and the second tunnel output signal, and the first via output signal is passed for data
Defeated, second tunnel output signal is for providing electric energy.
2. the realization device of OTG functions according to claim 1, which is characterized in that the receiving portion includes:
First receiving port, the second receiving port, for receiving first via input signal and the second tunnel input signal.
3. the realization device of OTG functions according to claim 1, which is characterized in that the turning part includes:
First output port, for exporting first via output signal;
Second output terminal mouth, for exporting the second tunnel output signal.
4. the realization device of OTG functions according to claim 1 or claim 2, which is characterized in that the receiving portion includes:It is described
First receiving port is for receiving the first via input signal, and second receiving port is for receiving the second tunnel input
Signal;Or, first receiving port is for receiving second tunnel input signal, second receiving port is for receiving institute
State first via input signal.
5. according to the realization device of the OTG functions of claim 3 or 4, which is characterized in that the realization device of the OTG functions
Including:
With first receiving port for receiving the first via input signal, second receiving port is described for receiving
Second tunnel input signal, it is corresponding,
First receiving port of the receiving portion is connected with first output port of the turning part, described to connect
Second receiving port of receiving portions is connected with the second output terminal mouth of the turning part.
6. the realization device of OTG functions according to claim 3 or 4, which is characterized in that the realization of the OTG functions fills
Set including:
With first receiving port for receiving second tunnel input signal, second receiving port is described for receiving
First via input signal, it is corresponding,
Second receiving port of the receiving portion is connected with first output port of the turning part, described to connect
First receiving port of receiving portions is connected with the second output terminal mouth of the turning part.
7. the realization device of OTG functions according to claim 1, which is characterized in that the receiving portion further includes:First
Control port and the second control port, for receiving first control signal and second control signal.
8. the realization device of the OTG functions according to claim 4 or 7, which is characterized in that the receiving portion includes:
When the voltage value of first control port meets the first predeterminated voltage, determine described in the first receiving port reception
First via input signal, second receiving port receive second tunnel input signal;
When the voltage value of second control port meets the first predeterminated voltage, determine described in the first receiving port reception
Second tunnel input signal, second receiving port receive the first via input signal.
9. the realization device of OTG functions according to claim 1, which is characterized in that the turning part further includes:
First enable port and the second enable port, first enable port are used to provide voltage for data transmission;Described
Two enable ports are used to enable the output of the second tunnel output signal.
10. the realization device of OTG functions according to claim 9, which is characterized in that the turning part includes:
When the voltage of the first enable port meets the second predeterminated voltage, the first via output signal is exported.
11. the realization device of OTG functions according to claim 9, which is characterized in that the turning part includes:
When the voltage of the second enable port meets third predeterminated voltage, second tunnel output signal is exported.
12. a kind of implementation method of OTG functions, the method includes:
First via input signal and the second tunnel input signal are received according to the reception mode of setting;
The first via input signal and the second tunnel input signal is connected according to the corresponding conduction mode of the reception mode
First via output signal and the second tunnel output signal are obtained, the first via output signal is used for data transmission, second tunnel
Output signal is for providing electric energy.
13. according to the method for claim 12, which is characterized in that the reception mode includes:
Positive receive is received with reversal connection;The positive reception includes that the first receiving port receives the first via input signal, and second receives
Port receives second tunnel input signal;The reversal connection packet receiving includes the first receiving port and receives second tunnel input signal,
Second receiving port receives the first via input signal.
14. according to the method for claim 13, which is characterized in that the conduction mode includes:
Positive conducting is led to anti-ballistic;The positive conducting and it is described just receiving it is corresponding, it is described anti-ballistic logical corresponding with reversal connection receipts;
The positive conducting includes that the input signal that the first receiving port receives is conducted to the first output port to obtain described first
The input signal that second receiving port receives is conducted to second output terminal mouth and obtains described second by road output signal
Road output signal, it is described it is anti-ballistic it is logical include that the input signal that the first receiving port receives is conducted to second output terminal mouth to obtain
To second tunnel output signal, the input signal that second receiving port receives is conducted to first output end
Mouth obtains the first via output signal.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810164895.0A CN108446246B (en) | 2018-02-27 | 2018-02-27 | Method and device for realizing OTG function |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201810164895.0A CN108446246B (en) | 2018-02-27 | 2018-02-27 | Method and device for realizing OTG function |
Publications (2)
Publication Number | Publication Date |
---|---|
CN108446246A true CN108446246A (en) | 2018-08-24 |
CN108446246B CN108446246B (en) | 2021-09-21 |
Family
ID=63192770
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201810164895.0A Active CN108446246B (en) | 2018-02-27 | 2018-02-27 | Method and device for realizing OTG function |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN108446246B (en) |
Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186483A (en) * | 2011-12-27 | 2013-07-03 | 比亚迪股份有限公司 | Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same |
KR20150069659A (en) * | 2013-12-16 | 2015-06-24 | (주)아이티헬스 | Usb gender |
CN205355480U (en) * | 2015-11-11 | 2016-06-29 | 北京最初构想科技有限公司 | Single adapter and T head and H head thereof |
CN205429372U (en) * | 2016-03-14 | 2016-08-03 | 重庆蓝岸通讯技术有限公司 | Two -way USB charging wire |
CN106021150A (en) * | 2016-04-29 | 2016-10-12 | 青岛海信电器股份有限公司 | Type-C interface equipment, communication system and communication method |
CN106571657A (en) * | 2016-09-28 | 2017-04-19 | 上海创功通讯技术有限公司 | Terminal, converter and connection conversion system and method |
CN206878506U (en) * | 2017-05-27 | 2018-01-12 | 维沃移动通信有限公司 | A kind of data wire and adapter |
CN107643998A (en) * | 2017-09-07 | 2018-01-30 | 上海移远通信技术股份有限公司 | OTG and the difunctional system that charges are realized based on intelligent object |
-
2018
- 2018-02-27 CN CN201810164895.0A patent/CN108446246B/en active Active
Patent Citations (8)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN103186483A (en) * | 2011-12-27 | 2013-07-03 | 比亚迪股份有限公司 | Terminal, and OTG (On-The-Go) function-charging function paralleled execution method used for same |
KR20150069659A (en) * | 2013-12-16 | 2015-06-24 | (주)아이티헬스 | Usb gender |
CN205355480U (en) * | 2015-11-11 | 2016-06-29 | 北京最初构想科技有限公司 | Single adapter and T head and H head thereof |
CN205429372U (en) * | 2016-03-14 | 2016-08-03 | 重庆蓝岸通讯技术有限公司 | Two -way USB charging wire |
CN106021150A (en) * | 2016-04-29 | 2016-10-12 | 青岛海信电器股份有限公司 | Type-C interface equipment, communication system and communication method |
CN106571657A (en) * | 2016-09-28 | 2017-04-19 | 上海创功通讯技术有限公司 | Terminal, converter and connection conversion system and method |
CN206878506U (en) * | 2017-05-27 | 2018-01-12 | 维沃移动通信有限公司 | A kind of data wire and adapter |
CN107643998A (en) * | 2017-09-07 | 2018-01-30 | 上海移远通信技术股份有限公司 | OTG and the difunctional system that charges are realized based on intelligent object |
Also Published As
Publication number | Publication date |
---|---|
CN108446246B (en) | 2021-09-21 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN108052302A (en) | Association display methods, terminal and the computer readable storage medium of double-sided screen | |
CN107463481A (en) | Data interactive method, mobile terminal and storage medium | |
CN107181700A (en) | Control method, mobile terminal and the storage medium of application program for mobile terminal | |
CN109739602A (en) | A kind of mobile terminal wallpaper setting method and device, mobile terminal and storage medium | |
CN109769067A (en) | Terminal screen method for handover control, terminal and computer readable storage medium | |
CN109538538A (en) | A kind of processing method of fan noise, mobile terminal and storage medium | |
CN109901980A (en) | Serial ports log grabs circuit, method, terminal and computer readable storage medium | |
CN107423065A (en) | Method, mobile terminal and the computer-readable recording medium that a kind of application is attended to anything else | |
CN110198173A (en) | A kind of adjusting method of mobile terminal, radio circuit, mobile terminal and storage medium | |
CN109445660A (en) | A kind of wearable device control method, mobile terminal and wearable device | |
CN108540697A (en) | It is double before and after one kind to take the photograph circuit structure and its mobile terminal | |
CN108449736A (en) | A kind of data transmission method, terminal and computer readable storage medium | |
CN107809527A (en) | A kind of method and apparatus that prompt operation is presented | |
CN107390855A (en) | Control method, mobile terminal and the storage medium of mobile terminal split screen regional luminance | |
CN107273006A (en) | A kind of method for information display, equipment and computer-readable recording medium | |
CN107396226B (en) | A kind of earphone compatible circuit, mobile terminal and electronic system | |
CN109684020A (en) | A kind of method for switching theme, equipment and computer readable storage medium | |
CN109660907A (en) | Reducing fan noise processing method, terminal, intelligent sound box and readable storage medium | |
CN109358796A (en) | A kind of game visual field sharing method, terminal and readable storage medium storing program for executing | |
CN108429957A (en) | TypeC earphones switching cable and wired earphone TypeC connection systems | |
CN108833132A (en) | log acquisition control method, terminal and computer readable storage medium | |
CN107846566A (en) | A kind of information processing method, equipment and computer-readable recording medium | |
CN107566607A (en) | One kind notice display methods, mobile terminal and computer-readable recording medium | |
CN108574324A (en) | A kind of method for managing power supply, wearable device and storage medium | |
CN108965514A (en) | A kind of the display screen FPC structure and its mobile terminal of double screen terminal |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |