CN103186499B - A kind of USB device shares the electronic system of method and mixed architecture - Google Patents

A kind of USB device shares the electronic system of method and mixed architecture Download PDF

Info

Publication number
CN103186499B
CN103186499B CN201110460323.5A CN201110460323A CN103186499B CN 103186499 B CN103186499 B CN 103186499B CN 201110460323 A CN201110460323 A CN 201110460323A CN 103186499 B CN103186499 B CN 103186499B
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.)
Active
Application number
CN201110460323.5A
Other languages
Chinese (zh)
Other versions
CN103186499A (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

Abstract

The present invention discloses the electronic system that a kind of USB device shares method and mixed architecture.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 whether the state of described USB device in described second operating system is described second state, obtains the 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.Adopt method of the present invention and electronic system, can guarantee that the USB device shared is in the main system of the electronic system of mixed architecture be consistent from the state system, enables the USB device shared normally use.

Description

A kind of USB device shares 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 shares method and mixed architecture.
Background technology
The electronic system of mixed architecture, is only have on the PC basis of a system existing, embeds the PC of other at least one system.Can work be merged between different system, display one's respective advantages.The electronic system of existing common mixed architecture is integrated with a main system (such as usually, X86 system, adopt windows operating system) and one from system (such as, ARM system, adopt android operating system), main system and can shared device be shared between system, such as, display screen, keyboard, mouse, camera, wireless module etc.
But in the electronic system of the mixed architecture of prior art, the technology of collaborative share is also immature, and especially the technology of sharing of USB device is left to be desired.
Concrete, in prior art, when the electronic system of mixed architecture main system (such as base) with from system (such as pad) both link together integrally use time, require that main system has identical state with from system.Main system with there is from system identical state comprise: identical dormant state and identical wake-up states.For the USB device shared, 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 not enabled state from system.Such electronic system could normal work.
But, in prior art, share USB device, main system with from system, during Synchronization Status Message, usually there is the situation of synchronization failure, cause USB device normally to use, time serious, also can cause system blue screen.
Summary of the invention
The object of this invention is to provide the electronic system that a kind of USB device shares method and mixed architecture, can guarantee that the USB device shared is in the main system of the electronic system of mixed architecture be consistent from the state system, enables the USB device shared normally use.
For achieving the above object, the invention provides following scheme:
A kind of USB device shares method, be applied to the electronic system of mixed architecture, described electronic system comprises running to be had the first electronic equipment of the first operating system and runs the second electronic equipment having the second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has the first state and the second state in described first operating system and described second operating system, described in described first state representation, USB device is in initiate mode, described in described second state representation, USB device is in not enabled state, in described first operating system and described second operating system, all there is dormant state and wake-up states,
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 whether the state of described USB device in described second operating system is described second state, obtains the 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, what obtain described first operating system generation wakes instruction up; 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 is connected with described second electronic equipment, the state of described USB device in described second operating system is set to described second state;
After the state of described USB device in described second operating system is set to described second state, the state of described USB device in described second operating system is set to described first state.
Preferably, before the state of described USB device in described second operating system is set to described second state, also comprise:
Judge whether the state of described USB device in described second operating system occurs exception, obtains the second judged result;
When described second judged result represents that the state of described USB device in described second operating system occurs abnormal, return the step performing and the state of described USB device in described second operating system is set to described second state.
A kind of electronic system of mixed architecture, described electronic system comprises running to be had the first electronic equipment of the first operating system and runs the second electronic equipment having the second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has the first state and the second state in described first operating system and described second operating system, described in described first state representation, USB device is in initiate mode, described in described second state representation, USB device is in not enabled state, in described first operating system and described second operating system, all there is dormant state and wake-up states,
Described electronic system comprises:
Dormancy instruction fetch unit, 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, for being set to described second state by the state of described USB device in described second operating system;
First judging unit, for judging whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
Dormant state control module, during for representing that the state of described USB device in 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, for when described first operating system and described second operating system are in described dormant state, what obtain described first operating system generation wakes instruction up; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
Second operating system wakeup unit, for waking described second operating system up;
First state set unit, for being set to described first state by the state of described USB device in described second operating system.
Preferably, also comprise:
First control module, for when described first electronic equipment is connected with described second electronic equipment, controls described second state set unit and the state of described USB device in described second operating system is set to described second state;
Second control module, for after the state of described USB device in described second operating system is set to described second state, controls described first state set unit and the state of described USB device in described second operating system is set to described first state.
Preferably, also comprise:
Second judging unit, for judging whether the state of described USB device in described second operating system occurs exception, obtains the second judged result;
3rd control module, during for representing that when described second judged result the state of described USB device in described second operating system occurs abnormal, controlling described second state set unit and the state of described USB device in described second operating system is set to described second state.
According to specific embodiment provided by the invention, the invention discloses following technique effect:
USB device of the present invention shares the electronic equipment of method and mixed architecture, by judging whether the state of shared USB device in described second operating system is the 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, the process that the first operating system enters dormant state can be first interrupted in sequential, setting completed to wait for the status information of the USB device in the second operating system, control two Whole Equipments again and enter dormant state, and then can guarantee that the USB device shared is in the main system of the electronic system of mixed architecture be consistent from the state system, the USB device shared normally is used.
Accompanying drawing explanation
In order to be illustrated more clearly in the embodiment of the present invention or technical scheme of the prior art, be briefly described to the accompanying drawing used required in embodiment below, apparently, accompanying drawing in the following describes is only some embodiments of the present invention, for those of ordinary skill in the art, under the prerequisite not paying creative work, other accompanying drawing can also be obtained according to these accompanying drawings.
Fig. 1 is the process flow diagram that USB device of the present invention shares embodiment of the method 1;
Fig. 2 is the process flow diagram that USB device of the present invention shares embodiment of the method 2;
Fig. 3 is the process flow diagram that USB device of the present invention shares embodiment of the method 3;
Fig. 4 is the process flow diagram that USB device of the present invention shares embodiment of the method 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 present invention, be clearly and completely described the technical scheme in the embodiment of the present invention, obviously, described embodiment is only the present invention's part embodiment, instead of whole embodiments.Based on the embodiment in the present invention, those of ordinary skill in the art, not making the every other embodiment obtained under creative work prerequisite, belong to the scope of protection of the invention.
For enabling above-mentioned purpose of the present invention, feature and advantage become apparent more, and below in conjunction with the drawings and specific embodiments, the present invention is further detailed explanation.
USB device of the present invention shares method, be applied to the electronic system of mixed architecture, described electronic system comprises running to be had the first electronic equipment of the first operating system and runs the second electronic equipment having the second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has the first state and the second state in described first operating system and described second operating system, described in described first state representation, USB device is in initiate mode, described in described second state representation, USB device is in not enabled state, in described first operating system and described second operating system, all there is dormant state and wake-up states.
Fig. 1 is the process flow diagram that USB device of the present invention shares embodiment of the method 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, the mode intercepting and capturing the dormancy instruction that described first operating system produces can be adopted.After intercepting and capturing the dormancy instruction of the first operating system generation, the first operating system switches to dormant state process according to this dormancy instruction can be interrupted, wait for that the state of described USB device in described second operating system is after described second state, then control the first operating system 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, the information of USB device in the second operating system can be set to not enabled, make the second operating system think that USB device is unloaded.
S103: judge whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
In this step, the instruction of the status information about USB device that can be sent by reception second operating system, judges whether the state of described USB device in described second operating system has been set to described second state.
S104: when described first judged result represents that the state of described USB device in described second operating system is described second state, controls described first operating system and described second operating system enters described dormant state.
In the present embodiment, the first operating system can be the operating system of main system, and the second operating system can be the operating system from system.
The applicant of the application is through conscientiously studying, find in prior art, the USB device shared, in main system with from system during Synchronization Status Message, usually occur that the reason of the situation of synchronization failure is: main system is different from the hardware configuration from system, the hardware configuration of usual main system is higher, lower from the hardware configuration of system.When processing same task, main system can be disposed than from System Priority.For the USB device shared, when two systems all will enter dormant state as a whole, the initiate mode information of USB device also needs to be set to not enabled in two systems.Because main system is faster than the processing speed from system, so be not also able to do in time the initiate mode of USB device to be set to not enabled from system, main system just controls to enter dormant state together from system, causes occurring abnormal from the state of the USB device of system.
The USB device of the present embodiment shares method, by judging whether the state of shared USB device in described second operating system is the 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, the process that the first operating system enters dormant state can be first interrupted in sequential, setting completed to wait for the status information of the USB device in the second operating system, control two Whole Equipments again and enter dormant state, and then can guarantee that the USB device shared is in the main system of the electronic system of mixed architecture be consistent from the state system, the USB device shared normally is used.
Fig. 2 is the process flow diagram that USB device of the present invention shares embodiment of the method 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 whether the state of described USB device in described second operating system is described second state, obtains the 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, controls 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, what obtain described first operating system generation wakes instruction up; 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 the first operating system and the second operating system up, the state of described USB device in described second operating system is set to described first state (initiate mode), when can ensure that the first operating system and the second operating system are waken up as a whole, the state of the USB device shared in the second operating system for enabling, and then can ensure that shared USB device can normally use.
Fig. 3 is the process flow diagram that USB device of the present invention shares embodiment of the method 3.As shown in Figure 3, the method comprising the steps of:
S301: when described first electronic equipment is connected with described second electronic equipment, is set to described second state by the state of described USB device in described second operating system;
S302: after the state of described USB device in described second operating system is set to described second state, is set to described first state by the state of described USB device in described second operating system.
Step S301 and step S302 is equivalent to simulate the process that USB device is extracted from USB interface and inserted, and the driver namely first unloading this USB device installs the driver of this USB device again.
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 whether the state of described USB device in described second operating system is described second state, obtains the 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, controls described first operating system and described second operating system enters described dormant state.
When the first electronic equipment is separated use with the second electronic equipment, may change about the status information of shared USB device in the second electronic equipment.In order to avoid this change, in the present embodiment, when detecting that the first electronic equipment is connected with the second electronic equipment, can by the state of described USB device in described second operating system be first set to described second state, be set to described first state again, be equivalent to extracting and insertion process of a simulation USB device, and then when the first electronic equipment can be avoided to be connected with the second electronic equipment, the abnormal electronic system entirety that causes of the status information due to the shared USB device of the second electronic equipment occurs extremely.
Fig. 4 is the process flow diagram that USB device of the present invention shares embodiment of the method 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, judges whether the state of described USB device in described second operating system occurs exception; If so, then step S402 is performed; Otherwise, perform 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 is set to described second state, is set to described first state by the state of described USB device in described second operating system.
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 whether the state of described USB device in described second operating system is described second state, obtains the 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, controls described first operating system and described second operating system enters described dormant state.
In the present embodiment, when detecting that the first electronic equipment is connected with the second electronic equipment, first can judge whether occur abnormal (such as whether with the status information accordance in the first electronic equipment) about the status information of shared USB device in the second electronic equipment, if there is exception, then by the state of described USB device in described second operating system is first set to described second state, be set to described first state again, extracting and insertion process of a simulation USB device, and then when the first electronic equipment can be avoided to be connected with the second electronic equipment, the abnormal electronic system entirety that causes of status information due to the shared USB device of the second electronic equipment occurs extremely, if not there is exception, then skip over step S402 and S403, can step be simplified, improve running efficiency of system.
The invention also discloses a kind of electronic system of mixed architecture.Described electronic system comprises running to be had the first electronic equipment of the first operating system and runs the second electronic equipment having the second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has the first state and the second state in described first operating system and described second operating system, described in described first state representation, USB device is in initiate mode, described in described second state representation, USB device is in not enabled state, in described first operating system and described second operating system, all there is dormant state and wake-up states.
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, 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, for being set to described second state by the state of described USB device in described second operating system;
First judging unit 503, for judging whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
Dormant state control module 504, during for representing that the state of described USB device in 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 the present embodiment, by judging whether the state of shared USB device in described second operating system is the 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, the process that the first operating system enters dormant state can be first interrupted in sequential, setting completed to wait for the status information of the USB device in the second operating system, control two Whole Equipments again and enter dormant state, and then can guarantee that the USB device shared is in the main system of the electronic system of mixed architecture be consistent from the state system, the USB device shared normally is used.
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, 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, for being set to described second state by the state of described USB device in described second operating system;
First judging unit 503, for judging whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
Dormant state control module 504, during for representing that the state of described USB device in 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, for when described first operating system and described second operating system are in described dormant state, what obtain described first operating system generation wakes instruction up; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
Second operating system wakeup unit 602, for waking described second operating system up;
First state set unit 603, for being set to described first state by the state of described USB device in described second operating system.
In the present embodiment, when waking the first operating system and the second operating system up, the state of described USB device in described second operating system is set to described first state (initiate mode), when can ensure that the first operating system and the second operating system are waken up as a whole, the state of the USB device shared in the second operating system for enabling, and then can ensure 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, for when described first electronic equipment is connected with described second electronic equipment, controls described second state set unit and the state of described USB device in described second operating system is set to described second state;
Second control module 702, for after the state of described USB device in described second operating system is set to described second state, controls described first state set unit and the state of described USB device in described second operating system is set to described first state.
Dormancy instruction fetch unit 501, 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, for being set to described second state by the state of described USB device in described second operating system;
First judging unit 503, for judging whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
Dormant state control module 504, during for representing that the state of described USB device in 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 the first electronic equipment is separated use with the second electronic equipment, may change about the status information of shared USB device in the second electronic equipment.In order to avoid this change, in the present embodiment, when detecting that the first electronic equipment is connected with the second electronic equipment, can by the state of described USB device in described second operating system be first set to described second state, be set to described first state again, be equivalent to extracting and insertion process of a simulation USB device, and then when the first electronic equipment can be avoided to be connected with the second electronic equipment, the abnormal electronic system entirety that causes of the status information due to the shared USB device of the second electronic equipment occurs extremely.
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, for judging whether the state of described USB device in described second operating system occurs exception, obtains the second judged result;
3rd control module 802, during for representing that when described second judged result the state of described USB device in described second operating system occurs abnormal, controlling described second state set unit and the state of described USB device in described second operating system is set to described second state.
First control module 701, for when described first electronic equipment is connected with described second electronic equipment, controls described second state set unit and the state of described USB device in described second operating system is set to described second state;
Second control module 702, for after the state of described USB device in described second operating system is set to described second state, controls described first state set unit and the state of described USB device in described second operating system is set to described first state.
Dormancy instruction fetch unit 501, 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, for being set to described second state by the state of described USB device in described second operating system;
First judging unit 503, for judging whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
Dormant state control module 504, during for representing that the state of described USB device in 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 that the first electronic equipment is connected with the second electronic equipment, first can judge whether occur abnormal (such as whether with the status information accordance in the first electronic equipment) about the status information of shared USB device in the second electronic equipment, if there is exception, then by the state of described USB device in described second operating system is first set to described second state, be set to described first state again, extracting and insertion process of a simulation USB device, and then when the first electronic equipment can be avoided to be connected with the second electronic equipment, the abnormal electronic system entirety that causes of status information due to the shared USB device of the second electronic equipment occurs extremely, if not there is exception, then skip over and the state of described USB device in described second operating system is set to described second state, then be set to the step of described first state, can step be simplified, improve running efficiency of system.
Finally, also it should be noted that, in this article, the such as relational terms of first and second grades and so on is only used for an entity or operation to separate with another entity or operational zone, and not necessarily requires or imply the relation that there is any this reality between these entities or operation or sequentially.And, term " comprises ", " comprising " or its any other variant are intended to contain comprising of nonexcludability, thus make to comprise the process of a series of key element, method, article or equipment and not only comprise those key elements, but also comprise other key elements clearly do not listed, or also comprise by the intrinsic key element of this process, method, article or equipment.When not more restrictions, the key element limited by statement " comprising ... ", and be not precluded within process, method, article or the equipment comprising described key element and also there is other identical element.
Through the above description of the embodiments, those skilled in the art can be well understood to the mode that the present invention can add required hardware platform by software and realize, can certainly all be implemented by hardware, but in a lot of situation, the former is better embodiment.Based on such understanding, what technical scheme of the present invention contributed to background technology can embody with the form of software product in whole or in part, this computer software product can be stored in storage medium, as ROM/RAM, magnetic disc, CD etc., comprising some instructions in order to make a computer equipment (can be personal computer, server, or the network equipment etc.) perform the method described in some part of each embodiment of the present invention or embodiment.
In this instructions, each embodiment adopts the mode of going forward one by one to describe, and what each embodiment stressed is the difference with other embodiments, between each embodiment identical similar portion mutually see.For the electronic system of mixed architecture disclosed in embodiment, because it corresponds to the method disclosed in Example, so description is fairly simple, relevant part illustrates see method part.
Apply specific case herein to set forth principle of the present invention and embodiment, the explanation of above embodiment just understands method of the present invention and core concept thereof for helping; Meanwhile, for one of ordinary skill in the art, according to thought of the present invention, all will change in specific embodiments and applications.In sum, this description should not be construed as limitation of the present invention.

Claims (8)

1. a USB device shares method, it is characterized in that, be applied to the electronic system of mixed architecture, described electronic system comprises running to be had the first electronic equipment of the first operating system and runs the second electronic equipment having the second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has the first state and the second state in described first operating system and described second operating system, described in described first state representation, USB device is in initiate mode, described in described second state representation, USB device is in not enabled state, in described first operating system and described second operating system, all there is dormant state and wake-up states,
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 whether the state of described USB device in described second operating system is described second state, obtains the 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, what obtain described first operating system generation wakes instruction up; 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 is connected with described second electronic equipment, the state of described USB device in described second operating system is set to described second state;
After the state of described USB device in described second operating system is set to described second state, the state of described USB device in described second operating system is set to described first state.
4. method according to claim 3, is characterized in that, before the state of described USB device in described second operating system is set to described second state, also comprises:
Judge whether the state of described USB device in described second operating system occurs exception, obtains the second judged result;
When described second judged result represents that the state of described USB device in described second operating system occurs abnormal, return the step performing and the state of described USB device in described second operating system is set to described second state.
5. the electronic system of a mixed architecture, it is characterized in that, described electronic system comprises running to be had the first electronic equipment of the first operating system and runs the second electronic equipment having the second operating system, described first electronic equipment and described second electronic equipment have shared USB device, described USB device all has the first state and the second state in described first operating system and described second operating system, described in described first state representation, USB device is in initiate mode, described in described second state representation, USB device is in not enabled state, in described first operating system and described second operating system, all there is dormant state and wake-up states,
Described electronic system comprises:
Dormancy instruction fetch unit, 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, for being set to described second state by the state of described USB device in described second operating system;
First judging unit, for judging whether the state of described USB device in described second operating system is described second state, obtains the first judged result;
Dormant state control module, during for representing that the state of described USB device in 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 mixed architecture according to claim 5, is characterized in that, also comprises:
Wake instruction fetch unit up, for when described first operating system and described second operating system are in described dormant state, what obtain described first operating system generation wakes instruction up; Describedly wake instruction up and be used to indicate described first operating system and switch to described wake-up states by described dormant state;
Second operating system wakeup unit, for waking described second operating system up;
First state set unit, for being set to described first state by the state of described USB device in described second operating system.
7. the electronic system of mixed architecture according to claim 6, is characterized in that, also comprises:
First control module, for when described first electronic equipment is connected with described second electronic equipment, controls described second state set unit and the state of described USB device in described second operating system is set to described second state;
Second control module, for after the state of described USB device in described second operating system is set to described second state, controls described first state set unit and the state of described USB device in described second operating system is set to described first state.
8. the electronic system of mixed architecture according to claim 7, is characterized in that, also comprises:
Second judging unit, for judging whether the state of described USB device in described second operating system occurs exception, obtains the second judged result;
3rd control module, during for representing that when described second judged result the state of described USB device in described second operating system occurs abnormal, controlling described second state set unit and the state of described USB device in described second operating system is set to described second state.
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 CN103186499A (en) 2013-07-03
CN103186499B true 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 (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN101751349A (en) * 2008-12-01 2010-06-23 海华科技股份有限公司 Virtual USB interface coding method and computer readable medium thereof

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7664909B2 (en) * 2003-04-18 2010-02-16 Nextio, Inc. Method and apparatus for a shared I/O serial ATA controller

Patent Citations (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
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
CN103186499A (en) 2013-07-03

Similar Documents

Publication Publication Date Title
CN102326132B (en) Power management to maximize reduced power state for virtual machine platforms
CN102104936B (en) Method for switching system states and portable terminal
CN103473142A (en) Virtual machine transferring method and device under cloud computing operating system
CN110493892B (en) Network connection method and device, storage medium and communication terminal
CN102917095A (en) Method and device for testing terminal based on Android
CN101883003A (en) Mandatory running method of computer operating system
CN103294428A (en) Information display method and electronic equipment
CN103559055A (en) Activity starting method and device applied to Android platform
CN111881637B (en) Method, system and storage medium for optimizing power consumption of digital circuit
CN105468433A (en) Method and system for acquiring disc data of virtual machines
CN103902011A (en) Electronic device controlling method and electronic device
CN105573777A (en) Control method and devicefor service in application
CN102999252B (en) A kind of method of unlock interface application prestrain, device and terminal
CN103853516A (en) Electronic equipment and switching method
CN102541499B (en) The management process of local computer equipment and device
CN103873516A (en) HA method and system for improving usage rate of physical servers in cloud computing resource pool
CN109542829B (en) Control method and device of GPU (graphics processing Unit) equipment in multiple systems and electronic equipment
CN105279077A (en) Method and device for automated testing
CN103186499B (en) A kind of USB device shares the electronic system of method and mixed architecture
CN103164223A (en) Method of intelligent terminal capable of achieving alarm clock and intelligent terminal under shutdown state
CN104076892A (en) Power supply management method and power supply management system
CN103257894A (en) Program management method and electronic terminal
CN109981798A (en) A kind of method for writing data, system and electronic equipment and storage medium
CN104951346A (en) Process management method for embedded system as well as system
CN103164178B (en) Display packing and electronic equipment

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