CN103186499A - USB equipment sharing method and electronic system of mixed framework - Google Patents

USB equipment sharing method and electronic system of mixed framework Download PDF

Info

Publication number
CN103186499A
CN103186499A CN2011104603235A CN201110460323A CN103186499A CN 103186499 A CN103186499 A CN 103186499A CN 2011104603235 A CN2011104603235 A CN 2011104603235A CN 201110460323 A CN201110460323 A CN 201110460323A CN 103186499 A CN103186499 A CN 103186499A
Authority
CN
China
Prior art keywords
state
operating system
usb device
electronic equipment
electronic
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
CN2011104603235A
Other languages
Chinese (zh)
Other versions
CN103186499B (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.)
Lenovo Beijing Ltd
Original Assignee
Lenovo Beijing 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 Lenovo Beijing Ltd filed Critical Lenovo Beijing Ltd
Priority to CN201110460323.5A priority Critical patent/CN103186499B/en
Publication of CN103186499A publication Critical patent/CN103186499A/en
Application granted granted Critical
Publication of CN103186499B publication Critical patent/CN103186499B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Abstract

The invention discloses a USB (universal serial bus) equipment sharing method and an electronic system of a mixed framework. The method comprises the steps as follows: obtaining a dormant instruction generated by a first operating system, wherein the dormant instruction is used for indicating that the first operating system is switched from an arousal state to a dormant state; setting the state of USB equipment in a second operating system to be a second state; judging if the state of the USB equipment in the second operating system is the second state to obtain a first judgment result; and when the first judgment result shows that the state of the USB equipment in the second operating system is the second state, controlling the first operating system and the second operating system to be in the dormant state. Due to the adoption of the method and the electronic system, the states of the shared USB equipment in a main system and a slave system of the electronic system of the mixed framework can be guaranteed to keep consistent, so that the shared USB equipment can be normally used.

Description

A kind of USB device is shared the electronic system of method and mixed architecture
Technical field
The present invention relates to electronic equipment control field, particularly relate to the electronic system that a kind of USB device is shared method and mixed architecture.
Background technology
The electronic system of mixed architecture is only to have on the PC basis of a system existing, embeds the PC of other at least one system.Can merge work between the different system, display one's respective advantages.Main system that the electronic system of existing common mixed architecture is integrated usually (for example, the X86 system, adopt windows operating system) and one from system (for example, the ARM system, adopt android operating system), main system and from sharing shared device between the system, for example, display screen, keyboard, mouse, camera, wireless module etc.
But in the electronic system of the mixed architecture of prior art, that is that all right is ripe for the equipment share technique, and especially the technology of sharing of USB device is left to be desired.
Concrete, in the prior art, when the main system (for example base) of the electronic system of mixed architecture with both link together when doing as a whole use from system (for example pad), require main system and have identical state from system.Main system with have identical state from system and comprise: identical dormant state and identical wake-up states.For the USB device of sharing, when wake-up states, USB device is in main system and all need to be in initiate mode from system, and when dormant state, USB device is in main system and all need to be in the not enabled state from system.Electronic system could operate as normal like this.
But in the prior art, the USB device of sharing during with Synchronization Status Message from system, usually occurs the situation of synchronization failure in main system, causes USB device normally to use, and also can cause system's blue screen when serious.
Summary of the invention
The purpose of this invention is to provide a kind of USB device and share the electronic system of method and mixed architecture, can guarantee that the USB device of sharing is consistent in the main system of the electronic system of mixed architecture and the state from system, can normally use shared USB device.
For achieving the above object, the invention provides following scheme:
A kind of USB device is shared method, be applied to the electronic system of mixed architecture, described electronic system comprises that operation has first electronic equipment of first operating system and second electronic equipment that operation has second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has first state and second state in described first operating system and described second operating system, the described USB device of described first state representation is in initiate mode, the described USB device of described second state representation is in the not enabled state, all have dormant state and wake-up states in described first operating system and described second operating system
Described method comprises:
Obtain the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
The state of described USB device in described second operating system is set to described second state;
Judge that whether the state of described USB device in described second operating system is described second state, obtains first judged result;
When described first judged result represents that the state of described USB device in described second operating system is described second state, control described first operating system and described second operating system enters described dormant state.
Preferably, also comprise:
When described first operating system and described second operating system are in described dormant state, obtain the instruction that wakes up that described first operating system produces; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
Wake described second operating system up;
The state of described USB device in described second operating system is set to described first state.
Preferably, also comprise:
When described first electronic equipment was connected with described second electronic equipment, the state of described USB device in described second operating system was set to described second state;
After the state of described USB device in described second operating system was set to described second state, the state of described USB device in described second operating system was set to described first state.
Preferably, the state of described USB device in described second operating system is set to also comprise before described second state:
Judge whether the state of described USB device in described second operating system occurs obtaining second judged result unusually;
When described second judged result represents that the state of described USB device in described second operating system occurs returning the step that the state of the described USB device of execution in described second operating system is set to described second state when unusual.
A kind of electronic system of mixed architecture, described electronic system comprises that operation has first electronic equipment of first operating system and second electronic equipment that operation has second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has first state and second state in described first operating system and described second operating system, the described USB device of described first state representation is in initiate mode, the described USB device of described second state representation is in the not enabled state, all have dormant state and wake-up states in described first operating system and described second operating system
Described electronic system comprises:
The dormancy instruction fetch unit is used for obtaining the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
Second state set unit is used for described USB device and is set to described second state at the state of described second operating system;
First judging unit is used for judging that whether described USB device is described second state at the state of described second operating system, obtains first judged result;
The dormant state control module is used for representing described USB device when the state of described second operating system is described second state when described first judged result, controls described first operating system and described second operating system enters described dormant state.
Preferably, also comprise:
Wake instruction fetch unit up, be used for when described first operating system and described second operating system are in described dormant state, obtaining the instruction that wakes up of described first operating system generation; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
The second operating system wakeup unit is used for waking up described second operating system;
First state set unit is used for described USB device and is set to described first state at the state of described second operating system.
Preferably, also comprise:
First control module is used for controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when described first electronic equipment is connected with described second electronic equipment;
Second control module, be used for when described USB device after the state of described second operating system is set to described second state, control the state of the described USB device of described first state set unit in described second operating system and be set to described first state.
Preferably, also comprise:
Second judging unit is used for judging whether described USB device occurs obtaining second judged result unusually at the state of described second operating system;
The 3rd control module, being used for representing described USB device when described second judged result occurs controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when unusual at the state of described second operating system.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
USB device of the present invention is shared the electronic equipment of method and mixed architecture, share by judging whether the state of USB device in described second operating system is second state, when described first judged result represents that the state of described USB device in described second operating system is described second state, just control described first operating system and described second operating system enters described dormant state, can on sequential, interrupt the process that first operating system enters dormant state earlier, setting completed to wait for the status information of the USB device in second operating system, control two equipment integral body again and enter dormant state, and then can guarantee that the USB device of sharing is consistent in the main system of the electronic system of mixed architecture and the state from system, can normally use shared USB device.
Description of drawings
In order to be illustrated more clearly in the embodiment of the invention or technical scheme of the prior art, to do to introduce simply to the accompanying drawing of required use among the embodiment below, apparently, accompanying drawing in describing below only is some embodiments of the present invention, for those of ordinary skills, under the prerequisite of not paying creative work, can also obtain other accompanying drawing according to these accompanying drawings.
Fig. 1 is the process flow diagram that USB device of the present invention is shared method embodiment 1;
Fig. 2 is the process flow diagram that USB device of the present invention is shared method embodiment 2;
Fig. 3 is the process flow diagram that USB device of the present invention is shared method embodiment 3;
Fig. 4 is the process flow diagram that USB device of the present invention is shared method embodiment 4;
Fig. 5 is the structural drawing of the electronic system embodiment 1 of mixed architecture of the present invention;
Fig. 6 is the structural drawing of the electronic system embodiment 2 of mixed architecture of the present invention;
Fig. 7 is the structural drawing of the electronic system embodiment 3 of mixed architecture of the present invention;
Fig. 8 is the structural drawing of the electronic system embodiment 4 of mixed architecture of the present invention.
Embodiment
Below in conjunction with the accompanying drawing in the embodiment of the invention, the technical scheme in the embodiment of the invention is clearly and completely described, obviously, described embodiment only is the present invention's part embodiment, rather than whole embodiment.Based on the embodiment among the present invention, those of ordinary skills belong to the scope of protection of the invention not making the every other embodiment that obtains under the creative work prerequisite.
For above-mentioned purpose of the present invention, feature and advantage can be become apparent more, the present invention is further detailed explanation below in conjunction with the drawings and specific embodiments.
USB device of the present invention is shared method, be applied to the electronic system of mixed architecture, described electronic system comprises that operation has first electronic equipment of first operating system and second electronic equipment that operation has second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has first state and second state in described first operating system and described second operating system, the described USB device of described first state representation is in initiate mode, the described USB device of described second state representation is in the not enabled state, all has dormant state and wake-up states in described first operating system and described second operating system.
Fig. 1 is the process flow diagram that USB device of the present invention is shared method embodiment 1.As shown in Figure 1, the method comprising the steps of:
S101: obtain the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
In this step, can adopt the mode of the dormancy instruction of intercepting and capturing described first operating system generation.After intercepting and capturing the dormancy instruction of first operating system generation, can interrupt first operating system and switch to the process of dormant state according to this dormancy instruction, after waiting for that the state of described USB device in described second operating system is described second state, control first operating system again and switch to dormant state according to this dormancy instruction.
S102: the state of described USB device in described second operating system is set to described second state;
In this step, can the information of USB device in second operating system be set to not enabled, make second operating system think that USB device is unloaded.
S103: judge that whether the state of described USB device in described second operating system is described second state, obtains first judged result;
In this step, can judge whether the state of described USB device in described second operating system has been set to described second state by the instruction about the status information of USB device that receives that second operating system sends.
S104: when described first judged result represents that the state of described USB device in described second operating system is described second state, control described first operating system and described second operating system enters described dormant state.
In the present embodiment, first operating system can be the operating system of main system, and second operating system can be the operating system from system.
The application's applicant is through conscientiously research, find in the prior art, the USB device of sharing, in main system with from system during Synchronization Status Message, the reason that the situation of synchronization failure usually occurs is: main system is different with hardware configuration from system, usually the hardware configuration of main system is higher, and is lower from the hardware configuration of system.When handling same task, main system can be than finishing from system's priority processing.For the USB device of sharing, in the time of all will entering dormant state as a whole in two systems, the initiate mode information of USB device also need be set to not enabled in two systems.Because main system is faster than the processing speed from system, so be set to not enabled from also the be not able to do in time initiate mode of USB device of system, main system has just been controlled from system and has been entered dormant state together, causes occurring unusual from the state of the USB device of system.
The USB device of present embodiment is shared method, share by judging whether the state of USB device in described second operating system is second state, when described first judged result represents that the state of described USB device in described second operating system is described second state, just control described first operating system and described second operating system enters described dormant state, can on sequential, interrupt the process that first operating system enters dormant state earlier, setting completed to wait for the status information of the USB device in second operating system, control two equipment integral body again and enter dormant state, and then can guarantee that the USB device of sharing is consistent in the main system of the electronic system of mixed architecture and the state from system, can normally use shared USB device.
Fig. 2 is the process flow diagram that USB device of the present invention is shared method embodiment 2.As shown in Figure 2, the method comprising the steps of:
S201: obtain the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
S202: the state of described USB device in described second operating system is set to described second state;
S203: judge that whether the state of described USB device in described second operating system is described second state, obtains first judged result;
S204: when described first judged result represents that the state of described USB device in described second operating system is described second state, control described first operating system and described second operating system enters described dormant state.
S205: when described first operating system and described second operating system are in described dormant state, obtain the instruction that wakes up that described first operating system produces; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
S206: wake described second operating system up;
S207: the state of described USB device in described second operating system is set to described first state.
In the present embodiment, when waking first operating system and second operating system up, the state of described USB device in described second operating system is set to described first state (initiate mode), in the time of can guaranteeing that first operating system and second operating system are waken up as a whole, the state of USB device in second operating system of sharing be for enabling, and then can guarantee that shared USB device can normally use.
Fig. 3 is the process flow diagram that USB device of the present invention is shared method embodiment 3.As shown in Figure 3, the method comprising the steps of:
S301: when described first electronic equipment was connected with described second electronic equipment, the state of described USB device in described second operating system was set to described second state;
S302: after the state of described USB device in described second operating system was set to described second state, the state of described USB device in described second operating system was set to described first state.
Step S301 and step S302 have been equivalent to simulate the process that USB device is extracted and inserted from USB interface, and namely the driver of this USB device of unloading is installed the driver of this USB device more earlier.
S303: obtain the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
S304: the state of described USB device in described second operating system is set to described second state;
S305: judge that whether the state of described USB device in described second operating system is described second state, obtains first judged result;
S306: when described first judged result represents that the state of described USB device in described second operating system is described second state, control described first operating system and described second operating system enters described dormant state.
When first electronic equipment separates use with second electronic equipment, may change about the status information of sharing USB device in second electronic equipment.For fear of this variation, in the present embodiment, when detecting first electronic equipment and be connected with second electronic equipment, can be by the state of described USB device in described second operating system be set to described second state earlier, be set to described first state again, be equivalent to simulate extracting and insertion process of a USB device, and then can avoid first electronic equipment to be connected with second electronic equipment time since the status information of the shared USB device of second electronic equipment cause unusually electronic system whole take place unusual.
Fig. 4 is the process flow diagram that USB device of the present invention is shared method embodiment 4.As shown in Figure 4, the method comprising the steps of:
S401: when described first electronic equipment is connected with described second electronic equipment, judge whether the state of described USB device in described second operating system occurs unusually; If, execution in step S402 then; Otherwise, execution in step S404.
S402: the state of described USB device in described second operating system is set to described second state;
S403: after the state of described USB device in described second operating system was set to described second state, the state of described USB device in described second operating system was set to described first state.
S404: obtain the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
S405: the state of described USB device in described second operating system is set to described second state;
S406: judge that whether the state of described USB device in described second operating system is described second state, obtains first judged result;
S407: when described first judged result represents that the state of described USB device in described second operating system is described second state, control described first operating system and described second operating system enters described dormant state.
In the present embodiment, when detecting first electronic equipment and be connected with second electronic equipment, can judge earlier whether the status information about shared USB device occurs unusually in second electronic equipment (for example whether with first electronic equipment in status information accordance), if it is unusual, then by the state of described USB device in described second operating system is set to described second state earlier, be set to described first state again, extracting and insertion process of a USB device of simulation, and then can avoid first electronic equipment to be connected with second electronic equipment time since the status information of the shared USB device of second electronic equipment cause unusually electronic system whole take place unusual; If do not occur then skipping over step S402 and S403 unusually, can simplify step, improve running efficiency of system.
The invention also discloses a kind of electronic system of mixed architecture.Described electronic system comprises that operation has first electronic equipment of first operating system and second electronic equipment that operation has second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has first state and second state in described first operating system and described second operating system, the described USB device of described first state representation is in initiate mode, the described USB device of described second state representation is in the not enabled state, all has dormant state and wake-up states in described first operating system and described second operating system.
Fig. 5 is the structural drawing of the electronic system embodiment 1 of mixed architecture of the present invention.As shown in Figure 5, this electronic system comprises:
Dormancy instruction fetch unit 501 is used for obtaining the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
Second state set unit 502 is used for described USB device and is set to described second state at the state of described second operating system;
First judging unit 503 is used for judging that whether described USB device is described second state at the state of described second operating system, obtains first judged result;
Dormant state control module 504 is used for representing described USB device when the state of described second operating system is described second state when described first judged result, controls described first operating system and described second operating system enters described dormant state.
The electronic system of the mixed architecture of present embodiment, share by judging whether the state of USB device in described second operating system is second state, when described first judged result represents that the state of described USB device in described second operating system is described second state, just control described first operating system and described second operating system enters described dormant state, can on sequential, interrupt the process that first operating system enters dormant state earlier, setting completed to wait for the status information of the USB device in second operating system, control two equipment integral body again and enter dormant state, and then can guarantee that the USB device of sharing is consistent in the main system of the electronic system of mixed architecture and the state from system, can normally use shared USB device.
Fig. 6 is the structural drawing of the electronic system embodiment 2 of mixed architecture of the present invention.As shown in Figure 6, this electronic system comprises:
Dormancy instruction fetch unit 501 is used for obtaining the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
Second state set unit 502 is used for described USB device and is set to described second state at the state of described second operating system;
First judging unit 503 is used for judging that whether described USB device is described second state at the state of described second operating system, obtains first judged result;
Dormant state control module 504 is used for representing described USB device when the state of described second operating system is described second state when described first judged result, controls described first operating system and described second operating system enters described dormant state.
Wake instruction fetch unit 601 up, be used for when described first operating system and described second operating system are in described dormant state, obtaining the instruction that wakes up of described first operating system generation; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
The second operating system wakeup unit 602 is used for waking up described second operating system;
First state set unit 603 is used for described USB device and is set to described first state at the state of described second operating system.
In the present embodiment, when waking first operating system and second operating system up, the state of described USB device in described second operating system is set to described first state (initiate mode), in the time of can guaranteeing that first operating system and second operating system are waken up as a whole, the state of USB device in second operating system of sharing be for enabling, and then can guarantee that shared USB device can normally use.
Fig. 7 is the structural drawing of the electronic system embodiment 3 of mixed architecture of the present invention.As shown in Figure 7, this electronic system comprises:
First control module 701 is used for controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when described first electronic equipment is connected with described second electronic equipment;
Second control module 702, be used for when described USB device after the state of described second operating system is set to described second state, control the state of the described USB device of described first state set unit in described second operating system and be set to described first state.
Dormancy instruction fetch unit 501 is used for obtaining the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
Second state set unit 502 is used for described USB device and is set to described second state at the state of described second operating system;
First judging unit 503 is used for judging that whether described USB device is described second state at the state of described second operating system, obtains first judged result;
Dormant state control module 504 is used for representing described USB device when the state of described second operating system is described second state when described first judged result, controls described first operating system and described second operating system enters described dormant state.
When first electronic equipment separates use with second electronic equipment, may change about the status information of sharing USB device in second electronic equipment.For fear of this variation, in the present embodiment, when detecting first electronic equipment and be connected with second electronic equipment, can be by the state of described USB device in described second operating system be set to described second state earlier, be set to described first state again, be equivalent to simulate extracting and insertion process of a USB device, and then can avoid first electronic equipment to be connected with second electronic equipment time since the status information of the shared USB device of second electronic equipment cause unusually electronic system whole take place unusual.
Fig. 8 is the structural drawing of the electronic system embodiment 4 of mixed architecture of the present invention.As shown in Figure 8, this electronic system comprises:
Second judging unit 801 is used for judging whether described USB device occurs obtaining second judged result unusually at the state of described second operating system;
The 3rd control module 802, being used for representing described USB device when described second judged result occurs controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when unusual at the state of described second operating system.
First control module 701 is used for controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when described first electronic equipment is connected with described second electronic equipment;
Second control module 702, be used for when described USB device after the state of described second operating system is set to described second state, control the state of the described USB device of described first state set unit in described second operating system and be set to described first state.
Dormancy instruction fetch unit 501 is used for obtaining the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
Second state set unit 502 is used for described USB device and is set to described second state at the state of described second operating system;
First judging unit 503 is used for judging that whether described USB device is described second state at the state of described second operating system, obtains first judged result;
Dormant state control module 504 is used for representing described USB device when the state of described second operating system is described second state when described first judged result, controls described first operating system and described second operating system enters described dormant state.
In the present embodiment, when detecting first electronic equipment and be connected with second electronic equipment, can judge earlier whether the status information about shared USB device occurs unusually in second electronic equipment (for example whether with first electronic equipment in status information accordance), if it is unusual, then by the state of described USB device in described second operating system is set to described second state earlier, be set to described first state again, extracting and insertion process of a USB device of simulation, and then can avoid first electronic equipment to be connected with second electronic equipment time since the status information of the shared USB device of second electronic equipment cause unusually electronic system whole take place unusual; If do not occur then skipping over the state of described USB device in described second operating system and being set to described second state unusually, be set to the step of described first state again, can simplify step, improve running efficiency of system.
At last, also need to prove, in this article, relational terms such as first and second grades only is used for an entity or operation are made a distinction with another entity or operation, and not necessarily requires or hint and have the relation of any this reality or in proper order between these entities or the operation.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thereby make and comprise that process, method, article or the equipment of a series of key elements not only comprise those key elements, but also comprise other key elements of clearly not listing, or also be included as the intrinsic key element of this process, method, article or equipment.Do not having under the situation of more restrictions, the key element that is limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment that comprises described key element and also have other identical element.
Through the above description of the embodiments, those skilled in the art can be well understood to the present invention and can realize by the mode that software adds essential hardware platform, can certainly all implement by hardware, but the former is better embodiment under a lot of situation.Based on such understanding, all or part of can the embodying with the form of software product that technical scheme of the present invention contributes to background technology, this computer software product can be stored in the storage medium, as ROM/RAM, magnetic disc, CD etc., comprise that some instructions are with so that a computer equipment (can be personal computer, server, the perhaps network equipment etc.) carry out the described method of some part of each embodiment of the present invention or embodiment.
Each embodiment adopts the mode of going forward one by one to describe in this instructions, and what each embodiment stressed is and the difference of other embodiment that identical similar part is mutually referring to getting final product between each embodiment.For the electronic system of the disclosed mixed architecture of embodiment, because it is corresponding with the embodiment disclosed method, so description is fairly simple, relevant part partly illustrates referring to method and gets final product.
Used specific case herein principle of the present invention and embodiment are set forth, the explanation of above embodiment just is used for helping to understand method of the present invention and core concept thereof; Simultaneously, for one of ordinary skill in the art, according to thought of the present invention, part in specific embodiments and applications all can change.In sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a USB device is shared method, it is characterized in that, be applied to the electronic system of mixed architecture, described electronic system comprises that operation has first electronic equipment of first operating system and second electronic equipment that operation has second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has first state and second state in described first operating system and described second operating system, the described USB device of described first state representation is in initiate mode, the described USB device of described second state representation is in the not enabled state, all have dormant state and wake-up states in described first operating system and described second operating system
Described method comprises:
Obtain the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
The state of described USB device in described second operating system is set to described second state;
Judge that whether the state of described USB device in described second operating system is described second state, obtains first judged result;
When described first judged result represents that the state of described USB device in described second operating system is described second state, control described first operating system and described second operating system enters described dormant state.
2. method according to claim 1 is characterized in that, also comprises:
When described first operating system and described second operating system are in described dormant state, obtain the instruction that wakes up that described first operating system produces; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
Wake described second operating system up;
The state of described USB device in described second operating system is set to described first state.
3. method according to claim 1 is characterized in that, also comprises:
When described first electronic equipment was connected with described second electronic equipment, the state of described USB device in described second operating system was set to described second state;
After the state of described USB device in described second operating system was set to described second state, the state of described USB device in described second operating system was set to described first state.
4. method according to claim 3 is characterized in that, the state of described USB device in described second operating system is set to also comprise before described second state:
Judge whether the state of described USB device in described second operating system occurs obtaining second judged result unusually;
When described second judged result represents that the state of described USB device in described second operating system occurs returning the step that the state of the described USB device of execution in described second operating system is set to described second state when unusual.
5. the electronic system of a mixed architecture, it is characterized in that, described electronic system comprises that operation has first electronic equipment of first operating system and second electronic equipment that operation has second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has first state and second state in described first operating system and described second operating system, the described USB device of described first state representation is in initiate mode, the described USB device of described second state representation is in the not enabled state, all have dormant state and wake-up states in described first operating system and described second operating system
Described electronic system comprises:
The dormancy instruction fetch unit is used for obtaining the dormancy instruction that described first operating system produces; Described dormancy instruction is used to indicate described first operating system and switches to described dormant state by described wake-up states;
Second state set unit is used for described USB device and is set to described second state at the state of described second operating system;
First judging unit is used for judging that whether described USB device is described second state at the state of described second operating system, obtains first judged result;
The dormant state control module is used for representing described USB device when the state of described second operating system is described second state when described first judged result, controls described first operating system and described second operating system enters described dormant state.
6. the electronic system of hybrid terminal according to claim 5 is characterized in that, also comprises:
Wake instruction fetch unit up, be used for when described first operating system and described second operating system are in described dormant state, obtaining the instruction that wakes up of described first operating system generation; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
The second operating system wakeup unit is used for waking up described second operating system;
First state set unit is used for described USB device and is set to described first state at the state of described second operating system.
7. the electronic system of hybrid terminal according to claim 5 is characterized in that, also comprises:
First control module is used for controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when described first electronic equipment is connected with described second electronic equipment;
Second control module, be used for when described USB device after the state of described second operating system is set to described second state, control the state of the described USB device of described first state set unit in described second operating system and be set to described first state.
8. the electronic system of hybrid terminal according to claim 7 is characterized in that, also comprises:
Second judging unit is used for judging whether described USB device occurs obtaining second judged result unusually at the state of described second operating system;
The 3rd control module, being used for representing described USB device when described second judged result occurs controlling the state of the described USB device of described second state set unit in described second operating system and being set to described second state when unusual at the state of described second operating system.
CN201110460323.5A 2011-12-31 2011-12-31 A kind of USB device shares the electronic system of method and mixed architecture Active CN103186499B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201110460323.5A CN103186499B (en) 2011-12-31 2011-12-31 A kind of USB device shares the electronic system of method and mixed architecture

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201110460323.5A CN103186499B (en) 2011-12-31 2011-12-31 A kind of USB device shares the electronic system of method and mixed architecture

Publications (2)

Publication Number Publication Date
CN103186499A true CN103186499A (en) 2013-07-03
CN103186499B CN103186499B (en) 2015-11-25

Family

ID=48677670

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201110460323.5A Active CN103186499B (en) 2011-12-31 2011-12-31 A kind of USB device shares the electronic system of method and mixed architecture

Country Status (1)

Country Link
CN (1) CN103186499B (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027900A1 (en) * 2003-04-18 2005-02-03 Nextio Inc. Method and apparatus for a shared I/O serial ATA controller
CN101751349A (en) * 2008-12-01 2010-06-23 海华科技股份有限公司 Virtual USB interface coding method and computer readable medium thereof

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20050027900A1 (en) * 2003-04-18 2005-02-03 Nextio Inc. Method and apparatus for a shared I/O serial ATA controller
CN101751349A (en) * 2008-12-01 2010-06-23 海华科技股份有限公司 Virtual USB interface coding method and computer readable medium thereof

Also Published As

Publication number Publication date
CN103186499B (en) 2015-11-25

Similar Documents

Publication Publication Date Title
CN103294545B (en) Method for switching dual operating systems and electronic device
CN102104936B (en) Method for switching system states and portable terminal
EP2938137A1 (en) Power management method and apparatus for network access module
CN103631359A (en) Information processing method and electronic equipment
CN102917095A (en) Method and device for testing terminal based on Android
CN103902316A (en) Switching method and electronic device
CN104516747A (en) System switching method and electronic device
CN105446916B (en) USB bus state switching method and device
CN104460935A (en) Information processing method and electronic equipment
CN102955560A (en) Application program processing method and device
CN110618672A (en) Interface circuit and interface communication method and device thereof
JP2015170292A (en) semiconductor device
CN103902322A (en) System switching method and electronic equipment
CN103902011A (en) Electronic device controlling method and electronic device
CN103853516A (en) Electronic equipment and switching method
CN112134337A (en) Power adapter, terminal device, electronic device and charging control method thereof
CN104461717A (en) Information processing method and electronic equipment
CN103105920A (en) Energy-saving system and energy-saving method
CN104462010A (en) Electronic equipment and state control method
CN103902324A (en) System starting method and electronic equipment
CN103164223A (en) Method of intelligent terminal capable of achieving alarm clock and intelligent terminal under shutdown state
CN110401939A (en) A kind of low-power consumption bluetooth controller link layer device
CN103257894A (en) Program management method and electronic terminal
CN104076892A (en) Power supply management method and power supply management system
CN104063278A (en) Method and electronic equipment for information processing

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