Summary of the invention
Fundamental purpose of the present invention provides a kind of intelligent key apparatus Working mode switching method and intelligent key apparatus, be intended to reach and reducing under the intelligent key apparatus condition of cost purpose of the USB interface that can automatically switch mode of operation and audio interface mode of operation.
The embodiment of the invention discloses a kind of changing method of intelligent key apparatus mode of operation, may further comprise the steps:
When the trigger pip input is arranged, identify the type of described trigger pip;
When described trigger pip is the trigger pip of wake-up signal triggering, enter the USB interface mode of operation;
When described trigger pip is the trigger pip of user side triggering, enter the audio interface mode of operation.
Preferably, described when described trigger pip is the trigger pip of wake-up signal triggering, enter the USB interface mode of operation and comprise:
When described trigger pip is the trigger pip of wake-up signal triggering, enumerate;
If during enumeration succeeds, then enter the USB interface mode of operation;
Unsuccessful as if enumerating, then enter the audio interface mode of operation.
Preferably, described when described trigger pip is the trigger pip of user side triggering, enter the audio interface mode of operation and comprise:
When described trigger pip is the trigger pip of user side triggering, wait pending data to interrupt;
In default duration, interrupt if receive described data, then enter the audio interface mode of operation;
Do not interrupt if receive described data, then switch to the USB interface mode of operation.
Preferably, described trigger pip is that the trigger pip that wake-up signal triggers comprises:
The described trigger pip that triggers when detecting extraneous USB device and being connected with intelligent key apparatus by described USB interface.
Preferably, described trigger pip is that the trigger pip that user side triggers comprises:
Detect user side by the described trigger pip of the switch module triggering of intelligent key apparatus.
The embodiment of the invention also discloses a kind of intelligent key apparatus, comprising:
The signal identification module is used for identifying the type of described trigger pip when the trigger pip input is arranged;
The state handover module, be used for described signal identification module identify described trigger pip be wake-up signal trigger trigger pip the time, enter the USB interface mode of operation; Described signal identification module identify described trigger pip be user side trigger trigger pip the time, enter the audio interface mode of operation.
Preferably, described state handover module also is used for:
When described trigger pip is the trigger pip of wake-up signal triggering, enumerate;
If during enumeration succeeds, then enter the USB interface mode of operation;
Unsuccessful as if enumerating, then enter the audio interface mode of operation.
Preferably, described state handover module also is used for:
When described trigger pip is the trigger pip of user side triggering, wait pending data to interrupt;
In default duration, interrupt if receive described data, then enter the audio interface mode of operation;
Do not interrupt if receive described data, then switch to the USB interface mode of operation.
Preferably, described trigger pip is that the trigger pip that wake-up signal triggers comprises:
The described trigger pip that triggers when detecting extraneous USB device and being connected with intelligent key apparatus by described USB interface.
Preferably, described trigger pip is that the trigger pip that user side triggers comprises:
Detect user side by the described trigger pip of the switch module triggering of intelligent key apparatus.
The present invention identifies the type of described trigger pip by when the trigger pip input is arranged; When described trigger pip is the trigger pip of wake-up signal triggering, enter the USB interface mode of operation; When described trigger pip is the trigger pip of user side triggering, switch the method that enters the audio interface mode of operation, reach can the automatically switch beneficial effect of USB interface mode of operation and audio interface mode of operation of intelligent key apparatus, reduced the requirement to intelligent key apparatus inter-process chip interface quantity; Further, saved cost to a certain extent.
Embodiment
Further specify technical scheme of the present invention below in conjunction with Figure of description and specific embodiment.Should be appreciated that specific embodiment described herein only in order to explaining the present invention, and be not used in restriction the present invention.
With reference to Fig. 1, Fig. 1 is the changing method one embodiment schematic flow sheet of intelligent key apparatus mode of operation of the present invention; As shown in Figure 1, the changing method of intelligent key apparatus mode of operation of the present invention may further comprise the steps:
Step S01, in trigger pip when input, arranged, identifying the type of described trigger pip;
Intelligent key apparatus outer setting USB interface and audio interface, in intelligent key apparatus inside described USB interface and audio interface are connected to MCU by analog switch IC, when having external unit to be connected with described intelligent key apparatus by described USB interface or audio interface, intelligent key apparatus detects whether the trigger pip input is arranged.
When intelligent key apparatus does not detect the trigger pip input, as if at open state, can continue then to wait for also whether constantly detection has the trigger pip input, perhaps, intelligent key apparatus enters holding state behind the default duration of arrival.
If at off-mode, then intelligent key apparatus can continue to keep current off-mode and continue to wait for the trigger pip input.
When intelligent key apparatus had detected the wake-up signal input, intelligent key apparatus started inner master controller or wakes the main control chip up, identifies the type of described trigger pip; According to the type of trigger pip, switching and selecting to enter the USB interface mode of operation still is the audio interface mode of operation.
Step S02, enter the USB interface mode of operation;
Step S03, enter the audio interface mode of operation.
Intelligent key apparatus recognize trigger pip be wake-up signal trigger trigger pip the time, intelligent key apparatus execution in step S02, enter the USB duty; Intelligent key apparatus recognize trigger pip be user side trigger trigger pip the time, intelligent key apparatus execution in step S03, enter the audio interface mode of operation.
Detected trigger pip when input at intelligent key apparatus, intelligent key apparatus starts inner master controller or wakes the main control chip up, identification have to trigger pip be wake-up signal trigger trigger pip the time, enter the USB interface mode of operation; At this moment, intelligent key apparatus begins to carry out USB and enumerates; When enumeration succeeds, intelligent key apparatus enters the USB interface mode of operation, and this moment, intelligent key apparatus entered the USBkey state; Enumerating when unsuccessful, intelligent key apparatus switches to the audio interface mode of operation by the USB interface mode of operation, and at this moment, intelligent key apparatus enters audio frequency KEY state.
The trigger signal types that detects input at intelligent key apparatus be user side trigger trigger pip the time, then enter the audio interface duty, wait pending data to interrupt.Can be understood as, intelligent key apparatus is under off-mode, if directly the data-interface at this intelligent key apparatus inserts audio frequency apparatus, then intelligent key apparatus can't directly enter audio frequency KEY state, must be by the manually opened intelligent key apparatus of user side, this moment, intelligent key apparatus entered audio frequency KEY state, waited pending data to interrupt.In default duration, if receiving described data, intelligent key apparatus interrupts, then enter the audio interface mode of operation; Do not interrupt if intelligent key apparatus receives described data, then switch to the USB interface mode of operation.
In a preferred embodiment, described trigger pip is that the trigger pip that wake-up signal triggers comprises:
When intelligent key apparatus detects extraneous USB device and is connected with intelligent key apparatus by described USB interface, the described trigger pip of triggering.
The trigger signal types that detects input at intelligent key apparatus be the USB device of access trigger trigger pip the time, then enter the USB interface mode of operation; Can be understood as: intelligent key apparatus if directly insert the USB device by the data-interface on the intelligent key apparatus, then can wake intelligent key apparatus up under off-mode, this moment intelligent key apparatus Auto Power On and enter the USBkey state; If intelligent key apparatus can not enter the USB interface mode of operation, then switch to the audio interface mode of operation.
In concrete application, the switching IC(Integrated Circuit that one piece of stable height and switching frequency satisfy the demands can be set in intelligent key apparatus, integrated circuit), this switching IC is equivalent to twin-channel single-pole double-throw switch (SPDT), chip select pin by the main control chip of intelligent key apparatus is controlled the residing passage of this switching IC, and changing chip selection signal as required, switching enters needed passage.
Please refer to Fig. 2, Fig. 2 is the changing method application scenarios one embodiment circuit diagram of intelligent key apparatus mode of operation of the present invention; In circuit diagram shown in Figure 2, intelligent key apparatus is under open state, when being connected with external unit by data-interface, if in the VCC wiring of switching IC 5V voltage is arranged, then 5V voltage is linked MCU(Microprogrammed Control Unit by dividing potential drop, microcontroller) wakeup pin wakes MCU up, makes intelligent key apparatus enter the USBkey state; At this moment, enumerate as the intelligent key apparatus of USBkey, if enumeration succeeds, then this data-interface enters the USB interface mode of operation, and this intelligent key apparatus can be used as USBkey and uses, and carries out the operation of USBkey; If enumerate unsuccessfully, then carry out passage and switch by switching IC, intelligent key apparatus enters audio frequency KEY state.
Under intelligent key apparatus was in off-mode, when being connected with external unit by data-interface, intelligent key apparatus can't directly enter audio frequency KEY state, must enter audio frequency KEY state by the manually opened intelligent key apparatus of user side, and etc. pending data interrupt.When intelligent key apparatus is under the off-mode and is connected with the USB device of insertion by data-interface, can wake start automatically up and enter the USBkey state; If intelligent key apparatus can not successfully enter the USBkey state, then carry out the passage switching by switching IC, change into audio frequency KEY state.
The embodiment of the invention is identified the type of described trigger pip by when the trigger pip input is arranged; When described trigger pip is the trigger pip of wake-up signal triggering, enter the USB interface mode of operation; When described trigger pip is the trigger pip of user side triggering, enter the method for audio interface mode of operation, reach can the automatically switch beneficial effect of USB interface mode of operation and audio interface mode of operation of intelligent key apparatus, reduced the requirement to intelligent key apparatus inter-process chip interface quantity; Further, saved cost to a certain extent.
Please refer to Fig. 3, Fig. 3 is intelligent key apparatus one embodiment high-level schematic functional block diagram of the present invention.As shown in Figure 3, intelligent key apparatus of the present invention comprises:signal detection module 01 andstate handover module 02.
Signal identification module 01 is used for identifying the type of described trigger pip when the trigger pip input is arranged;
Intelligent key apparatus outer setting USB interface and audio interface, in intelligent key apparatus inside described USB interface and audio interface are connected to MCU by analog switch IC, when having external unit to be connected with described intelligent key apparatus by described USB interface or audio interface, described intelligent key apparatus detects whether the trigger pip input is arranged; When the trigger pip input is arranged, identify the type of trigger pip bysignal identification module 01, and carry out the operation of correspondence according to the type of trigger pip.
When not having the trigger pip input, if at open state, then intelligent key apparatus can continue to wait for also whether constantly detection has the trigger pip input; Perhaps, intelligent key apparatus directly enters holding state behind the default duration of arrival.If intelligent key apparatus is in off-mode, then intelligent key apparatus can continue to keep current off-mode and continue to wait for the trigger pip input.
When the wake-up signal input was arranged, intelligent key apparatus started inner master controller or wakes the main control chip up, the type of the described trigger pip ofsignal identification module 01 identification; According to the type of trigger pip, switching and selecting to enter the USB interface mode of operation still is the audio interface mode of operation.
State handover module 02, be used for described signal identification module identify described trigger pip be wake-up signal trigger trigger pip the time, enter the USB interface mode of operation; Described signal identification module identify described trigger pip be user side trigger trigger pip the time, enter the audio interface mode of operation.
When the trigger pip input is arranged, intelligent key apparatus starts inner master controller or wakes the main control chip up, the described trigger pip ofsignal identification module 01 identification be wake-up signal trigger trigger pip the time,state handover module 02 control intelligent key apparatus enters the USB interface mode of operation; At this moment,state handover module 02 begins to carry out USB and enumerates; When enumeration succeeds,state handover module 02 control intelligent key apparatus enters the USB interface mode of operation, and this moment, intelligent key apparatus entered the USBkey state; Enumerating when unsuccessful,state handover module 02 switches to the audio interface mode of operation with intelligent cipher key equipment by the USB interface mode of operation, and at this moment, intelligent key apparatus enters audio frequency KEY state.
When the trigger signal types ofsignal identification module 01 identification input was the trigger pip of user side triggering, 02 control of state handover module intelligent key apparatus entered the audio interface duty, waits pending data to interrupt.Can be understood as, intelligent key apparatus is under off-mode, if directly the data-interface at this intelligent key apparatus inserts audio frequency apparatus, then intelligent key apparatus can't directly enter audio frequency KEY state, must be by the manually opened intelligent key apparatus of user side, this moment, intelligent key apparatus entered audio frequency KEY state, waited pending data to interrupt.In default duration, if receiving described data, intelligent key apparatus interrupts, then enter the audio interface mode of operation; Do not interrupt if intelligent key apparatus receives described data, thenstate handover module 02 switches to the USB interface mode of operation.
In a preferred embodiment, described trigger pip is that the trigger pip that wake-up signal triggers comprises:
When intelligent key apparatus detects extraneous USB device and is connected with intelligent key apparatus by described USB interface, the described trigger pip of triggering.
The trigger signal types ofsignal identification module 01 identification input be the USB device of access trigger trigger pip the time,state handover module 02 control intelligent key apparatus enters the USB interface mode of operation; Can be understood as: intelligent key apparatus if directly insert the USB device by the data-interface on the intelligent key apparatus, then can wake intelligent key apparatus up under off-mode, this moment intelligent key apparatus Auto Power On and enter the USBkey state; If intelligent key apparatus can not enter the USB interface mode of operation, thenstate handover module 02 switches to the audio interface mode of operation.
In concrete application, the switching IC that one piece of stable height and switching frequency satisfy the demands can be set in intelligent key apparatus, it is describedstate handover module 02 that this switching IC is equivalent to twin-channel single-pole double-throw switch (SPDT), chip select pin by the main control chip of intelligent key apparatus is controlled the residing passage of this switching IC, and change chip selection signal as required, by the type ofsignal identification module 01 identification chip selection signal, 02 switching of state handover module enters needed passage.The concrete application scenarios that arranges of relevant intelligent key apparatus please refer to the specific descriptions of the described embodiment of Fig. 2, does not repeat them here.
The embodiment of the invention is identified the type of described trigger pip by when the trigger pip input is arranged; When described trigger pip is the trigger pip of wake-up signal triggering, enter the USB interface mode of operation; When described trigger pip is the trigger pip of user side triggering, switch and enter the audio interface mode of operation, reach can the automatically switch beneficial effect of USB interface mode of operation and audio interface mode of operation of intelligent key apparatus, reduced the requirement to intelligent key apparatus inter-process chip interface quantity; Further, saved cost to a certain extent.
The above only is the preferred embodiments of the present invention; be not so limit its claim; every equivalent structure or equivalent flow process conversion that utilizes instructions of the present invention and accompanying drawing content to do; directly or indirectly be used in other relevant technical fields, all in like manner be included in the scope of patent protection of the present invention.