CN103473202A - USB OTG device, electronic unit and OTG function implementation method - Google Patents

USB OTG device, electronic unit and OTG function implementation method Download PDF

Info

Publication number
CN103473202A
CN103473202A CN2013103964254A CN201310396425A CN103473202A CN 103473202 A CN103473202 A CN 103473202A CN 2013103964254 A CN2013103964254 A CN 2013103964254A CN 201310396425 A CN201310396425 A CN 201310396425A CN 103473202 A CN103473202 A CN 103473202A
Authority
CN
China
Prior art keywords
usb
otg
module
function
electronic equipment
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Granted
Application number
CN2013103964254A
Other languages
Chinese (zh)
Other versions
CN103473202B (en
Inventor
林双凤
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Ruijie Networks Co Ltd
Original Assignee
Fujian Star Net Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Fujian Star Net Communication Co Ltd filed Critical Fujian Star Net Communication Co Ltd
Priority to CN201310396425.4A priority Critical patent/CN103473202B/en
Publication of CN103473202A publication Critical patent/CN103473202A/en
Application granted granted Critical
Publication of CN103473202B publication Critical patent/CN103473202B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention provides a USB OTG device, an electronic unit and an OTG function implementation method. The USB OTG device comprises a USB host module, an OTG module, a USB peripheral module and a USB controller drive module which is independent of the USB host module, the OTG module and the USB peripheral module. The USB master module is used for providing function support for an OTG function at a USB host. The USB peripheral module is used for providing function support for the OTG function at a USB peripheral. The OTG module is used for implementing the OTG function on the basis of function support for the USB host module and the USB peripheral module. The USB controller drive module is used for providing controller drive to implement the OTG function. The technical scheme has the advantages that the OTG function can be more correctable and implementation of the OTG function on different USB controllers is easier.

Description

USB OTG device, electronic equipment and realize the method for OTG function
Technical field
The present invention relates to the communication technology, relate in particular to a kind of USB OTG device, electronic equipment and realize the method for OTG function.
Background technology
USB (universal serial bus) (Universal Serial Bus, be called for short USB) be a kind of general-purpose interface of exchanges data, (the Universal Serial Bus Implementers Forums of USB (universal serial bus) application person forum, be called for short USB IF) developed USB OTG(On-The-Go) standard, USB OTG standard is that of USB2.0 standard supplements, an OTG product is a portable set, use single two role's sockets (Mini-AB socket or Micro-AB socket are not other USB socket).When the equipment of support OTG is connected with generic USB equipment, support the equipment of OTG as main frame, generic USB equipment is as peripheral hardware, and two equipment of supporting OTG are while being connected, by the plug (A-plug and B-plug) at USB connecting line two ends, distinguish default main frame (A-equipment, the equipment of the support OTG be connected with the A-plug) and default peripheral hardware (B-equipment, the equipment of the support OTG be connected with the B-plug), can also pass through main frame exchange agreement (Host Negotiation Protocol between A-equipment and B-equipment, abbreviation HNP) realize the role switching of main frame and peripheral hardware, the OTG agreement allows the arbitrarily conversion between usb host and USB peripheral hardware role of lower floor's driven unit, do not need to change the cable physical location.
Prior art is generally to support the software of the equipment of OTG to be divided into the usb host stack, the OTG driver module, three, USB peripheral hardware stack is large module independently, the usb host stack, the OTG driver module, the all functions of USB peripheral hardware stack all are based upon on the basis of USB controller, the USB controller refers to hardware control, for the usb host stack, the OTG driver module, USB peripheral hardware stack provides hardware supported, and when different USB controllers increase the support of OTG function, need the usb host controller driver module in the usb host stack, USB peripheral control unit driver module and OTG driver module in USB peripheral hardware stack are revised respectively.
Yet prior art exists the alterability of OTG function less, and then increased the complexity that realizes the OTG function on different USB controllers.
Summary of the invention
The invention provides a kind of USB OTG device, electronic equipment and realize the method for OTG function, in order to increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
First aspect of the present invention is to provide a kind of USB OTG device, comprising: general-purpose serial bus USB host module, OTG module, USB peripheral module and the USB controller driver module independently arranged with respect to described usb host module, described OTG module and described USB peripheral module;
Described usb host module, be used to the OTG function that the function support of usb host end is provided;
Described USB peripheral module, be used to the OTG function that the function support of USB peripheral hardware end is provided;
Described OTG module, the function support for based on described usb host module and described USB peripheral module, realize the OTG function;
Described USB controller driver module, be used to and realize that the OTG function provides controller to drive.
Another aspect of the present invention is to provide a kind of electronic equipment, comprises USB OTG device as above and general-purpose serial bus USB controller.
Another aspect of the present invention is to provide a kind of method of the OTG of realization function, is applicable to electronic equipment as above, comprising:
Determine the configuration file of realizing the OTG function on described USB controller according to the configuration information of general-purpose serial bus USB controller;
According to described configuration file revision USB controller driver module.
Technique effect of the present invention is: USB OTG module of the present invention comprises: usb host module, OTG module, USB peripheral module and the USB controller driver module independently arranged with respect to usb host module, OTG module and USB peripheral module, wherein, the usb host module, be used to the OTG function that the function support of usb host end is provided; The USB peripheral module, be used to the OTG function that the function support of USB peripheral hardware end is provided; The OTG module, the function support for based on usb host module and USB peripheral module, realize the OTG function; USB controller driver module, be used to and realize that the OTG function provides controller to drive, the Module Division based on USB OTG device of the present invention, independently arrange USB controller driver module, can increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
The accompanying drawing explanation
The structural representation of the embodiment that Fig. 1 is USB OTG device provided by the invention;
Fig. 2 supports the driver stack configuration schematic diagram of the equipment of OTG in prior art;
The structural representation of USB controller driver module in the embodiment that Fig. 3 is USB OTG device provided by the invention;
The structural representation of the embodiment that Fig. 4 is electronic installation provided by the invention;
The structural representation of the embodiment that Fig. 5 is the method that realizes the OTG function provided by the invention.
Embodiment
For the purpose, technical scheme and the advantage that make the embodiment of the present invention clearer, below in conjunction with the accompanying drawing in the embodiment of the present invention, technical scheme in the embodiment of the present invention is clearly and completely described, obviously, described embodiment is the present invention's part embodiment, rather than whole embodiment.Embodiment based in the present invention, those of ordinary skills, not making under the creative work prerequisite the every other embodiment obtained, belong to the scope of protection of the invention.
The structural representation of the embodiment that Fig. 1 is USB OTG device provided by the invention, as shown in Figure 1, the USB OTG device 100 of the present embodiment comprises: usb host module 110, OTG module 120, USB peripheral module 130 and the USB controller driver module 140 independently arranged with respect to usb host module 110, OTG module 120 and USB peripheral module 130, wherein, usb host module 110, be used to the OTG function that the function support of usb host end is provided; USB peripheral module 130, be used to the OTG function that the function support of USB peripheral hardware end is provided; OTG module 120, the function support for based on usb host module 110 and USB peripheral module 130, realize the OTG function; USB controller driver module 140, be used to and realize that the OTG function provides controller to drive.
Further, the USB OTG device 100 of the present embodiment also comprises: OTG equipment application module 150, and usb host module 110 and/or USB peripheral module 130, the application that also is used to OTG equipment application module 150 to realize provides the agreement support.
Specifically, as shown in Figure 1, the line with arrow in figure means dependence to the relation between above-mentioned module.
Usb host module 110 is mainly used in providing for the OTG function function support of usb host end, usb host module 110 is upper layer software (applications) functions of USB controller, usb host module 110 can communicate with USB peripheral module 130, and the application that will realize for OTG equipment application module 150 provides the agreement support, usb host module 110 can comprise that the USB peripheral hardware of host side drives and USB core (USB Core), the USB peripheral hardware drives for controlling the USB peripheral hardware and how to communicate by letter with usb host, the USB peripheral hardware drives has different drivings according to different application, mouse-driven such as the USB mouth, keyboard drive, sound equipment driving etc., what the present embodiment was realized is the driving of mass memory (mass storage) function, to the support of mass storage, host side has its supporting driving code to different USB peripheral hardwares, it is exactly for realizing these codes that the USB peripheral hardware of usb host end drives, USB Core is responsible for the groundwork of USB driven management and protocol processes, the USB core upwards can be the driving of USB peripheral hardware DLL (dynamic link library) is provided, can be the usb host controller driving downwards DLL (dynamic link library) is provided, it can safeguard by global variable the USB peripheral hardware information of whole system, thus the drivings such as the hot plug control of finishing equipment and bus data transmission control.
USB peripheral module 130, be used to the OTG function that the function support of USB peripheral hardware end is provided, the USB peripheral hardware is also the upper layer software (applications) function of USB controller, can communicate with usb host module 110, and the application that will realize for OTG equipment application module 150 provides the agreement support.
OTG module 120 is also the upper layer software (applications) function of USB controller, depends on usb host module 110 and USB peripheral module 130, completes the role switching between main frame and peripheral hardware, realizes that two equipment can access mutually the other side's flash space.
OTG equipment application in OTG equipment application module 150 refers to the application to the USB function, and what the present embodiment was realized is large capacity storage, mainly carries out the flash spatial operations such as transmission operation of file.
USB controller driver module 140 mainly completes the USB controller and drives function, has comprised that electronic equipment drives function, electronic equipment to drive function and the OTG driving function to the USB controller as the controller of USB peripheral hardware as the controller of usb host.
Specifically, the USB OTG device 100 of the present embodiment can realize that embedded switch and router both can be used as the function that usb host also can be used as the USB peripheral hardware by a USB controller, the complexity and the equipment cost that to reduce hardware, realize.
The driver stack configuration schematic diagram that Fig. 2 is the equipment of OTG during prior art is supported, as shown in Figure 2, prior art is generally to support the software of the equipment of OTG to be divided into the usb host stack, the OTG driver module, three, USB peripheral hardware stack is large module independently, and when different USB controllers increase the support of OTG function, need the usb host controller driver module in the usb host stack, USB peripheral control unit driver module and OTG driver module in USB peripheral hardware stack are revised respectively, because the usb host controller driver module is arranged in the usb host stack, USB peripheral control unit driver module is arranged in USB peripheral hardware stack, and in the usb host stack except the usb host controller driver module, also comprise target peripheral hosts class driver module and USB nucleus module, also comprise USB peripheral hardware class driver module and USB peripheral hardware class interface module in USB peripheral hardware stack except USB peripheral control unit driver module, the software module degree of coupling in usb host stack and USB peripheral hardware stack is higher, when being revised, usb host controller driver module, USB peripheral control unit driver module and OTG driver module can relate to interface docking and interface interchange with other software modules, cause the alterability of OTG function lower, and then increased the complexity that realizes the OTG function on different USB controllers.
The present embodiment is by the Module Division to USB OTG device 100, by the independent setting of USB controller driver module 140, when different USB controllers increase the support of OTG function, usb host module 110, USB peripheral module 130, OTG module 120 basic modules such as grade do not need to do revision, only need to do revision to USB controller driver module 140, avoid prior art to drive usb host controller, the driving of USB peripheral control unit and OTG drive while being revised and dock and interface interchange with the interface of other software modules, can increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
The structural representation of USB controller driver module in the embodiment that Fig. 3 is USB OTG device provided by the invention, as shown in Figure 3, USB controller driver module 140 can comprise: usb host controller driver element 141, USB peripheral control unit driver element 143 and OTG driver element 142.
Usb host controller driver module 140 mainly refers to the software-driven layer to the USB controller, there is different drive softwares for different USB controllers, when the different USB controller of every money increases the support of OTG function, all need its corresponding USB controller is driven into to the line correlation revision.It is the alterability of the OTG function being supported in order to increase that this module is independently arranged, and the basic modules such as usb host module, USB peripheral module, OTG module do not need to do revision, only need to do revision to USB controller driver module 140.
Specifically, USB peripheral hardware is wherein inserted in 141 major controls of usb host controller driver element, usb host controller driver element 141 need to be registered in the platform driving, by platform, drives to control the message transmission of electronic equipment as usb host.The direct access hardware of usb host controller driver element 141, control the bottom communication between usb host and USB peripheral hardware.
USB peripheral control unit driver element 143 is for direct access hardware, control the bottom communication between USB peripheral hardware and usb host, the call back function of hardware-related operation is provided to upper strata, is the hardware-related driving of one deck on the USB controller, the main processing operation relevant with hardware.
The main access process realized the OTG functional hardware of OTG driver element 142, to register directly access, read-write operation, comprise the operations such as command register, status register, interrupt register, device address register, port register, controller register, mode register, thereby realize the control to USB2.0 Transceiver Macrocell Interface+low pin count interface (USB2.0Transceiver Macrocell Interface+low-pin count interface is called for short ULPI) PHY chip; Need to realize the initialization of OTG transceiver function, arranging of master-slave swap, main frame, peripheral hardware role etc. is mainly to realize by the OTG transceiver; In realizing that the OTG function register drives to platform.OTG driver element 142 is mainly realized the function of OTG, realizes the two role functions of USB of equipment, can carry out principal and subordinate's role switching, realizes the hardware initialization of ULPI PHY transceiving chip and the accessing operation of hardware register; Otg standard standard the inside has the state variation of couple OTG to do strict regulations, so the function of OTG realizes, and the OTG state machine is independent as independent submodule, OTG driver element 142 is mainly the correlation functions such as the HNP that realizes OTG of the realization by otg controller is driven, session request protocol (Session Request Protocol, SRP).
In the USB OTG device that the present embodiment provides, with respect to the usb host module, the USB controller driver module 140 that OTG module and USB peripheral module independently arrange can comprise: usb host controller driver element 141, USB peripheral control unit driver element 143 and OTG driver element 142, when different USB controllers increase the support of OTG function, the usb host module, the USB peripheral module, the basic modules such as OTG module do not need to do revision, only need to do revision to USB controller driver module 140, avoid prior art to drive usb host controller, the driving of USB peripheral control unit and OTG drive while being revised and dock and interface interchange with the interface of other software modules, can increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
The structural representation of the embodiment that Fig. 4 is electronic equipment provided by the invention, as shown in Figure 4, the electronic equipment 200 of the present embodiment can comprise USB OTG device 100 and USB controller 300 as shown in Figure 1.
Specifically, the control function of USB OTG device 100 and USB controller 300, can make electronic equipment 200 in correct mode of operation (A-equipment mode: the default mode of operation as usb host; Or B-equipment mode: the default mode of operation as the USB peripheral hardware), and guarantee that electronic equipment 200 can send or receive data to the USB connecting line.
USB controller 300 refers to hardware control, and all functions of usb host module, USB peripheral module, OTG module are all to be based upon on the basis of USB controller 300, by USB controller 300, carry out the message transmission.In order to realize the OTG function on electronic equipment 200, USB controller 300 needs to increase peripheral PHY transceiving chip, i.e. a ULPI PHY transceiving chip.Electronic equipment 200 communicates by USB connector and external unit simultaneously, as the OTG connector, need to increase an ID pin, and electronic equipment 200 judges as main frame or peripheral hardware by the ID pin.ID pin ground connection in the A-plug, the ID pin in the B plug is floating empty.When supporting that the ID pin of ground connection is arrived in the OTG equipment Inspection, connecting the A plug, what mean acquiescence is A equipment (main frame); And the equipment that the ID pin is floating detected, and connecting the B plug, think B-equipment (peripheral hardware).Once, after system connects, support that the role of the equipment of OTG can also be changed by HNP.
Alternatively, the electronic equipment 200 of the present embodiment can be switch or router.
The switch of prior art, router device are mainly supported standard USB interface, can only, as usb host, can connect the USB peripheral hardware.
This enforcement can be supported USB OTG function on switch and router, copying into and copying out the storage information of more convenient switch, router, can support with other product direct communication of OTG, such as mobile phone, printer, camera, DVD etc., two switches also can directly be connected by the OTG connecting line with router, and after realizing principal and subordinate role, switch, router device can be accessed by the OTG connecting line flash space of these equipment, and miscellaneous equipment also can pass through the flash space of OTG connecting line access switch, router device.
The present embodiment realizes supporting the OTG function in switch, router by USB OTG device 100 and USB controller 300, make switch, router device both can be used as usb host and also can be used as the USB peripheral hardware, and do not need to change and just can realize principal and subordinate's role switching function by cable.
It should be noted that, the electronic equipment 200 of the present embodiment is except can be that switch, router etc. are not also supported the embedded device of OTG function in prior art, can also be the equipment of OTG function of having supported in the prior art, those have been supported in the prior art the equipment of OTG function also can simulate this programme and have adopted a USB controller, and using all drivings relevant with controller as a module independently, the independence of software revision while facilitating controller to change.
USB OTG device 100 in the electronic equipment 200 of the present embodiment can realize that electronic equipment 200 both can be used as the function that usb host also can be used as the USB peripheral hardware by a USB controller, the complexity and the equipment cost that to reduce hardware, realize.
Further, the electronic equipment 200 of the present embodiment can also comprise power supply, and power supply is electronic equipment 200 power supplies while being used for electronic equipment 200 as the USB peripheral hardware.
Further, when the electronic equipment 200 of the present embodiment and generic USB equipment connection, can be used as usb host;
The electronic equipment 200 of the present embodiment when supporting the equipment connection of OTG function, is realized the role switching of usb host and USB peripheral hardware with the equipment of supporting the OTG function by the main frame exchange agreement.
Specifically, in the first of the electronic equipment 200 of the present embodiment in possible application scenarios, electronic equipment 200 and PC (the Personal Computer of the present embodiment, be called for short PC) connect, electronic equipment 200 is as the USB peripheral hardware, in this application, PC equipment is the standard usb host, electronic equipment 200 is taken as the USB peripheral hardware, self provide power supply by the USB peripheral hardware, the cpu system that is the USB peripheral hardware has moved, like this can be on PC the flash space of direct control electronic equipment 200, this operation that will greatly facilitate flash, this electronic equipment 200 of for example will upgrading, can directly copy corresponding bin file to equipment, then restart this electronic equipment 200 of operation, can reach the effect of upgrading.
Electronic equipment 200 in the present embodiment is realized the OTG function by the mode of self-powered employing self power supply during as the USB peripheral hardware, and equipment itself will first move, rather than powers by usb host.
Be understandable that, at another kind in possible implementation, the electronic equipment 200 in the present embodiment itself does not need power supply during as the USB peripheral hardware, and directly from usb host, brings in and obtain power supply.
At the second of the electronic equipment 200 of the present embodiment in possible application scenarios, by the electronic equipment of the present embodiment 200, during with the generic USB equipment connection, electronic equipment 200 can be used as usb host.
In the third possible application scenarios of the electronic equipment 200 of the present embodiment, the electronic equipment 200 of the present embodiment can carry out principal and subordinate's role switching, two electronic equipments 200 directly connect to Micro B connector by the Micro A that supports the OTG function, under default situations, connecting the A-equipment of Micro A plug as usb host, another B-equipment that is connecting Micro B plug is as the USB peripheral hardware, A-equipment is as usb host, so the flash space that the user can direct control B-equipment; B-equipment is that the USB peripheral hardware also can pass through the HNP agreement simultaneously, applies for usb host, and A-equipment has become the USB peripheral hardware in logic, and at this moment the user can pass through the flash space of B-equipment operating A-equipment.This application scenarios can reach two electronic equipments 200 flash space of access the other side mutually.
Two electronic equipments 200 are all OTG equipment, support symmetry operation.Because two OTG devices interconnect, when the user operates an OTG equipment, the user can access or control second OTG equipment by the application that runs on first OTG equipment.When first OTG equipment is being used bus, if the user is emitted in an application of second OTG equipment, whether second OTG device prompts user can stop current operation so.If the user allows, current operation is terminated so, and second OTG equipment obtains interface control right.
The electronic equipment 200 that the present embodiment provides, can comprise USB OTG device 100 and USB controller 300 as shown in Figure 1, when different USB controllers increase the support of OTG function, the usb host module, the USB peripheral module, the basic modules such as OTG module do not need to do revision, only need to do revision to USB controller driver module, avoid prior art to drive usb host controller, the driving of USB peripheral control unit and OTG drive while being revised and dock and interface interchange with the interface of other software modules, can increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
The structural representation of the embodiment that Fig. 5 is the method that realizes the OTG function provided by the invention, as shown in Figure 5, the method that realizes the OTG function of the present embodiment, be applicable to electronic equipment as shown in Figure 4, and the method can comprise:
S501, determine the configuration file of realizing the OTG function on the USB controller according to the configuration information of USB controller.
Specifically, realize the OTG function on the USB of dissimilar electronic equipment controller, drive required configuration file difference, so realize at first will determining the configuration file of realizing the OTG function on this USB controller according to the configuration information of the USB controller in electronic equipment before the OTG function on electronic equipment.
S502, according to configuration file revision USB controller driver module.
USB controller driver module in the present embodiment is independently to arrange with respect to usb host module, OTG module and USB peripheral module, so only need revise the driving that can complete the USB controller to the USB controller driver module in the USB OTG device of electronic equipment while realizing the OTG function on electronic equipment, the basic modules such as usb host module, OTG module and USB peripheral module do not need to do revision.
The method that realizes the OTG function that the present embodiment provides, determine the configuration file of realizing the OTG function on the USB controller by the configuration information according to the USB controller, again according to configuration file revision USB controller driver module, while avoiding prior art to be revised usb host controller driving, the driving of USB peripheral control unit and OTG driving, with the interface of other software modules, dock and interface interchange, can increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
Further, S502 can comprise: according to usb host controller driver element, OTG driver element and the USB peripheral control unit driver element in configuration file revision USB controller driver module.
Further, the method also comprises: by electronic equipment and generic USB equipment connection, so that electronic equipment is as usb host; Perhaps,
By electronic equipment and the equipment connection of supporting the OTG function, so that the equipment of electronic equipment and support OTG function is realized the role switching of usb host and USB peripheral hardware by the main frame exchange agreement.
The method that realizes the OTG function that the present embodiment provides, determine the configuration file of realizing the OTG function on the USB controller by the configuration information according to the USB controller, again according to the usb host controller driver element in configuration file revision USB controller driver module, OTG driver element and USB peripheral control unit driver element, avoid prior art to drive usb host controller, the driving of USB peripheral control unit and OTG drive while being revised and dock and interface interchange with the interface of other software modules, can increase the alterability of OTG function, be reduced in the complexity that realizes the OTG function on different USB controllers.
It should be noted that, structural representation corresponding to the various embodiments described above is only a kind of signal, and the annexation of each several part or module is not limited to the form shown in figure, can be as the criterion with the situation in practical application.
In several embodiment provided by the present invention, should be understood that disclosed apparatus and method can realize by another way.For example, device embodiment described above is only schematic, for example, the division of described unit, be only that a kind of logic function is divided, during actual the realization, other dividing mode can be arranged, for example a plurality of unit or assembly can in conjunction with or can be integrated into another system, or some features can ignore, or do not carry out.Another point, shown or discussed coupling each other or direct-coupling or communication connection can be by some interfaces, indirect coupling or the communication connection of device or unit can be electrically, machinery or other form.
The described unit as the separating component explanation can or can not be also physically to separate, and the parts that show as unit can be or can not be also physical locations, can be positioned at a place, or also can be distributed on a plurality of network element.Can select according to the actual needs some or all of unit wherein to realize the purpose of the present embodiment scheme.
In addition, each functional unit in each embodiment of the present invention can be integrated in a processing unit, can be also that the independent physics of unit exists, and also can be integrated in a unit two or more unit.Above-mentioned integrated unit both can adopt the form of hardware to realize, the form that also can adopt hardware to add SFU software functional unit realizes.
The integrated unit that the above-mentioned form with SFU software functional unit realizes, can be stored in a computer read/write memory medium.Above-mentioned SFU software functional unit is stored in a storage medium, comprise that some instructions are with so that a computer equipment (can be personal computer, server, or the network equipment etc.) or processor (processor) carry out the part steps of the described method of each embodiment of the present invention.And aforesaid storage medium comprises: various media that can be program code stored such as USB flash disk, portable hard drive, ROM (read-only memory) (Read-Only Memory, ROM), random access memory (Random Access Memory, RAM), magnetic disc or CDs.
Those skilled in the art can be well understood to, for convenience and simplicity of description, only the division with above-mentioned each functional module is illustrated, in practical application, can above-mentioned functions be distributed and completed by different functional modules as required, the inner structure that is about to device is divided into different functional modules, to complete all or part of function described above.The specific works process of the device of foregoing description, can, with reference to the corresponding process in preceding method embodiment, not repeat them here.
Finally it should be noted that: above each embodiment, only in order to technical scheme of the present invention to be described, is not intended to limit; Although with reference to aforementioned each embodiment, the present invention is had been described in detail, those of ordinary skill in the art is to be understood that: its technical scheme that still can put down in writing aforementioned each embodiment is modified, or some or all of technical characterictic wherein is equal to replacement; And these modifications or replacement do not make the essence of appropriate technical solution break away from the scope of various embodiments of the present invention technical scheme.

Claims (10)

1. a USB OTG device, it is characterized in that, comprising: general-purpose serial bus USB host module, OTG module, USB peripheral module and the USB controller driver module independently arranged with respect to described usb host module, described OTG module and described USB peripheral module;
Described usb host module, be used to the OTG function that the function support of usb host end is provided;
Described USB peripheral module, be used to the OTG function that the function support of USB peripheral hardware end is provided;
Described OTG module, the function support for based on described usb host module and described USB peripheral module, realize the OTG function;
Described USB controller driver module, be used to and realize that the OTG function provides controller to drive.
2. USB OTG device according to claim 1, is characterized in that, described USB controller driver module comprises: usb host controller driver element, USB peripheral control unit driver element and OTG driver element;
Described usb host controller driver element, be used to the usb host end function realized in the OTG function to provide controller to drive;
Described USB peripheral control unit driver element, be used to the USB peripheral hardware end function realized in the OTG function to provide controller to drive;
Described OTG driver element, be used to and realize that in the OTG function, the function except described usb host end function and USB peripheral hardware end function provides controller to drive.
3. USB OTG device according to claim 1, is characterized in that, described USB OTG device also comprises: OTG equipment application module;
Described usb host module and/or described USB peripheral module, the application that also is used to described OTG equipment application module to realize provides the agreement support.
4. an electronic equipment, is characterized in that, comprises as the described USB OTG device of any one in claim 1-3 and general-purpose serial bus USB controller.
5. electronic equipment according to claim 4, is characterized in that, described electronic equipment is switch or router.
6. according to the described electronic equipment of claim 4 or 5, it is characterized in that, described electronic equipment also comprises power supply, and described power supply is described power electronic equipment while being used for described electronic equipment as the USB peripheral hardware.
7. electronic equipment according to claim 6, is characterized in that, when described electronic equipment and generic USB equipment connection, as usb host;
Described electronic equipment when supporting the equipment connection of OTG function, is realized the role switching of usb host and USB peripheral hardware with the equipment of described support OTG function by the main frame exchange agreement.
8. a method that realizes the OTG function, be applicable to, as the described electronic equipment of claim 4-7 any one, it is characterized in that, comprising:
Determine the configuration file of realizing the OTG function on described USB controller according to the configuration information of general-purpose serial bus USB controller;
According to described configuration file revision USB controller driver module.
9. method according to claim 8, is characterized in that, described according to described configuration file revision USB controller driver module, comprising:
Revise usb host controller driver element, OTG driver element and the USB peripheral control unit driver element in described USB controller driver module according to described configuration file.
10. method according to claim 8 or claim 9, is characterized in that, also comprises:
By described electronic equipment and generic USB equipment connection, so that described electronic equipment is as usb host; Perhaps,
By described electronic equipment and the equipment connection of supporting the OTG function, so that the equipment of described electronic equipment and described support OTG function is realized the role switching of usb host and USB peripheral hardware by the main frame exchange agreement.
CN201310396425.4A 2013-09-03 2013-09-03 USB OTG, electronic equipment and the method realizing OTG function Active CN103473202B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201310396425.4A CN103473202B (en) 2013-09-03 2013-09-03 USB OTG, electronic equipment and the method realizing OTG function

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201310396425.4A CN103473202B (en) 2013-09-03 2013-09-03 USB OTG, electronic equipment and the method realizing OTG function

Publications (2)

Publication Number Publication Date
CN103473202A true CN103473202A (en) 2013-12-25
CN103473202B CN103473202B (en) 2016-07-27

Family

ID=49798061

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201310396425.4A Active CN103473202B (en) 2013-09-03 2013-09-03 USB OTG, electronic equipment and the method realizing OTG function

Country Status (1)

Country Link
CN (1) CN103473202B (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105159848A (en) * 2015-07-07 2015-12-16 江苏惠通集团有限责任公司 USB device control method, apparatus and system
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
CN105808480A (en) * 2016-03-01 2016-07-27 联发科技(新加坡)私人有限公司 Role switching method and system of USB (Universal Serial Bus) OTG (On-The-Go) equipment, and USB OTG equipment
CN106502911A (en) * 2016-11-09 2017-03-15 珠海全志科技股份有限公司 Multiple terminals access device
CN106686115A (en) * 2017-01-19 2017-05-17 上海数果科技有限公司 High-safety high-efficiency mobile terminal data inter-transmission system based on USB (universal serial bus) interface
US10122576B2 (en) 2015-03-17 2018-11-06 Microsoft Technology Licensing, Llc Intelligent role selection for dual-role devices
CN109408418A (en) * 2017-08-17 2019-03-01 深圳市中兴微电子技术有限公司 A kind of USB mode switching device and method, USB device
CN111061665A (en) * 2019-12-05 2020-04-24 深圳票联金融服务有限公司 Interface function switching equipment

Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581121A (en) * 2003-08-09 2005-02-16 深圳市朗科科技有限公司 Semicondustor storage device having host system operation function

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN1581121A (en) * 2003-08-09 2005-02-16 深圳市朗科科技有限公司 Semicondustor storage device having host system operation function

Non-Patent Citations (3)

* Cited by examiner, † Cited by third party
Title
杨智君等: "USB On-The-Go技术概述", 《电子技术应用》 *
王志方: "USB OTG技术的嵌入式应用设计", 《中国新技术新产品 》 *
阳富民等: "嵌入式LinuxUSB OTG设备驱动技术研究", 《计算机工程与科学》 *

Cited By (12)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105589823A (en) * 2014-10-22 2016-05-18 乐视移动智能信息技术(北京)有限公司 Method, apparatus and circuit for realizing USB (universal serial bus) interface multiplexing MHL (mobile high-definition link)
US10122576B2 (en) 2015-03-17 2018-11-06 Microsoft Technology Licensing, Llc Intelligent role selection for dual-role devices
CN105159848A (en) * 2015-07-07 2015-12-16 江苏惠通集团有限责任公司 USB device control method, apparatus and system
CN105159848B (en) * 2015-07-07 2018-06-22 江苏惠通集团有限责任公司 USB device control method, device and system
CN105808480A (en) * 2016-03-01 2016-07-27 联发科技(新加坡)私人有限公司 Role switching method and system of USB (Universal Serial Bus) OTG (On-The-Go) equipment, and USB OTG equipment
TWI620070B (en) * 2016-03-01 2018-04-01 聯發科技(新加坡)私人有限公司 Method and system for switching role of usb otg device
CN106502911A (en) * 2016-11-09 2017-03-15 珠海全志科技股份有限公司 Multiple terminals access device
CN106502911B (en) * 2016-11-09 2019-12-10 珠海全志科技股份有限公司 Multi-terminal access device
CN106686115A (en) * 2017-01-19 2017-05-17 上海数果科技有限公司 High-safety high-efficiency mobile terminal data inter-transmission system based on USB (universal serial bus) interface
CN109408418A (en) * 2017-08-17 2019-03-01 深圳市中兴微电子技术有限公司 A kind of USB mode switching device and method, USB device
CN109408418B (en) * 2017-08-17 2022-03-25 深圳市中兴微电子技术有限公司 USB mode switching device and method and USB equipment
CN111061665A (en) * 2019-12-05 2020-04-24 深圳票联金融服务有限公司 Interface function switching equipment

Also Published As

Publication number Publication date
CN103473202B (en) 2016-07-27

Similar Documents

Publication Publication Date Title
CN103473202B (en) USB OTG, electronic equipment and the method realizing OTG function
CN107111588B (en) Data transfer using PCIe protocol via USB port
CN107423169B (en) Method and system for testing high speed peripheral device interconnection equipment
CN109643265B (en) Universal Serial Bus (USB) C-port for automatically configuring computing devices
CN102063320B (en) Work mode switching methods, USB (Universal Serial Bus) equipment and host machine equipment
CN108885601B (en) USB multi-host endpoint reflector hub
CN104202197A (en) Equipment management method and device
US20100088456A1 (en) Storage-sharing bus switch
CN103890728A (en) Method for hot transfer of virtual machine and server
JP2011166720A (en) Motherboard compatible with multiple versions of usb, and related method
EP2677439A2 (en) Active cable management
CN104021101A (en) USB interface system and implementation method based on LPC1768 platform
JP2018116648A (en) Information processor, control method thereof and program
CN111813599A (en) Solid-state storage device, server mainboard and control method
CN105354116A (en) Hot-plug detection method, apparatus, system and mobile terminal
CN107111568A (en) System and method for driver installation file to be presented when enabling USB equipment
CN101650694A (en) USB device, computer and method for achieving virtual device allocation of USB device
US7721016B2 (en) Method for using host controller to solicit a command failure from target device in order to initiate re-enumeration of the target device
CN105302735A (en) Management method of hybrid storage unit and electronic apparatus having the hybrid storage unit
CN102393838A (en) Data processing method and device, PCI-E (peripheral component interface-express) bus system, and server
CN104731577A (en) Multisystem and method of booting the same
CN110175092B (en) PCIe-based multi-interface storage device
CN114003528A (en) OCP switching card, switching system and switching method
CN103500074B (en) A kind of hard disk access method and device
CN216014148U (en) Server and server backboard

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
C14 Grant of patent or utility model
GR01 Patent grant
CP01 Change in the name or title of a patent holder
CP01 Change in the name or title of a patent holder

Address after: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor

Patentee after: RUIJIE NETWORKS Co.,Ltd.

Address before: Cangshan District of Fuzhou City, Fujian province 350002 Jinshan Road No. 618 Garden State Industrial Park 19 floor

Patentee before: Beijing Star-Net Ruijie Networks Co.,Ltd.