Summary of the invention
In view of this, the object of the present invention is to provide a kind of device switching method and integration peripheral unit that does not need hardware switching switch.
Based on described purpose, the embodiment of the invention provides a kind of device switching method that does not need hardware switching switch, comprises the following step.Receive an operation indication from the input media of a computer system.Send one first switching command (command) to an integration peripheral unit that is connected in this computer system via a connectivity port, so that the operating means in the described integration peripheral unit is switched to one second device from one first device according to described operation indication from a computer system.
In addition, the embodiment of the invention provides a kind of integration peripheral unit, is connected in a computer system via a connectivity port, comprises first device, second device and the switching device shifter.Described first device connects described computer system with default (default) operating means as described integration peripheral unit, and one first function is provided.At this moment, described second device is different from described first device, and does not connect described computer system.When described integration peripheral unit received one first switching command from described computer system, described switching device shifter switched to one second device to respond described first switching command with the operating means in the described integration peripheral unit from one first device.
Effect of the present invention does not need the device switching method of hardware switching switch and integrates peripheral unit for providing a kind of.
Description of drawings
Fig. 1 shows computer system and integrates the example structure calcspar of peripheral unit;
The process flow diagram of Fig. 2 display device changing method embodiment;
The process flow diagram of another embodiment of Fig. 3 display device changing method;
Fig. 4 shows the form synoptic diagram of private fixed order;
Fig. 5 shows the form synoptic diagram of manufacturer's order; And
The process flow diagram of another embodiment of Fig. 6 display device changing method.
Drawing reference numeral:
1~processor; 2~primary memory;
3~display; 4~input media;
5~console controller; 6~storage device;
7~USB port; 100~computer system;
120~integration peripheral unit; 121~switching device shifter;
122~connector; 123-125~device;
61~application program; 62~application program;
63~operating system; 611~driver;
612~driver.
Embodiment
Below explanation is preferred embodiment of the present invention.Its objective is to illustrate the general principle of the present invention, should not be considered as restriction of the present invention, scope of the present invention when with claim the person of being defined be as the criterion.
In Fig. 1, computer system 100 comprises processor 1, primary memory 2, display 3, input media 4, console controller 5 and storage device 6.Console controller 5 connects USB port 7.The connector 122 of integrating peripheral unit 120 is connected in USB port 7, and has comprised the device 123-125 that difference in functionality is provided respectively.Switching device shifter 121 can be connected to device 123-125 computer system 100 or interrupt its connection.Need be appreciated that device 123-125 can understand corresponding switching command with control switch device 121 respectively.Integrate among the peripheral unit 120, the device 123 that is connected with computer system 100 is called predetermined registration operation device (default active device), can with computer system 100 communications and according to from the switching command (command) of computer system 100 with control switch device 121, and then switch the operating means of integrating in the peripheral unit 120.
Storage device 6 storage application programs 61 and 62, and operating system 63. Application program 61 and 62 is corresponding intrument 124 and 125 respectively.Driver 611 and 621 is respectively in order to drive unit 124 and 125.Processor 1 can loading application programs 61,62, operating system 63, driver 611 and 612 to primary memory 2 to carry out.One of them of device 123-125 can be predetermined to be the predetermined registration operation device of integrating peripheral unit 120.In the following description, device 123 is storage device (mass storage), support USB massstorage class and be predetermined to be the predetermined registration operation device of integrating peripheral unit 120, and other device (device 124 and 125) does not connect described computer system 100, device 124 is a network camera (webcam), and device 125 is a TV signal receiver (TV receiver).Yet need be appreciated that, integrate in the peripheral unit and can integrate various other devices.Though being interface with USB, described integration peripheral unit connects computer system, not as limit.Integrate peripheral unit and also can pass through for example live wire (Firewire) connection computer system of other interface.
Computer system 100 receives an operation indication from input media 4, processor 1 sends switching command to integrating peripheral unit 120 according to described operation indication from computer system 100, switches to device 124 or installs 125 from installing 123 with the operating means that will integrate in the peripheral unit 120.Processor 1 can send switching command with switching operating device automatically according to the application program of carrying out.For instance, automatically switching operation device when activating or stop application program, perhaps according to the action pane in the operating system environment (activewindow) with the automatically switching operation device, below illustrate.
With reference to Fig. 2, when integration peripheral unit 120 was connected to computer system 100, computer system 100 detected the predetermined registration operation device of integrating peripheral unit 120, i.e. storage device 123 (step S200).Input media 4 receives the user and operates the application program 61 of indication with the corresponding intrument in the activating computer system 100 124.During processor 1 executive utility 61 (step S202), application program 61 is sent first switching command, is sent to by console controller 5 and USB port 7 and integrates peripheral unit 120 (step S204).Described first switching command can be that (private command) ordered in the private that meets USB (universal serial bus) (USB) mass storage classification (mass storageclass) standard surely.Fig. 4 shows the form synoptic diagram of private fixed order.The content of first switching command can be recorded in the 15th to the 30th byte that the private of Fig. 4 is ordered surely.
When integrating peripheral unit and receiving described switching command, storage device 123 is ordered with control switch device 121 surely according to described private, interrupt the online of computer system 100 and storage device 123, and switching device shifter 121 set up computer system 100 and install 124 online.By this, integrate peripheral unit 120 operating means is switched to device 124 to respond described switching command from installing 123.Need be appreciated that, in other embodiments, also can send described first switching command by the driver 611 of operating system 63 adaptation arrangements 124.
Then, computer system 100 detects the operating means of integrating peripheral unit 120, promptly installs 124 (network camera) (step S206), and interactive running (step S208) with it.Input media 4 receives the user and operates the application program 61 of indication in order to the corresponding intrument in the system of shutting down computer 100 124.When processor 1 stops application program 61 (step S210), application program 61 is sent second switching command (step S212) again.Described second switching command can be the manufacturer's order (vendorcommand) in USB (universal serial bus) (USB) standard.Fig. 5 shows the form synoptic diagram of manufacturer's order.The content of second switching command can be recorded in the 1st byte of manufacturer's order of Fig. 5.
Device 124 is ordered control switch device 121 surely according to described private, is storage device 123 to switch the operating means of integrating peripheral unit 120.Need be appreciated that, in other embodiments, also can send described second switching command by operating system 63 or by the driver 611 that installs 124.Computer system 100 detects to such an extent that to change the operating means of integrating peripheral unit 120 be storage device 123 (step S214) once more.
Yet, integrate peripheral unit 120 can be before application program 61 not be closed yet switching operating device, below illustrate.
With reference to Fig. 3, when integration peripheral unit 120 was connected to computer system 100, computer system 100 detected the predetermined registration operation device of integrating peripheral unit 120, i.e. storage device 123 (step S300).Input media 4 receives the user and operates the application program 61 of indication in order to the corresponding intrument in the activating computer system 100 124.During processor 1 executive utility 61 (step S302), application program 61 is sent the 3rd switching command, is sent to by console controller 5 and USB port 7 and integrates peripheral unit 120 (step S304).When integrating peripheral unit and receiving described the 3rd switching command, storage device 123 according to described the 3rd switching command with control switch device 121, interrupt the online of computer system 100 and storage device 123, and switching device shifter 121 set up computer system 100 and install 124 online.
Then, computer system 100 detects the operating means of integrating peripheral unit 120, promptly installs 124 (network camera) (step S306), and interactive running (step S308) with it.Input media 4 receives the user and operates the application program 62 of indication in order to the corresponding intrument in the activating computer system 100 124.When processor 1 executive utility 62 (step S310), application program 62 is sent the 4th switching command (step S312).Device 124 is device 125 (TV signal receiver) according to described the 4th switching command control switch device 121 to switch the operating means of integrating peripheral unit 120.Need be appreciated that, in other embodiments, also can send described the 4th switching command by operating system 63 or by the driver 621 that installs 125.Computer system 100 detect once more integrate peripheral unit 120 operating means be device 125 (step S314).Processor 1 stops application program 61 (step S316).
Even sending manufacturer's order of corresponding intrument 124 when stopping application program 61 in step S316 is device 123 with the switching operating device, because integrating the operating means of peripheral unit 120 is devices 125, manufacturer's order that can't device for identifying 124 therefore still can normal operation and can not be switched apparatus for converting 123.
Computer system 100 can with the automatically switching operation device, below illustrate according to the action pane in the operating system environment (active window).
With reference to Fig. 6, does operating system 63 detect the switching (step S600) that action pane is arranged? in this way, operating system 63 is differentiated the application program (step S602) of present action pane and is differentiated the device of integrating in the peripheral unit 120 should application program (step S604), and to transmit switching command be operating means (step S606) to integrating the device of peripheral unit 120 with blocked operation window correspondence.
Though the present invention discloses as above with preferred embodiment; yet be not in order to limit the present invention; has common knowledge in the technical field under any; without departing from the spirit and scope of the present invention; when can being used for a variety of modifications and variations, so protection scope of the present invention is as the criterion when looking the accompanying Claim person of defining.