CN105846223A - USB interface plug and USB interface plug control method and device - Google Patents

USB interface plug and USB interface plug control method and device Download PDF

Info

Publication number
CN105846223A
CN105846223A CN201610256808.5A CN201610256808A CN105846223A CN 105846223 A CN105846223 A CN 105846223A CN 201610256808 A CN201610256808 A CN 201610256808A CN 105846223 A CN105846223 A CN 105846223A
Authority
CN
China
Prior art keywords
usb
usb interface
terminal
control signal
interface plug
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
CN201610256808.5A
Other languages
Chinese (zh)
Other versions
CN105846223B (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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201610256808.5A priority Critical patent/CN105846223B/en
Publication of CN105846223A publication Critical patent/CN105846223A/en
Application granted granted Critical
Publication of CN105846223B publication Critical patent/CN105846223B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R13/00Details of coupling devices of the kinds covered by groups H01R12/70 or H01R24/00 - H01R33/00
    • H01R13/46Bases; Cases
    • H01R13/52Dustproof, splashproof, drip-proof, waterproof, or flameproof cases
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/01Input arrangements or combined input and output arrangements for interaction between user and computer
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F3/00Input arrangements for transferring data to be processed into a form capable of being handled by the computer; Output arrangements for transferring data from processing unit to output unit, e.g. interface arrangements
    • G06F3/16Sound input; Sound output
    • G06F3/165Management of the audio stream, e.g. setting of volume, audio stream path
    • HELECTRICITY
    • H01ELECTRIC ELEMENTS
    • H01RELECTRICALLY-CONDUCTIVE CONNECTIONS; STRUCTURAL ASSOCIATIONS OF A PLURALITY OF MUTUALLY-INSULATED ELECTRICAL CONNECTING ELEMENTS; COUPLING DEVICES; CURRENT COLLECTORS
    • H01R13/00Details of coupling devices of the kinds covered by groups H01R12/70 or H01R24/00 - H01R33/00
    • H01R13/66Structural association with built-in electrical component
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Abstract

The present invention provides a USB interface plug, and a USB interface plug control method and device, belonging to the field of the intelligent terminal. The USB interface plug comprises a button, a USB plug and a control chip; the button includes a push portion and an output terminal; the USB plug includes a power supply terminal, a data plus terminal, a data minus terminal and an earth terminal; and the output terminal of the control chip is connected with the output terminal of the button, and the control chip is connected with the power supply terminal, the data plus terminal, the data minus terminal and the earth terminal of the USB plug. The problems are solved that an interface plug used in the prior art is made of plastic materials and is configured to only prevent foreign matters from entering the USB interface of the USB device and the utilization rate is low. According to the invention, the USB interface plug comprises a control chip and a circuit connection structure, when the USB interface plug accesses the USB device, the USB interface plug is able to prevent foreign matters form entering the USB interface of the USB device and receive control signals generated by the operation of the button for controlling the USB device, and therefore the utilization of the USB interface plug is improved.

Description

USB interface plug, control method and device
Technical field
It relates to intelligent terminal's accessory field, particularly to a kind of USB interface plug, control method and dress Put.
Background technology
The terminal unit such as mobile phone, panel computer is provided with USB (Universal Serial Bus, general Universal serial bus) interface, USB interface both also can pass as data as the charging inlet of terminal unit Defeated interface, has very important effect.
Outside being directly exposed to terminal unit due to current USB interface, hold very much under non-working condition Tending to have dust, liquid or other foreign bodies to enter, cause USB interface short circuit, block and corrode, impact is normal Use, in order to avoid this problem, generally load onto a USB interface plug to USB interface, but make at present USB interface plug be all plastic cement material, be only capable of preventing foreign body from entering USB interface, utilization rate is the highest.
Summary of the invention
The problem the highest in order to solve USB interface plug utilization rate, the disclosure provides a kind of USB interface plug, control Method and device processed.Described technical scheme is as follows:
First aspect according to disclosure embodiment, it is provided that and a kind of USB (Universal Serial Bus, general Universal serial bus) interface plug, this interface plug includes:
Button, button includes press section and lead-out terminal;
USB plug, USB plug includes that power supply terminal, data add terminal, data subtract terminal and ground terminal;
Control chip, control chip is connected with the lead-out terminal of button, control chip the most respectively with USB plug Power supply terminal, data add terminal, data subtract terminal and are connected with ground terminal.
Optionally, button, for when press section is touched, by lead-out terminal output pressing signal;
Control chip, for when receiving pressing signal, generates control signal according to pressing signal, passes through Data add terminal and data subtract terminal output control signal.
Optionally, control chip, for when receiving pressing signal every time, generating with to press signal corresponding Control signal;
Or, control chip, in the scheduled duration being initially received pressing signal, statistics is pre-regularly Receive the number of pressing signal in length, generate the control signal corresponding with the number pressing signal.
Optionally, USB plug, for when being inserted into USB device, by power supply terminal and ground terminal Power to control chip.
Second aspect according to disclosure embodiment, it is provided that a kind of control method, the method for grafting just like In the USB device of the USB interface plug of first aspect, the method includes:
Receive the control signal that USB interface plug sends;
Control instruction is generated according to control signal;
Perform control instruction.
Optionally, generate control instruction according to control signal, including:
In the scheduled duration being initially received control signal, in statistics scheduled duration, receive control signal Number, generates the control instruction corresponding with the number of control signal.
Optionally, generate control instruction according to control signal, including:
When receiving control signal, generate the control instruction corresponding with the type of control signal.
Optionally, the method also includes:
When detecting that USB interface plug inserts, USB interface plug is enumerated as HID (Human Interface Device, human interface device).
Optionally, control instruction includes: screenshotss, take pictures, image, open application program, regulation volume, Beat opening/closing bluetooth, beat opening/closing network connection, beat in opening/closing torch at least one.
The third aspect according to disclosure embodiment, it is provided that a kind of control device, this device can be implemented as Grafting is some or all of just like the USB device of the USB interface plug of first aspect, and this device includes:
Receiver module, is configured to receive the control signal that USB interface plug sends;
Generation module, is configured to generate control instruction according to control signal;
Perform module, be configured to perform control instruction.
Optionally, generation module, it is configured in the scheduled duration being initially received control signal, statistics Receive the number of control signal in scheduled duration, generate the control instruction corresponding with the number of control signal.
Optionally, generation module, it is configured to when receiving control signal, generates the class with control signal The control instruction that type is corresponding.
Optionally, this device also includes:
Processing module, is configured to, when detecting that USB interface plug inserts, be enumerated as by USB interface plug HID。
Optionally, control instruction includes: screenshotss, take pictures, image, open application program, regulation volume, Beat opening/closing bluetooth, beat opening/closing network connection, beat in opening/closing torch at least one.
Fourth aspect according to disclosure embodiment, it is provided that a kind of control device, this control device can realize Becoming some or all of just like the USB device of the USB interface plug of first aspect of grafting, device includes:
Processor;
For storing the memorizer of processor executable;
Wherein, processor is configured to:
Receive the control signal that USB interface plug sends;
Control instruction is generated according to control signal;
Perform control instruction.
Embodiment of the disclosure that the technical scheme of offer can include following beneficial effect:
USB interface plug includes button, USB plug and control chip, and button includes press section and lead-out terminal, USB plug includes that power supply terminal, data add terminal, data subtract terminal and ground terminal, control chip with press The lead-out terminal of key is connected, and control chip power supply terminal, data with USB plug the most respectively add terminal, number It is connected with ground terminal according to subtracting terminal;Solving currently used interface plug is all plastic cement material, is only capable of preventing Foreign body carries out the USB interface of USB device, the problem that utilization rate is relatively low;Reach USB interface plug to include Control chip and circuit connection structure, when grafting enters USB device, can not only prevent foreign body from entering USB The USB interface of equipment, moreover it is possible to receive button operation generation control signal and USB device is controlled, improve The effect of the utilization rate of USB interface plug
It should be appreciated that it is only exemplary that above general description and details hereinafter describe, can not Limit the disclosure.
Accompanying drawing explanation
Accompanying drawing herein is merged in description and constitutes the part of this specification, it is shown that meet the disclosure Embodiment, and in description together for explaining the principle of the disclosure.
Fig. 1 is the structural representation according to a kind of USB interface plug shown in an exemplary embodiment;
Fig. 2 is the connection signal according to a kind of USB interface plug shown in an exemplary embodiment with USB device Figure;
Fig. 3 is the flow chart according to a kind of control method shown in an exemplary embodiment;
Fig. 4 is the flow chart according to a kind of control method shown in another exemplary embodiment;
Fig. 5 is according to a kind of block diagram controlling device shown in an exemplary embodiment;
Fig. 6 is according to a kind of block diagram controlling device shown in another exemplary embodiment;
Fig. 7 is according to a kind of block diagram controlling device shown in another exemplary embodiment.
Detailed description of the invention
Here will illustrate exemplary embodiment in detail, its example represents in the accompanying drawings.Following retouches Stating when relating to accompanying drawing, unless otherwise indicated, the same numbers in different accompanying drawings represents same or analogous key element. Embodiment described in following exemplary embodiment does not represent all embodiment party consistent with the disclosure Formula.On the contrary, they only with describe in detail in appended claims, the disclosure some in terms of mutually one The example of the apparatus and method caused.
Fig. 1 is according to a kind of USB (Universal Serial Bus, the general string shown in an exemplary embodiment Row bus) structural representation of interface plug, this USB interface plug includes: button 120, USB plug 140 With control chip 160.
Button 120 includes press section 121 and lead-out terminal 122.
USB plug 140 includes that power supply terminal 141, data add terminal 142, data subtract terminal 143 and ground connection Terminal 144.
Optionally, power supply terminal 141, data add terminal 142, data subtract terminal 143 and ground terminal 144 It is conducting metal pole.
USB plug 140 can be USB A type interface or USB Type B interface.
Optionally, USB plug 140 also includes other terminal (not shown in figure 1)s, USB plug 140 It is Mini USB A type interface, Mini USB Type B interface, Mini USB AB type interface, Micro USB A type interface, Micro USB Type B interface or USB Type-C interface, wrap in different usb types Including other different terminals, the type of other terminals that USB plug 140 includes is not limited by the present embodiment Fixed, and the usb type of USB plug 140 is not construed as limiting.
It should be noted that USB interface plug can also include that shell, button 120 and control chip 160 lead to Crossing plastic cement thermoplastic in shell, the press section 121 of button 120, outside shell, is used for receiving touching operation, USB plug 140, outside shell, is used for inserting USB device, outside the present embodiment is to USB interface plug Shape does not repeats.
USB plug 140, for when being inserted into USB device, by power supply terminal 141 and ground terminal 144 power to control chip 160.
Optionally, USB device be mobile phone, panel computer, notebook computer etc include USB interface Electronic equipment.
As in figure 2 it is shown, it illustrates the connection diagram of USB device 170 and USB interface plug, USB device 170 includes that USB 180, USB 180 include that power supply terminal 181, data add Terminal 182, data subtract terminal 183 and ground terminal 184.
The usb type of USB plug 140 connects with the USB of the USB 180 in USB device Mouth type is identical, when USB plug 140 is in the USB 180 inserting USB device, and USB plug The power supply terminal 141 of 140 is connected with the power supply terminal 181 of USB 180, the number of USB plug 140 Add that terminal 182 is connected, the data of USB plug 140 subtract according to adding the terminal 142 data with USB 180 Terminal 143 subtract with the data of USB 180 terminal 183 be connected, the ground terminal 144 of USB plug 140 It is connected with the ground terminal 184 of USB 180.
USB interface plug, when detecting that USB interface plug inserts, is enumerated as HID by USB device 170 (Human Interface Device, human interface device), including following several steps:
1, USB device is when detecting that USB interface plug inserts, and USB interface is filled in horizontal reset, USB Interface plug address after the reset is 0, and USB device passes through the end points 0 of address 0 and USB interface plug to USB Interface plug sends device descriptor and obtains request, the device descriptor of acquisition request USB interface plug;USB connects After mouth plug receives device descriptor acquisition request, device descriptor is returned to USB device;USB device After determining that the device descriptor received is correct, return the confirmation packet of 0 length to USB interface plug, should The confirmation packet of 0 length does not include data message, is used for confirming that device descriptor is correct.
Wherein, device descriptor is for indicating the information of USB interface plug, and device descriptor includes 18 words Joint, for the maximum data packet length indicating descriptor length, descriptor type, end points 0 to support, manufacturer The information such as identifier, product identifiers, version number, in this step, the equipment that USB device gets is retouched State symbol and can not be complete device descriptor, be only the part in device descriptor.
2, after USB interface is filled in horizontal reset by USB device again, send to USB interface plug and address is set Request, and for USB interface plug distribution one unique address, USB interface plug after receiving this address, Return the state bag of 0 length to USB device, the state bag of this 0 length do not include data message, For indicating address to arrange success;USB device receives the state of 0 length that USB interface plug returns Bao Hou, returns an ACK (Acknowledgement confirms character) packet to USB interface plug, This ack msg bag is used for confirming that address arranges success.Return when USB interface plug receives USB device After the ack msg bag returned, it is possible to use this address and USB device to carry out data communication.
3, the USB device address acquisition USB interface plug by distributing for USB interface plug device descriptor, The descriptors such as configuration descriptor, interface descriptor, endpoint descriptor and character string descriptor, and according at least These descriptors determine the relevant letters such as the interface of USB interface plug, end points, configuration, device name and serial number Breath, in this step, the device descriptor that USB device obtains again is that the equipment of whole 18 byte is retouched Stating symbol, this step is not specifically described by the present embodiment.
USB device uses above-mentioned several steps to complete to enumerate USB interface plug, and according to getting Row data are filled in USB interface in the relevant information of USB interface plug and the address for the distribution of USB interface plug Communication.
Button 120, for when press section 121 is touched, by lead-out terminal 122 output pressing signal.
Optionally, press section 121 receives touching operation be click, long by or in scheduled duration repeatedly Click, wherein, long by being touching operation press section 121 touched time exceeding predetermined threshold, predetermined Threshold value and scheduled duration are by systemic presupposition or User Defined.
Optionally, when press section 121 is touched, the pressing that button 120 is exported by lead-out terminal 122 Signal is level signal, and the pressing signal of lead-out terminal output includes single depression signal and presses signal continuously, Such as, when press section 121 is clicked, export high level signal i.e. single depression signal;Press section 121 When being long pressed, export continuous high level signal, i.e. export and press signal continuously;Press section 121 is by repeatedly single When hitting, click each time and all export a high level signal, i.e. export multiple single depression signal.
Control chip 160, for when receiving pressing signal, generates control signal according to pressing signal.
Optionally, control signal is binary-coded character.
Control chip 160, for when receiving pressing signal every time, generating the control corresponding with pressing signal Signal.
The different corresponding different control signals of pressing signal, pressing signal with the corresponding relation of control signal is Pre-set, when receiving multiple single depression signal, generate multiple control signal, such as, make Representing control signal with a binary-coded character, presetting the control signal that pressing signal is corresponding continuously is 0, The control signal that single depression signal is corresponding is 1, then, when press section is long pressed, generate control signal 0, when When press section is clicked, generate control signal 1, when press section is clicked twice in scheduled duration, generate Two control signals 1,1.
Or, control chip 160, in the scheduled duration being initially received pressing signal, statistics is predetermined Receive the number of pressing signal in duration, generate the control signal corresponding with the number pressing signal.
The corresponding different types of control signal of the pressing signal of the different numbers received in scheduled duration, predetermined The number of pressing signal and the type corresponding relation of control signal that receive in duration are pre-set, Such as, use two binary-coded characters to represent control signal, in presetting scheduled duration, receive 1 list Control signal corresponding during secondary pressing signal is 00, receives control letter corresponding during 2 single depression signals Number being 01, control signal corresponding when receiving 3 single depression signals is 10, receive 4 singles by Control signal corresponding during pressure signal is 11, then when press section receives in the given time 3 times and clicks, The control signal that control chip generates is 10.
It should be noted that the pressing signal received in scheduled duration can also include pressing signal continuously, Such as, in the above example, the control that one-time continuous pressing signal is corresponding is received in presetting scheduled duration Signal processed is 00, and control signal corresponding when receiving 1 single depression signal is 01, receives 2 lists Control signal corresponding during secondary pressing signal is 10, receives control letter corresponding during 3 single depression signals Number it is 11.
Control chip 160, is used for adding terminal 142 by data and data subtracts terminal 143 and export control signal.
Control chip adds terminal 142 by data and data subtract terminal 143 output voltage, by controlling data Add terminal 142 and voltage difference that data subtract between terminal 143 is believed to the control exporting binary-coded character form High level 1 in number and low level 0, when data add terminal 142 and data to subtract the voltage difference of terminal 143 big In or during equal to voltage threshold, represent the high level 1 in control signal;When data add terminal 142 and data subtract When the voltage difference of terminal 143 is less than voltage threshold, represent the low level 0 in control signal, voltage threshold by Systemic presupposition or User Defined.
Control chip binary-coded character serial transmission by turn from low order character to high-order character to control signal, Such as, voltage threshold is 0.5V, and control signal is 01, then control chip adds terminal output by controlling data Voltage 2.7V, controls data and subtracts terminal output 2.0V, the voltage difference that data add terminal and data subtract between terminal Value is that 0.7V is more than voltage threshold 0.5V, i.e. achieves output low order character 1;Control chip is by controlling number According to adding terminal output voltage 2.3V, controlling data and subtract terminal output 2.0V, data add terminal and data subtract terminal Between voltage difference be 0.3V, less than voltage threshold 0.5V, i.e. achieve output high-order character 0.
In sum, the USB interface plug that disclosure embodiment provides includes button, USB plug and control core Sheet, button includes press section and lead-out terminal, and USB plug includes that power supply terminal, data add terminal, data Subtracting terminal and ground terminal, control chip is connected with the lead-out terminal of button, control chip the most respectively with USB The power supply terminal of plug, data add terminal, data subtract terminal and are connected with ground terminal;Solve currently used Interface plug be all plastic cement material, be only capable of the USB interface preventing foreign body from carrying out USB device, utilization rate is relatively low Problem;Reach USB interface plug and included control chip and circuit connection structure, enter USB device in grafting Time, can not only prevent foreign body from entering the USB interface of USB device, moreover it is possible to receive button operation and generate control USB device is controlled by signal, improves the effect of the utilization rate of USB interface plug.
Fig. 3 is the flow chart according to a kind of control method shown in an exemplary embodiment, and the method is applied to It is plugged with in the USB device of USB interface plug as shown in Figure 1, comprises the following steps:
In step 301, USB device receives the control signal that USB interface plug sends.
In step 302, USB device generates control instruction according to control signal.
In step 303, USB device performs control instruction.
In sum, the control method that disclosure embodiment provides, USB device receives USB interface plug and sends Control signal, generate control instruction perform control instruction according to control signal, reached to beat need not In the case of opening the USB device such as mobile phone, panel computer, just can by external USB interface plug is operated, Realize the fast operating of application program in USB device, make the operation of the USB device such as mobile phone, panel computer The effect of more convenient and quicker.
Fig. 4 is the flow chart according to a kind of control method shown in an exemplary embodiment, and the method is applied to It is plugged with in the USB device of USB interface plug as shown in Figure 1, comprises the following steps:
In step 401, USB device is when detecting that USB interface plug inserts, by USB interface plug piece Lift as HID.
USB device includes that USB, USB include that power supply terminal, data add terminal, data subtract Terminal and ground terminal, when USB device inserts USB interface plug, the USB of USB device and USB The annexation of the USB plug of interface plug is as in figure 2 it is shown, the power supply terminal of USB and USB interface The power supply terminal of the USB plug in plug is connected, and the data of USB add the data of terminal and USB plug Adding terminal to be connected, the data of USB subtract terminal and subtract terminal with the data of USB plug and be connected, USB Ground terminal be connected with the ground terminal of USB plug.
The USB of USB device provides voltage to believe by power supply terminal and ground terminal to USB interface plug Number, make the USB interface plug power supply terminal by USB plug and ground terminal receive voltage signal and for controlling Chip power supply.
USB interface plug is enumerated as the method for HID by USB device can be in conjunction with above-mentioned exemplary embodiment, this Implement this is repeated no more.
In step 402, USB device receives the control signal that USB interface plug sends.
Optionally, USB interface plug sends control signal, USB device to USB device by the way of interruption Add terminal by the data of USB and data subtract the control signal that terminal reception USB interface plug sends, and Interrupting the program processed, the control signal sending USB interface plug responds.Optionally, control Signal is binary-coded character.
In step 403, USB device generates control instruction according to control signal.
Optionally, control instruction includes: screenshotss, take pictures, image, open application program, regulation volume, Beat opening/closing bluetooth, beat opening/closing network connection, beat in opening/closing torch at least one, application program is Any a application program that USB device includes.
Optionally, in the scheduled duration being initially received control signal, in statistics scheduled duration, receive control The number of signal processed, generates the control instruction corresponding with the number of control signal.
The corresponding different control instruction of control signal of different numbers, the number of control signal and control instruction Corresponding relation is systemic presupposition or is preset by USB device by user.Such as, control signal It is a binary-coded character, in being set in advance in scheduled duration, receives the control of control signal 1 correspondence Instruction is to take pictures, and receiving control instruction corresponding during two control signals 1,1 in scheduled duration is screenshotss, Then when USB device receives two control signals 1,1 in scheduled duration, the control generating screenshotss refers to Order.
Optionally, when receiving control signal, generate the control instruction corresponding with the type of control signal.
The corresponding different control instruction of the type of different control signals, the type of control signal and control instruction Corresponding relation be systemic presupposition or preset by USB device by user.Such as, letter is controlled Number being two binary-coded characters, the control instruction of default settings control signal 00 correspondence is to take pictures, control signal The control instruction of 01 correspondence is screenshotss, and the control instruction of control signal 10 correspondence is to open bluetooth, control signal The control instruction of 11 correspondences is to open torch, then USB device is when receiving control signal 10, generates and beats Open the control instruction of bluetooth.
In step 404, USB device performs control instruction.
After USB device equipment performs control instruction, continue executing with the program interrupted before.
In sum, the control method that disclosure embodiment provides, USB device receives USB interface plug and sends Control signal, generate control instruction perform control instruction according to control signal, reached to beat need not In the case of opening the USB device such as mobile phone, panel computer, just can by external USB interface plug is operated, Realize the fast operating of application program in USB device, make the operation of the USB device such as mobile phone, panel computer The effect of more convenient and quicker.
The control method that disclosure embodiment provides, USB interface plug is sent out to USB device by the way of interruption Sending control signal to be controlled the application program in USB device, USB device need not constantly inquire about USB The state of interface plug, reduces the power consumption of USB device.
In an exemplary example, USB interface plug inserts in USB device, and USB device completes Enumerating USB interface plug, USB device and USB interface fill in row data communication.Assume control signal It is two binary-coded characters, and presets control chip in USB interface plug and receive 1 in the given time Control signal corresponding during individual single depression signal is 00, receives control corresponding during 2 single depression signals Signal processed is 01, and control signal corresponding when receiving 3 single depression signals is 10, receives 4 lists Control signal corresponding during secondary pressing signal is 11.
Further, the control instruction presetting control signal 00 correspondence that USB device receives is to take pictures, The control instruction of control signal 01 correspondence is screenshotss, and the control instruction of control signal 10 correspondence is to open bluetooth, The control instruction of control signal 11 correspondence is to open torch.
The press section of USB interface plug button is touched by user, clicks 3 times, then USB in scheduled duration The control chip of interface plug generates control signal 10 and exports to USB device, and USB device is according to controlling letter Numbers 10 generate the control instruction opening bluetooth, and perform control instruction and open bluetooth, i.e. achieve and pass through user Adopting consecutive click chemical reaction USB interface plug 3 times, opens the Bluetooth function in USB device.
Following for disclosure device embodiment, may be used for performing method of disclosure embodiment.For the disclosure The details not disclosed in device embodiment, refer to method of disclosure embodiment.
Fig. 5 is that this device can pass through according to a kind of block diagram controlling device shown in an exemplary embodiment Hardware, software or both be implemented in combination with become the USB device being plugged with USB interface plug as shown in Figure 1 Some or all of, this device includes but not limited to:
Receiver module 510, is configured to receive the control signal that USB interface plug sends.
Generation module 520, is configured to generate control instruction according to control signal.
Perform module 530, be configured to perform control instruction.
In sum, the control device that disclosure embodiment provides, USB device receives USB interface plug and sends Control signal, generate control instruction perform control instruction according to control signal, reached to beat need not In the case of opening the USB device such as mobile phone, panel computer, just can by external USB interface plug is operated, Realize the fast operating of application program in USB device, make the operation of the USB device such as mobile phone, panel computer The effect of more convenient and quicker.
Fig. 6 is that this device can pass through according to a kind of block diagram controlling device shown in an exemplary embodiment Hardware, software or both be implemented in combination with become the USB device being plugged with USB interface plug as shown in Figure 1 Some or all of, this device includes but not limited to:
Processing module 610, is configured to, when detecting that USB interface plug inserts, be enumerated by USB interface plug For HID.
Receiver module 620, is configured to receive the control signal that USB interface plug sends.
Generation module 630, is configured to generate control instruction according to control signal.
Generation module 630, is configured in the scheduled duration being initially received control signal, the pre-timing of statistics Receive the number of control signal in length, generate the control instruction corresponding with the number of control signal.
Generation module 630, is configured to when receiving control signal, generates corresponding with the type of control signal Control instruction.
Perform module 640, be configured to perform control instruction.
In sum, the control device that disclosure embodiment provides, USB device receives USB interface plug and sends Control signal, generate control instruction perform control instruction according to control signal, reached to beat need not In the case of opening the USB device such as mobile phone, panel computer, just can by external USB interface plug is operated, Realize the fast operating of application program in USB device, make the operation of the USB device such as mobile phone, panel computer The effect of more convenient and quicker.
About the device in above-described embodiment, wherein modules performs the concrete mode of operation relevant The embodiment of the method is described in detail, explanation will be not set forth in detail herein.
The disclosure one exemplary embodiment provides a kind of control device, it is possible to realize the control that the disclosure provides Method, this device includes: processor, for storing the memorizer of processor executable;
Wherein, processor is configured to:
Receive the control signal that USB interface plug sends.
Control instruction is generated according to control signal.
Perform control instruction.
Fig. 7 is according to a kind of block diagram controlling device shown in an exemplary embodiment.Such as, device 700 Can be mobile phone, computer, digital broadcast terminal, messaging devices, game console, flat board Equipment, personal digital assistant etc..
With reference to Fig. 7, device 700 can include following one or more assembly: processes assembly 702, memorizer 704, power supply module 706, multimedia groupware 708, audio-frequency assembly 710, input/output (I/O) interface 712, Sensor cluster 714, and communications component 716.
Process assembly 702 and generally control the integrated operation of device 700, such as with display, call, number The operation being associated according to communication, camera operation and record operation.Process assembly 702 and can include one or many Individual processor 718 performs instruction, to complete all or part of step of above-mentioned method.Additionally, process Assembly 702 can include one or more module, it is simple to process between assembly 702 and other assemblies is mutual. Such as, process assembly 702 and can include multi-media module, to facilitate multimedia groupware 708 and to process assembly Mutual between 702.
Memorizer 704 is configured to store various types of data to support the operation at device 700.These The example of data includes any application program for operation on device 700 or the instruction of method, contact person Data, telephone book data, message, picture, video etc..Memorizer 704 can be by any kind of volatile Property or non-volatile memory device or combinations thereof realize, such as static RAM (SRAM), Electrically Erasable Read Only Memory (EEPROM), Erasable Programmable Read Only Memory EPROM (EPROM), Programmable read only memory (PROM), read only memory (ROM), magnetic memory, flash memory, Disk or CD.
The various assemblies that power supply module 706 is device 700 provide electric power.Power supply module 706 can include electricity Management system, one or more power supplys, and other generate, manage and distribute electric power phase with for device 700 The assembly of association.
The screen of one output interface of offer that multimedia groupware 708 is included between device 700 and user. In certain embodiments, screen can include liquid crystal display (LCD) and touch panel (TP).If screen Curtain includes that touch panel, screen may be implemented as touch screen, to receive the input signal from user.Touch Touch panel and include that one or more touch sensor is with the gesture on sensing touch, slip and touch panel.Touch Touch sensor and can not only sense touch or the border of sliding action, but also detect and touch or slide Relevant persistent period and pressure.In certain embodiments, multimedia groupware 708 includes a preposition shooting Head and/or post-positioned pick-up head.When device 700 is in operator scheme, during such as screening-mode or video mode, front Put photographic head and/or post-positioned pick-up head can receive outside multi-medium data.Each front-facing camera and rearmounted Photographic head can be a fixing optical lens system or have focal length and optical zoom ability.
Audio-frequency assembly 710 is configured to output and/or input audio signal.Such as, audio-frequency assembly 710 includes One mike (MIC), when device 700 is in operator scheme, such as call model, logging mode and voice During recognition mode, mike is configured to receive external audio signal.The audio signal received can be entered One step is stored in memorizer 704 or sends via communications component 716.In certain embodiments, audio-frequency assembly 710 also include a speaker, are used for exporting audio signal.
I/O interface 712 provides interface, above-mentioned peripheral interface for processing between assembly 702 and peripheral interface module Module can be keyboard, puts striking wheel, button etc..These buttons may include but be not limited to: home button, sound Amount button, start button and locking press button.
Sensor cluster 714 includes one or more sensor, for providing various aspects for device 700 State estimation.Such as, what sensor cluster 714 can detect device 700 opens/closed mode, assembly Relative localization, such as assembly is display and the keypad of device 700, and sensor cluster 714 is all right Detection the device 700 or position change of 700 1 assemblies of device, existence that user contacts with device 700 or Do not exist, device 700 orientation or acceleration/deceleration and the variations in temperature of device 700.Sensor cluster 714 can To include proximity transducer, it is configured to when there is no any physical contact object near detecting. Sensor cluster 714 can also include optical sensor, such as CMOS or ccd image sensor, is used for becoming Use as in application.In certain embodiments, this sensor cluster 714 can also include acceleration transducer, Gyro sensor, Magnetic Sensor, pressure transducer or temperature sensor.
Communications component 716 is configured to facilitate the logical of wired or wireless mode between device 700 and other equipment Letter.Device 700 can access wireless network based on communication standard, such as Wi-Fi, 2G or 3G, or they Combination.In one exemplary embodiment, communications component 716 receives wide from outside via broadcast channel The broadcast singal of broadcast management system or broadcast related information.In one exemplary embodiment, communications component 716 Also include near-field communication (NFC) module, to promote junction service.Such as, can be based on penetrating in NFC module Frequency identifies (RFID) technology, Infrared Data Association (IrDA) technology, ultra broadband (UWB) technology, indigo plant Tooth (BT) technology and other technologies realize.
In the exemplary embodiment, device 700 can by one or more application specific integrated circuits (ASIC), Digital signal processor (DSP), digital signal processing appts (DSPD), PLD (PLD), Field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are real Existing, it is used for performing above-mentioned control method.
In the exemplary embodiment, a kind of non-transitory computer-readable storage medium including instruction is additionally provided Matter, such as, include the memorizer 704 of instruction, and above-mentioned instruction can be performed by the processor 718 of device 700 with complete Become above-mentioned control method.Such as, non-transitory computer-readable recording medium can be ROM, random access memory Memorizer (RAM), CD-ROM, tape, floppy disk and optical data storage devices etc..
Those skilled in the art, after considering description and putting into practice invention disclosed herein, will readily occur to these public affairs Other embodiment opened.The application is intended to any modification, purposes or the adaptations of the disclosure, These modification, purposes or adaptations are followed the general principle of the disclosure and include that the disclosure is not disclosed Common knowledge in the art or conventional techniques means.Description and embodiments is considered only as exemplary , the true scope of the disclosure and spirit are pointed out by claim below.
It should be appreciated that the disclosure is not limited to accurate knot described above and illustrated in the accompanying drawings Structure, and various modifications and changes can carried out without departing from the scope.The scope of the present disclosure is only by appended Claim limits.

Claims (15)

1. a general-purpose serial bus USB interface plug, it is characterised in that described interface plug includes:
Button, described button includes press section and lead-out terminal;
USB plug, described USB plug includes that power supply terminal, data add terminal, data subtract terminal and ground connection Terminal;
Control chip, described control chip is connected with the lead-out terminal of described button, and described control chip also divides Do not add terminal with the described power supply terminal of described USB plug, described data, described data subtract terminal and described Ground terminal is connected.
USB interface plug the most according to claim 1, it is characterised in that
Described button, for when described press section is touched, by described lead-out terminal output pressing signal;
Described control chip, for when receiving described pressing signal, generates control according to described pressing signal Signal processed, adds terminal by described data and described data subtracts terminal and export described control signal.
USB interface plug the most according to claim 2, it is characterised in that
Described control chip, for when receiving described pressing signal every time, generates and described pressing signal Corresponding control signal;
Or,
Described control chip, in the scheduled duration being initially received described pressing signal, statistics is described Receive the number of described pressing signal in scheduled duration, generate the control corresponding with the number of described pressing signal Signal processed.
USB interface plug the most according to claim 1, it is characterised in that
Described USB plug, for when being inserted into USB device, by described power supply terminal and described ground connection Terminal is powered to described control chip.
5. a control method, it is characterised in that arbitrary just like Claims 1-4 described for grafting In the USB device of general-purpose serial bus USB interface plug, described method includes:
Receive the control signal that described USB interface plug sends;
Control instruction is generated according to described control signal;
Perform described control instruction.
Method the most according to claim 5, it is characterised in that described generate according to described control signal Control instruction, including:
In the scheduled duration being initially received described control signal, in adding up described scheduled duration, receive institute State the number of control signal, generate the control instruction corresponding with the number of described control signal.
Method the most according to claim 5, it is characterised in that described generate according to described control signal Control instruction, including:
When receiving described control signal, generate the control instruction corresponding with the type of described control signal.
8. according to the arbitrary described method of claim 5 to 7, it is characterised in that described method also includes:
When detecting that described USB interface plug inserts, described USB interface plug is enumerated as human interface device HID。
9. according to the arbitrary described method of claim 5 to 7, it is characterised in that described control instruction includes: Screenshotss, take pictures, image, open application program, regulation volume, beat opening/closing bluetooth, beat opening/closing network At least one connect, beaten in opening/closing torch.
10. one kind controls device, it is characterised in that described control device can be implemented as grafting just like power Profit requires the some or all of of the USB device of 1 to 4 arbitrary described general-purpose serial bus USB interface plug, Described device includes:
Receiver module, is configured to receive the control signal that described USB interface plug sends;
Generation module, is configured to generate control instruction according to described control signal;
Perform module, be configured to perform described control instruction.
11. devices according to claim 10, it is characterised in that
Described generation module, is configured in the scheduled duration being initially received described control signal, statistics Receive the number of described control signal in described scheduled duration, generate corresponding with the number of described control signal Control instruction.
12. devices according to claim 10, it is characterised in that
Described generation module, is configured to when receiving described control signal, generates and described control signal Control instruction corresponding to type.
13. according to the arbitrary described device of claim 10 to 12, it is characterised in that described device also wraps Include:
Processing module, is configured to when detecting that described USB interface plug inserts, by described USB interface plug It is enumerated as human interface device HID.
14. according to the arbitrary described device of claim 10 to 12, it is characterised in that described control instruction Including: screenshotss, take pictures, image, open application program, regulation volume, beat opening/closing bluetooth, beat ON/OFF At least one close network connection, beating in opening/closing torch.
15. 1 kinds control device, it is characterised in that described control device can be implemented as grafting just like power Profit requires the some or all of of the USB device of 1 to 4 arbitrary described general-purpose serial bus USB interface plug, Described device includes:
Processor;
For storing the memorizer of described processor executable;
Wherein, described processor is configured to:
Receive the control signal that described USB interface plug sends;
Control instruction is generated according to described control signal;
Perform described control instruction.
CN201610256808.5A 2016-04-22 2016-04-22 USB interface plug, control method and device Active CN105846223B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610256808.5A CN105846223B (en) 2016-04-22 2016-04-22 USB interface plug, control method and device

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610256808.5A CN105846223B (en) 2016-04-22 2016-04-22 USB interface plug, control method and device

Publications (2)

Publication Number Publication Date
CN105846223A true CN105846223A (en) 2016-08-10
CN105846223B CN105846223B (en) 2019-04-12

Family

ID=56588934

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610256808.5A Active CN105846223B (en) 2016-04-22 2016-04-22 USB interface plug, control method and device

Country Status (1)

Country Link
CN (1) CN105846223B (en)

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106299861A (en) * 2016-08-11 2017-01-04 合肥阿格德信息科技有限公司 A kind of bus module
CN111343325A (en) * 2020-03-17 2020-06-26 Tcl移动通信科技(宁波)有限公司 Port detection method and device, mobile terminal and storage medium
CN111338526A (en) * 2020-02-25 2020-06-26 维沃移动通信有限公司 Screenshot method and device

Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050249143A1 (en) * 2002-09-24 2005-11-10 Koninklijke Philips Electronics N.V. Interface integrated circuit device for a usb connection
CN201193132Y (en) * 2008-04-18 2009-02-11 周湘峻 Intelligent bottle stopper
CN102097704A (en) * 2010-12-30 2011-06-15 鸿富锦精密工业(深圳)有限公司 Cap and electronic device with same
CN103513861A (en) * 2012-06-29 2014-01-15 联想(北京)有限公司 Method for processing information and electronic device
CN103595874A (en) * 2013-11-29 2014-02-19 惠州Tcl移动通信有限公司 Control method for mobile-phone applications, mobile phone protective cover and mobile-phone protective cover set
CN203523000U (en) * 2013-10-18 2014-04-02 吴俞青 Intelligent earphone
CN203896410U (en) * 2013-08-06 2014-10-22 保科特姆公司 Selector capable of coupling to port of smartphone
CN104638491A (en) * 2015-02-09 2015-05-20 广东欧珀移动通信有限公司 Sealing method for USB (universal serial bus) interface, USB intelligent key and terminal

Patent Citations (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050249143A1 (en) * 2002-09-24 2005-11-10 Koninklijke Philips Electronics N.V. Interface integrated circuit device for a usb connection
CN201193132Y (en) * 2008-04-18 2009-02-11 周湘峻 Intelligent bottle stopper
CN102097704A (en) * 2010-12-30 2011-06-15 鸿富锦精密工业(深圳)有限公司 Cap and electronic device with same
CN103513861A (en) * 2012-06-29 2014-01-15 联想(北京)有限公司 Method for processing information and electronic device
CN203896410U (en) * 2013-08-06 2014-10-22 保科特姆公司 Selector capable of coupling to port of smartphone
CN203523000U (en) * 2013-10-18 2014-04-02 吴俞青 Intelligent earphone
CN103595874A (en) * 2013-11-29 2014-02-19 惠州Tcl移动通信有限公司 Control method for mobile-phone applications, mobile phone protective cover and mobile-phone protective cover set
CN104638491A (en) * 2015-02-09 2015-05-20 广东欧珀移动通信有限公司 Sealing method for USB (universal serial bus) interface, USB intelligent key and terminal

Cited By (3)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN106299861A (en) * 2016-08-11 2017-01-04 合肥阿格德信息科技有限公司 A kind of bus module
CN111338526A (en) * 2020-02-25 2020-06-26 维沃移动通信有限公司 Screenshot method and device
CN111343325A (en) * 2020-03-17 2020-06-26 Tcl移动通信科技(宁波)有限公司 Port detection method and device, mobile terminal and storage medium

Also Published As

Publication number Publication date
CN105846223B (en) 2019-04-12

Similar Documents

Publication Publication Date Title
CN105068958B (en) Method for handover control and device
CN105468152A (en) Terminal operation control method and device based on wearable equipment, and equipment
CN104318741A (en) Bluetooth device control method and device
CN104598093A (en) Method and device for prompting message during screen locking
CN105049416A (en) Method and apparatus for accessing to wifi network
CN104185304B (en) A kind of method and device accessing WI-FI network
CN105049923A (en) Method and apparatus for waking up electronic device
CN105242828A (en) Method and apparatus for displaying control on interface of mobile terminal
CN105357466A (en) Video communication method and video communication device
CN105159559A (en) Mobile terminal control method and mobile terminal
CN104898505A (en) Smart scene configuration method and device
CN105528151A (en) Brightness adjusting method and apparatus
CN104717554A (en) Smart television control method and device and electronic equipment
CN104506443A (en) Router setting interface display method and device
CN104837154A (en) Wireless access point control method and device
CN104812020A (en) Method, device and system for controlling intelligent equipment to access network
CN104394137A (en) Voice call reminding method and device
CN105162193A (en) Charging method and charging apparatus for terminal, and terminal
CN105183309B (en) Method for handover control and device
CN105224171A (en) icon display method, device and terminal
CN105846223A (en) USB interface plug and USB interface plug control method and device
KR102566099B1 (en) Power supply control method of power strip, device and power strip
CN104375760B (en) Method for information display and device
CN105739840A (en) Terminal and starting method of application programs in terminal
CN106358064A (en) Method and equipment for controlling television

Legal Events

Date Code Title Description
C06 Publication
PB01 Publication
C10 Entry into substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant