CN105183309B - Method for handover control and device - Google Patents
Method for handover control and device Download PDFInfo
- Publication number
- CN105183309B CN105183309B CN201510498331.7A CN201510498331A CN105183309B CN 105183309 B CN105183309 B CN 105183309B CN 201510498331 A CN201510498331 A CN 201510498331A CN 105183309 B CN105183309 B CN 105183309B
- Authority
- CN
- China
- Prior art keywords
- interface
- electronic equipment
- usb type
- slave mode
- master slave
- 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
Links
Landscapes
- User Interface Of Digital Computer (AREA)
Abstract
Present disclose provides method for handover control and devices, wherein the described method includes: obtaining the current master slave mode of the first electronic equipment when detecting that the first USB Type-C interface is connect with the 2nd USB Type-C interface of the second electronic equipment;The sliding block icon being activated is shown by graphic user interface GUI;When detecting contact information on sliding block icon, switch the master slave mode of the first electronic equipment.In the disclosure, when detecting contact information on the sliding block icon shown in gui interface, the first electronic equipment automatically switches master slave mode, realizes the purpose of controlling electronic devices master slave mode switching, the user experience is improved.
Description
Technical field
This disclosure relates to field of communication technology more particularly to method for handover control and device.
Background technique
General-purpose serial bus USB Type-C is referred to as USB-C, it is the specification of a kind of novel USB cable and connector,
A whole set of completely new USB physical specification including connector, port, container and cable etc. is defined, is 3.0 interface of USB
A part.The following Type-C to Type-C interface, i.e., direct-connected both ends are all Type-C interfaces, are become in the future increasingly
It is popular.
But in the related technology, when two electronic equipments by Type-C interface it is direct-connected when, main equipment and from equipment be with
What machine defined, and once it is determined that just can not arbitrarily change.
Summary of the invention
In view of this, present disclose provides method for handover control and device, to solve two electronic equipments in the related technology
By Type-C interface it is direct-connected after, the problem of master slave mode can not be changed.
According to the first aspect of the embodiments of the present disclosure, a kind of method for handover control is provided, which is characterized in that the method is used
In the first electronic equipment, first electronic equipment has the first general-purpose serial bus USB Type-C interface, the method packet
It includes:
When detecting that the first USB Type-C interface connect with the 2nd USB Type-C interface of the second electronic equipment
When, obtain the current master slave mode of first electronic equipment;
The sliding block icon being activated is shown by graphic user interface GUI;
When detecting contact information on the sliding block icon, switch principal and subordinate's shape of first electronic equipment
State.
Optionally, the master slave mode of switching first electronic equipment includes:
The level for changing the mark ID pin in the first USB Type-C interface, passes through the first USB Type-C
After being enumerated between interface and the 2nd USB Type-C interface, switch principal and subordinate's shape of first electronic equipment
State.
Optionally, described when detecting contact information on the sliding block icon, the method also includes:
The first control instruction is sent to the 2nd USB Type-C interface by the first USB Type-C interface, is made
Obtain the master slave mode that second electronic equipment switches itself according to first control instruction.
Optionally, after the current master slave mode for obtaining first electronic equipment, the method also includes:
It receives second electronic equipment and the first USB Type- is sent to by the 2nd USB Type-C interface
Second control instruction of C interface;
According to second control instruction, switch the master slave mode of first electronic equipment.
Optionally, the method also includes:
The master slave mode is shown on the gui interface.
Optionally, the method also includes:
When the connection for detecting the first USB Type-C the interface disconnection and the 2nd USB Type-C interface
When, not-connected status is shown on the gui interface.
Optionally, when the institute for detecting the first USB Type-C the interface disconnection and the 2nd USB Type-C interface
When stating connection, the method also includes:
Lock the sliding block icon.
According to the second aspect of an embodiment of the present disclosure, a kind of switching control is provided, described device is used for the first electronics
Equipment, first electronic equipment have the first general-purpose serial bus USB Type-C interface, and described device includes:
Module is obtained, for as the 2nd USB for detecting the first USB Type-C interface and the second electronic equipment
When Type-C interface connects, the current master slave mode of first electronic equipment is obtained;
Display module, for showing the sliding block icon being activated by graphic user interface GUI;
First switching module, for switching first electronics when detecting contact information on the sliding block icon
The master slave mode of equipment.
Optionally, first switching module includes:
Switching submodule, the level of the mark ID pin for changing in the first USB Type-C interface, passes through institute
It states after being enumerated between the first USB Type-C interface and the 2nd USB Type-C interface, switches first electronics and set
The standby master slave mode.
Optionally, described device further include:
Sending module, for sending the first control instruction to the 2nd USB by the first USB Type-C interface
Type-C interface, so that second electronic equipment switches the master slave mode of itself according to first control instruction.
Optionally, described device further include:
Receiving module is sent to for receiving second electronic equipment by the 2nd USB Type-C interface described
Second control instruction of the first USB Type-C interface;
Second switching module, for switching the principal and subordinate of first electronic equipment according to second control instruction
State.
Optionally, described device further include:
First display module, for showing the master slave mode on the gui interface.
Optionally, described device further include:
Second display module detects that the first USB Type-C interface disconnects and the 2nd USB for working as
When the connection of Type-C interface, not-connected status is shown on the gui interface.
Optionally, described device further include:
Locking module detects that the first USB Type-C interface disconnection connects with the 2nd USB Type-C for working as
When the connection of mouth, the sliding block icon is locked.
According to the third aspect of an embodiment of the present disclosure, a kind of switching control is provided, the first electronic equipment is used for, it is described
First electronic equipment has the first general-purpose serial bus USB Type-C interface, comprising: processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
When detecting that the first USB Type-C interface connect with the 2nd USB Type-C interface of the second electronic equipment
When, obtain the current master slave mode of first electronic equipment;
The sliding block icon being activated is shown by graphic user interface GUI;
When detecting contact information on the sliding block icon, switch principal and subordinate's shape of first electronic equipment
State.
The technical scheme provided by this disclosed embodiment can include the following benefits:
In the embodiment of the present disclosure, when the first electronic equipment and the second electronic equipment pass through respective USB Type-C interface company
When connecing, whether there is contact information on the sliding block icon that the gui interface that the first electronic equipment detects first electronic equipment is shown,
When detecting contact information on the sliding block icon, first electronic equipment carries out master slave mode switching automatically, realizes
The purpose of controlling electronic devices master slave mode switching, the user experience is improved.
In the embodiment of the present disclosure, can real-time display electronic equipment is presently on the gui interface master slave mode,
Facilitate user freely to choose and whether carry out master slave mode switching, user experience is good.
In the embodiment of the present disclosure, user only needs to click sliding block icon on the gui interface of any one electronic equipment, just
It can control the free switching for carrying out master slave mode automatically by two electronic equipments that Type-C interface connects, it is easy to operate,
User experience is good.
Detailed description of the invention
The drawings herein are incorporated into the specification and forms part of this specification, and shows the implementation for meeting the disclosure
Example, and together with specification for explaining the principles of this disclosure.
Fig. 1 is a kind of disclosure method for handover control flow chart shown according to an exemplary embodiment;
Fig. 2 is the disclosure another method for handover control flow chart shown according to an exemplary embodiment;
Fig. 3 A-3C is the signal of the gui interface during disclosure switching control shown according to an exemplary embodiment
Figure;
Fig. 4 is the disclosure another method for handover control flow chart shown according to an exemplary embodiment;
Fig. 5 is a kind of disclosure switching control block diagram shown according to an exemplary embodiment;
Fig. 6 is the disclosure another switching control block diagram shown according to an exemplary embodiment;
Fig. 7 is the disclosure another switching control block diagram shown according to an exemplary embodiment;
Fig. 8 is the disclosure another switching control block diagram shown according to an exemplary embodiment;
Fig. 9 is the disclosure another switching control block diagram shown according to an exemplary embodiment;
Figure 10 is the disclosure another switching control block diagram shown according to an exemplary embodiment;
Figure 11 is the disclosure another switching control block diagram shown according to an exemplary embodiment;
Figure 12 is an a kind of disclosure structural representation for switching control shown according to an exemplary embodiment
Figure.
Specific embodiment
Example embodiments are described in detail here, and the example is illustrated in the accompanying drawings.Following description is related to
When attached drawing, unless otherwise indicated, the same numbers in different drawings indicate the same or similar elements.Following exemplary embodiment
Described in embodiment do not represent all implementations consistent with this disclosure.On the contrary, they be only with it is such as appended
The example of the consistent device and method of some aspects be described in detail in claims, the disclosure.
It is only to be not intended to be limiting the disclosure merely for for the purpose of describing particular embodiments in the term that the disclosure uses.
The "an" of the singular used in disclosure and the accompanying claims book, " described " and "the" are also intended to including majority
Form, unless the context clearly indicates other meaning.It is also understood that term "and/or" used herein refers to and wraps
It may be combined containing one or more associated any or all of project listed.
It will be appreciated that though various information, but this may be described using term first, second, third, etc. in the disclosure
A little information should not necessarily be limited by these terms.These terms are only used to for same type of information being distinguished from each other out.For example, not departing from
In the case where disclosure range, the first information can also be referred to as the second information, and similarly, the second information can also be referred to as
One information.Depending on context, word as used in this " if " can be construed to " ... when " or " when ...
When " or " in response to determination ".
As shown in Figure 1, Fig. 1 is a kind of method for handover control shown according to an exemplary embodiment, the method is used for
First electronic equipment, wherein first electronic equipment has the first general-purpose serial bus USB Type-C interface, including following
Step:
In a step 101, as the 2nd USB for detecting the first USB Type-C interface and the second electronic equipment
When Type-C interface connects, the current master slave mode of first electronic equipment is obtained.
Electronic equipment involved in the embodiment of the present disclosure can be the various equipment for being provided with USB Type-C interface, example
Such as, smart phone, tablet computer, personal digital assistant (Personal Digital Assistant, PDA) etc..
In this step, the first electronic equipment can be detected by the relevant technologies itself the first USB Type-C interface whether
It is connect with the 2nd USB Type-C interface of the second electronic equipment, when having been set up the connection, obtains current random point
The master slave mode of first electronic equipment described in dispensing.Principal and subordinate locating for presently described first electronic equipment is understood for the ease of user
State, it is alternatively possible to show the master slave mode on the gui interface of first electronic equipment.
In the embodiment of the present disclosure, user can switch first electronics by any one in following two mode
The master slave mode of equipment.
<mode one>initiates switching by the first electronic equipment
In a step 102, the sliding block icon being activated is shown by graphic user interface gui interface.
In this step, when detecting that the first electronic equipment is connect with the second electronic equipment by USB Type-C interface,
The sliding block icon is activated, and the sliding block icon being activated is shown by the gui interface.
In order to promote user experience, it is alternatively possible to while showing the sliding block icon on the gui interface,
The master slave mode that first electronic equipment is presently in is shown around the sliding block icon.Such as in the sliding block icon
The left side show the master slave mode.
In step 103, when detecting contact information on the sliding block icon, switch first electronic equipment
The master slave mode.
In this step, first electronic equipment can be detected on the sliding block icon by the relevant technologies with the presence or absence of touching
Point information, when the user clicks when the sliding block icon, first electronic equipment detects the contact information, at this time can be with
By the level for the mark ID pin changed in the first USB Type-C interface, in the first USB Type-C interface and
After being enumerated between the 2nd USB Type-C interface, first electronic equipment is allowed to carry out the switching of master slave mode.
In the related technology, generally defaulting the mark ID pin level is 1, is in pull-up state.When two electronic equipments
ID when being connected by USB Type-C interface, in the electronic equipment drop-down USB Type-C interface in master status
Pin, level are changed to 0;In electric from the mark ID pin in the electronic equipment USB Type-C interface of equipment state
It puts down constant.
When needing to carry out master slave mode switching, the electronic equipment pull-up USB Type-C in master status is connect before
The ID pin in mouthful, level are changed to 1;Meanwhile it being in front of from the electronic equipment of equipment state and pulling down USB Type-
The ID pin in C interface, level are changed to 0, will do it and enumerate between the USB Type-C interface of two electronic equipments,
To complete the switching of master-slave equipment state.In the embodiment of the present disclosure, the first electronic equipment can be led in the above manner
From the switching of state.
First electronic equipment, equally can be in the GUI of first electronic equipment after switching master slave mode
Show that the current master slave mode of first electronic equipment optionally shows institute around the sliding block icon on interface
Master slave mode is stated, so that user confirms the state that first electronic equipment is presently in.
Additionally, it should be noted that, when first electronic equipment and second electronic equipment pass through USB Type-C
When interface connects and is randomly assigned master slave mode, it is assumed that first electronic equipment is in master status, and at this time described second
Electronic equipment is in from equipment state.If user clicks the cunning shown on the gui interface of first electronic equipment
Block icon, need by first electronic equipment by the master status switch to it is described from equipment state when, accordingly, institute
The second electronic equipment is stated to be also required to switch the master status from equipment state by described.Examined when on the sliding block icon
When measuring contact information, while executing the step 103, the method also includes (not shown in figure 1)s:
At step 104, the first control instruction is sent to the 2nd USB by the first USB Type-C interface
Type-C interface, so that second electronic equipment switches the master slave mode of itself according to first control instruction.
When the user clicks when the sliding block icon, while the first electronic equipment carries out master slave mode switching, described the
One electronic equipment can send the first control instruction to second electronic equipment by the first USB Type-C interface of itself
2nd USB Type-C interface, second electronic equipment pass through above-mentioned principal and subordinate's shape when receiving first control instruction
State switching mode, which synchronizes, to be switched over.
In aforesaid way, user is controlled two electronic equipments by the operation to first electronic equipment and carries out principal and subordinate
The switching of state.In the embodiments of the present disclosure, user can also control two by the operation to second electronic equipment
Electronic equipment carries out master slave mode switching, as follows.
<mode two>initiates switching by the second electronic equipment
After completing the step 101, the method also includes (not shown in figure 1)s:
In step 102 ' in, reception second electronic equipment is sent to described by the 2nd USB Type-C interface
Second control instruction of the first USB Type-C interface.
In this step, second electronic equipment is in the 2nd USB Type-C interface and first electricity for detecting itself
When first USB Type-C interface of sub- equipment establishes connection, the gui interface that again may be by second electronic equipment is aobvious
Show the sliding block icon being activated, and show the current master slave mode of second electronic equipment around the sliding block icon,
In the sliding block icon that shows on the second electronic equipment can be with the sliding block icon that is shown on first electronic equipment
It is identical.
User can click the sliding block icon on the second electronic equipment gui interface, at this time the second electronic equipment
Automatically switch the master slave mode of itself.Meanwhile second electronic equipment can be sent by the 2nd USB Type-C interface
The first USB Type-C interface of second control instruction to first electronic equipment.
Certainly, in this way, first electronic equipment can show the cunning being activated on the gui interface of itself
Block icon, and after showing around the sliding block icon master slave mode that the first electronic equipment is presently in, just receive
Second control instruction.The i.e. described step 102 ' it can just be executed after completing step 102.
In step 103 ', according to second control instruction, switch the master slave mode of first electronic equipment.
First electronic equipment when receiving second control instruction, by above-mentioned master slave mode switching mode into
Row switching.It certainly, equally can be in the first electronic equipment GUI circle when first electronic equipment switches master slave mode
The current master slave mode of first electronic equipment is shown on face.
In addition, in the embodiments of the present disclosure, optionally, once detect the USB of first electronic equipment
It, can be in first electronic equipment when Type-C interface disconnects the connection with the 2nd USB Type-C interface
Not-connected status is shown on gui interface.It is possible to further sliding block icon described in genlocing.
In above-described embodiment, when the first electronic equipment is connect with the second electronic equipment by respective USB Type-C interface
When, user can click on the sliding block icon shown on the gui interface of first electronic equipment or second electronic equipment,
To which two electronic equipments of control are automatically performed the switching of master slave mode, the user experience is improved.
As shown in Fig. 2, Fig. 2 is another method for handover control shown according to an exemplary embodiment, the method is used
In the first electronic equipment, wherein first electronic equipment has the first general-purpose serial bus USB Type-C interface, including with
Lower step:
In step 201, as the 2nd USB for detecting the first USB Type-C interface and the second electronic equipment
When Type-C interface connects, the current master slave mode of first electronic equipment is obtained.
In this step, the first electronic equipment can be detected by the relevant technologies itself the first USB Type-C interface whether
It is connect with the 2nd USB Type-C interface of the second electronic equipment, when having been set up the connection, obtains current random point
The master slave mode of first electronic equipment described in dispensing.
In step 202, the master slave mode is shown on graphic user interface GUI.
First electronic equipment shows the master slave mode according to the relevant technologies on the gui interface, so as to user's decision
Whether need to carry out the switching of master slave mode.
In step 203, the sliding block icon being activated is shown on the gui interface.
In this step, when detecting that the first electronic equipment is connect with the second electronic equipment by USB Type-C interface,
The sliding block icon is activated, and the sliding block icon being activated is shown by the gui interface.
The step 202 synchronous can be executed with the step 203, and first electricity is shown around the sliding block icon
The master slave mode that sub- equipment is presently in.Such as the master slave mode is master status, it at this time can be in the sliding block
The left side of icon shows main equipment, and wherein sliding block is located at the left side of the sliding block icon, as shown in Figure 3A.
In step 204, whether have contact information, detect when on the sliding block icon if detecting on the sliding block icon
It is synchronous to execute step 205 and step 206 when the contact information.
When the user clicks when the sliding block icon, first electronic equipment is by the relevant technologies in the sliding block icon
On detect contact information, at this time determination need to be implemented step 205 to carry out master slave mode switching.
In step 205, switch the master slave mode of first electronic equipment.
It, can be by the level for the mark ID pin changed in the first USB Type-C interface, in institute in this step
It states after being enumerated between the first USB Type-C interface and the 2nd USB Type-C interface, switches first electronics and set
The standby master slave mode.
In step 206, the first control instruction is sent to the 2nd USB by the first USB Type-C interface
Type-C interface, so that second electronic equipment switches the master slave mode of itself according to first control instruction.
When the user clicks when the sliding block icon, the first electronic equipment carries out master slave mode switching simultaneously, and described first
Electronic equipment can send the first control instruction to the of second electronic equipment by the first USB Type-C interface of itself
Two USB Type-C interfaces, second electronic equipment pass through above-mentioned master-slave equipment when receiving first control instruction
State switching mode, which synchronizes, to be switched over.
In step 207, the current master slave mode of first electronic equipment is shown on the gui interface.
First electronic equipment after handover, can equally be shown around the sliding block icon on the gui interface
Show that the current master slave mode, such as first electronic equipment have currently been switched to via master status from equipment shape
State then can show that wherein sliding block is located at the right of the sliding block icon, such as from equipment on the left side of the sliding block icon at this time
Shown in Fig. 3 B.
In a step 208, it is connect with the 2nd USB Type-C when detecting that the first USB Type-C interface is disconnected
When the connection of mouth, not-connected status is shown on the gui interface.
Wherein, the step 208 is not limited to execute after the step 207.In the embodiment of the present disclosure, once it detects
The first USB Type-C interface of first electronic equipment disconnects the company with the 2nd USB Type-C interface
When connecing, so that it may show not-connected status on the gui interface.
In the step 209, when detecting that the first USB Type-C interface disconnects and the 2nd USB Type-
When the connection of C interface, the sliding block icon is locked.
Above-mentioned steps 208 synchronous can be executed with step 209, and first electronic equipment detects the first USB
When Type-C interface disconnects the connection with the 2nd USB Type-C interface, shown on the gui interface not connected
While state, the sliding block icon is locked by the relevant technologies, prevent user carries out master slave mode from sliding slider
Switching, as shown in Figure 3 C.
In above-described embodiment, when the first electronic equipment is connect with the second electronic equipment by respective USB Type-C interface
When, first electronic equipment shows the sliding block icon being activated on gui interface, and detecting whether there is on the sliding block icon
Contact information, when detecting contact information on the sliding block icon, first electronic equipment automatically switches master slave mode,
The first control instruction is sent simultaneously to second electronic equipment, so that second electronic equipment refers to according to first control
Enable the master slave mode of switching itself.In the above process, user only needs to click sliding block icon on the first electronic equipment, so that it may
Control carries out the free switching of master slave mode, easy to operate, user by two electronic equipments that Type-C interface connects automatically
It experiences.
It should be noted that sliding block icon is the mode of switching of horizontally slipping, but is actually being answered in the above embodiments
, can according to actual needs or personalized customization in, setting slides up and down the modes such as switching, tilt slide switching, does not do
It limits.
As shown in figure 4, Fig. 4 is another method for handover control shown according to an exemplary embodiment, the method is used
In the first electronic equipment, wherein first electronic equipment has the first general-purpose serial bus USB Type-C interface, including with
Lower step:
In step 401, as the 2nd USB for detecting the first USB Type-C interface and the second electronic equipment
When Type-C interface connects, the current master slave mode of first electronic equipment is obtained.
In this step, the first electronic equipment can be detected by the relevant technologies itself the first USB Type-C interface whether
It is connect with the 2nd USB Type-C interface of the second electronic equipment, when having been set up the connection, obtains current random point
The master slave mode of first electronic equipment described in dispensing.
In step 402, the master slave mode is shown on graphic user interface GUI.
First electronic equipment shows the master slave mode according to the relevant technologies on the gui interface, so as to user's decision
Whether need to carry out the switching of master slave mode.
In step 403, the sliding block icon being activated is shown on the gui interface.
In this step, when detecting that the first electronic equipment is connect with the second electronic equipment by USB Type-C interface,
The sliding block icon is activated, and the sliding block icon being activated is shown by the gui interface.
The step 402 synchronous can be executed with the step 403, and principal and subordinate's shape is shown around the sliding block icon
State.Such as the master slave mode is master status, it at this time can be on a left side for the sliding block icon of first electronic equipment
Side shows main equipment, as shown in Figure 3A.
Since in the embodiments of the present disclosure, the state switching of the first electronic equipment is controlled by the second electronic equipment, because
This described step 403 can not also execute, i.e., after completing the step 402, directly execute subsequent step 404.
In step 404, reception second electronic equipment is sent to described by the 2nd USB Type-C interface
Second control instruction of the first USB Type-C interface.
In the method, second electronic equipment is in the 2nd USB Type-C interface and first electricity for detecting itself
When first USB Type-C interface of sub- equipment establishes connection, the gui interface that again may be by second electronic equipment is aobvious
Show the sliding block icon being activated, and show the current master slave mode of second electronic equipment around the sliding block icon,
In the sliding block icon that shows on the second electronic equipment can be with the sliding block icon that is shown on first electronic equipment
It is identical.Such as the current master slave mode of second electronic equipment is that can set at this time in second electronics from equipment state
The left side of standby sliding block icon is shown from equipment, as shown in Figure 3B.
User can click the sliding block icon on the second electronic equipment gui interface, at this time the second electronic equipment
The automatic switching for carrying out master slave mode, after switching as shown in Figure 3A.Meanwhile second electronic equipment can pass through described second
USB Type-C interface sends second control instruction to the first USB Type-C interface of first electronic equipment.
In step 405, according to second control instruction, switch the master slave mode of first electronic equipment.
First electronic equipment when receiving second control instruction, by above-mentioned master slave mode switching mode into
Row switching.
In a step 406, the current master slave mode of first electronic equipment is shown on the gui interface.
First electronic equipment after handover, can equally be shown around the sliding block icon on the gui interface
Show that the master slave mode, such as first electronic equipment have currently been switched to via master status from equipment state, then this
When can be shown from equipment, as shown in Figure 3B on the left side of the sliding block icon of first electronic equipment.
In step 407, it is connect with the 2nd USB Type-C when detecting that the first USB Type-C interface is disconnected
When the connection of mouth, not-connected status is shown on the gui interface.
Wherein, the step 407 is equally not limited to execute after the step 406.Once detecting first electricity
When the first USB Type-C interface of sub- equipment disconnects the connection with the 2nd USB Type-C interface, so that it may
Not-connected status is shown on the gui interface of first electronic equipment.
In a step 408, it is connect with the 2nd USB Type-C when detecting that the first USB Type-C interface is disconnected
When the connection of mouth, the sliding block icon is locked.
Above-mentioned steps 407 synchronous can be executed with step 408, and first electronic equipment detects the first USB
When Type-C interface disconnects the connection with the 2nd USB Type-C interface, shown on the gui interface not connected
While state, the sliding block icon is locked by the relevant technologies, as shown in Figure 3 C.
In above-described embodiment, user only needs to click sliding block icon on the second electronic equipment, so that it may which control passes through
Two electronic equipments of Type-C interface connection carry out the free switching of master slave mode automatically, and easy to operate, user experience is good.
Corresponding with aforementioned method for handover control embodiment, the disclosure additionally provides the embodiment of switching control.
As shown in figure 5, Fig. 5 is a kind of disclosure switching control block diagram shown according to an exemplary embodiment, institute
Device is stated for described device for the first electronic equipment, first electronic equipment has the first general-purpose serial bus USB
Type-C interface, described device include: to obtain module 510, output module 520 and the first switching module 530.
Wherein, the acquisition module 510 is configured as to detect the first USB Type-C interface and the second electronics
When the 2nd USB Type-C interface connection of equipment, the current master slave mode of first electronic equipment is obtained;
The output module 520 is configured as showing the sliding block icon being activated by gui interface;
First switching module 530 is configured as when detecting contact information on the sliding block icon, switches institute
State the master slave mode of the first electronic equipment.
In above-described embodiment, when the first electronic equipment is connect with the second electronic equipment by respective USB Type-C interface
When, detection gui interface output sliding block icon on whether there is contact information, when detected on the sliding block icon contact believe
When breath, first electronic equipment carries out the switching of master slave mode automatically, realizes the switching of controlling electronic devices master slave mode
Purpose, the user experience is improved.
As shown in fig. 6, Fig. 6 is the disclosure another switching control block diagram shown according to an exemplary embodiment,
On the basis of aforementioned embodiment illustrated in fig. 5, first switching module 530 includes: the embodiment
Switching submodule 531 is configured as changing the level of the mark ID pin in the first USB Type-C interface,
After being enumerated between the first USB Type-C interface and the 2nd USB Type-C interface, switching described first
The master slave mode of electronic equipment.
In above-described embodiment, electronic equipment can by change USB Type-C interface in mark ID pin level,
After enumerating between two USB Type-C interfaces, controlling electronic devices carries out the switching of master slave mode automatically, improves user
Experience.
As shown in fig. 7, Fig. 7 is the disclosure another switching control block diagram shown according to an exemplary embodiment,
The embodiment is on the basis of aforementioned embodiment illustrated in fig. 5, described device further include: sending module 540.
Wherein, the sending module 540 is configured as sending first by the first USB Type-C interface and controlling referring to
The 2nd USB Type-C interface is enabled, so that second electronic equipment switches itself according to first control instruction
Master slave mode.
In above-described embodiment, the first electronic equipment while carrying out master slave mode switching, control the second electronic equipment into
The corresponding switching of row, so that user only needs to click sliding block icon on the first electronic equipment, so that it may realize that two electronics are set
Standby master slave mode switching, realizes simplicity, user experience is good.
As shown in figure 8, Fig. 8 is the disclosure another switching control block diagram shown according to an exemplary embodiment,
The embodiment is on the basis of aforementioned embodiment illustrated in fig. 5, described device further include: receiving module 550 and the second switching module
560。
Wherein, the receiving module 550 is configured as receiving second electronic equipment and passes through the 2nd USB
Type-C interface is sent to the second control instruction of the first USB Type-C interface;
Second switching module 560 is configured as switching first electronic equipment according to second control instruction
The master slave mode.
In above-described embodiment, user can be sent out when clicking sliding block icon on the second electronic equipment by the second electronic equipment
It send the second control instruction to control first electronic equipment and carries out corresponding master slave mode switching, realize simplicity, user experience is good.
As shown in figure 9, Fig. 9 is the disclosure another switching control block diagram shown according to an exemplary embodiment,
The embodiment is on the basis of aforementioned embodiment illustrated in fig. 5, described device further include: the first display module 570.
Wherein, first display module 570 is configured as showing the master slave mode on the gui interface.
In above-described embodiment, the first electronic equipment described in real-time display it can work as on the gui interface of the first electronic equipment
Preceding state in which, the user experience is improved.
As shown in Figure 10, Figure 10 is the disclosure another switching control frame shown according to an exemplary embodiment
Figure, the embodiment is on the basis of aforementioned embodiment illustrated in fig. 5, described device further include: the second display module 580.
Wherein, second display module 580, be configured as when detect the first USB Type-C interface disconnect with
When the connection of the 2nd USB Type-C interface, not-connected status is shown on the gui interface.
As shown in figure 11, Figure 11 is the disclosure another switching control frame shown according to an exemplary embodiment
Figure, the embodiment is on the basis of aforementioned embodiment illustrated in fig. 10, described device further include: locking module 590.
Wherein, the locking module 590, be configured as when detect the first USB Type-C interface disconnect with it is described
When the connection of the 2nd USB Type-C interface, the sliding block icon is locked.
In above-described embodiment, it can be disconnected and the 2nd USB Type-C interface detecting the first USB Type-C interface
When connection, the state that the first electronic equipment is presently in described in real-time display, while the sliding block icon is locked, improve user
Experience.
Correspondingly, the disclosure also provides a kind of switching control, it to be used for the first electronic equipment, first electronic equipment
With the first general-purpose serial bus USB Type-C interface, comprising:
Processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
When detecting that the first USB Type-C interface connect with the 2nd USB Type-C interface of the second electronic equipment
When, obtain the current master slave mode of the first electronic equipment;
The sliding block icon being activated is shown by gui interface;
When detecting contact information on the sliding block icon, switch principal and subordinate's shape of first electronic equipment
State.
As shown in figure 12, Figure 12 is that the disclosure is shown according to an exemplary embodiment a kind of for switching control
1200 block diagram.For example, device 1200 can be various intelligent terminals, which can be specially mobile phone, computer, number
Word broadcast terminal, messaging devices, intelligent socket, intelligent sphygmomanometer, game console, tablet device, Medical Devices, body-building
Equipment, personal digital assistant etc..
Referring to Fig.1 2, device 1200 may include following one or more components: processing component 1202, memory 1204,
Power supply module 1206, multimedia component 1208, audio component 1210, the interface 1212 of input/output (I/O), sensor module
1214 and communication component 1216.
The integrated operation of the usual control device 1200 of processing component 1202, such as with display, telephone call, data communication,
Camera operation and record operate associated operation.Processing component 1202 may include one or more processors 1220 to execute
Instruction, to perform all or part of the steps of the methods described above.In addition, processing component 1202 may include one or more moulds
Block, convenient for the interaction between processing component 1202 and other assemblies.For example, processing component 1202 may include multi-media module,
To facilitate the interaction between multimedia component 1208 and processing component 1202.
Memory 1204 is configured as storing various types of data to support the operation in device 1200.These data
Example includes the instruction of any application or method for operating on device 1200, contact data, telephone book data,
Message, picture, video etc..Memory 1204 can by any kind of volatibility or non-volatile memory device or they
Combination is realized, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), it is erasable can
Program read-only memory (EPROM), programmable read only memory (PROM), read-only memory (ROM), magnetic memory, flash memory
Reservoir, disk or CD.
Power supply module 1206 provides electric power for the various assemblies of device 1200.Power supply module 1206 may include power management
System, one or more power supplys and other with for device 1200 generate, manage, and distribute the associated component of electric power.
Multimedia component 1208 includes the screen of one output interface of offer between described device 1200 and user.?
In some embodiments, screen may include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel,
Screen may be implemented as touch screen, to receive input signal from the user.Touch panel includes that one or more touch passes
Sensor is to sense the gesture on touch, slide, and touch panel.The touch sensor can not only sense touch or sliding is dynamic
The boundary of work, but also detect duration and pressure associated with the touch or slide operation.In some embodiments, more
Media component 1208 includes a front camera and/or rear camera.When device 1200 is in operation mode, as shot mould
When formula or video mode, front camera and/or rear camera can receive external multi-medium data.Each preposition camera shooting
Head and rear camera can be a fixed optical lens system or have focusing and optical zoom capabilities.
Audio component 1210 is configured as output and/or input audio signal.For example, audio component 1210 includes a wheat
Gram wind (MIC), when device 1200 is in operation mode, when such as call mode, recording mode, and voice recognition mode, microphone quilt
It is configured to receive external audio signal.The received audio signal can be further stored in memory 1204 or via communication
Component 1216 is sent.In some embodiments, audio component 1210 further includes a loudspeaker, is used for output audio signal.
I/O interface 1212 provides interface, above-mentioned peripheral interface module between processing component 1202 and peripheral interface module
It can be keyboard, click wheel, button etc..These buttons may include, but are not limited to: home button, volume button, start button and
Locking press button.
Sensor module 1214 includes one or more sensors, and the state for providing various aspects for device 1200 is commented
Estimate.For example, sensor module 1214 can detecte the state that opens/closes of device 1200, the relative positioning of component, such as institute
The display and keypad that component is device 1200 are stated, sensor module 1214 can be with detection device 1200 or device 1,200 1
The position change of a component, the existence or non-existence that user contacts with device 1200,1200 orientation of device or acceleration/deceleration and dress
Set 1200 temperature change.Sensor module 1214 may include proximity sensor, be configured in not any physics
It is detected the presence of nearby objects when contact.Sensor module 1214 can also include optical sensor, as CMOS or ccd image are sensed
Device, for being used in imaging applications.In some embodiments, which can also include acceleration sensing
Device, gyro sensor, Magnetic Sensor, pressure sensor, microwave remote sensor or temperature sensor.
Communication component 1216 is configured to facilitate the communication of wired or wireless way between device 1200 and other equipment.Dress
The wireless network based on communication standard, such as WiFi can be accessed by setting 1200,2G or 3G or their combination.It is exemplary at one
In embodiment, communication component 1216 receives broadcast singal or broadcast correlation from external broadcasting management system via broadcast channel
Information.In one exemplary embodiment, the communication component 1216 further includes near-field communication (NFC) module, to promote short distance
Communication.For example, radio frequency identification (RFID) technology, Infrared Data Association (IrDA) technology, ultra wide band can be based in NFC module
(UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 1200 can be by one or more application specific integrated circuit (ASIC), number
Signal processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array
(FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for executing the above method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instruction, example are additionally provided
It such as include the memory 1204 of instruction, above-metioned instruction can be executed by the processor 1220 of device 1200 to complete the above method.Example
Such as, the non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, soft
Disk and optical data storage devices etc..
Those skilled in the art after considering the specification and implementing the invention disclosed here, will readily occur to its of the disclosure
Its embodiment.The disclosure is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or
Person's adaptive change follows the general principles of this disclosure and including the undocumented common knowledge in the art of the disclosure
Or conventional techniques.The description and examples are only to be considered as illustrative, and the true scope and spirit of the disclosure are by following
Claim is pointed out.
The foregoing is merely the preferred embodiments of the disclosure, not to limit the disclosure, all essences in the disclosure
Within mind and principle, any modification, equivalent substitution, improvement and etc. done be should be included within the scope of disclosure protection.
Claims (15)
1. a kind of method for handover control, which is characterized in that the method is used for the first electronic equipment, the first electronic equipment tool
There is the first general-purpose serial bus USB Type-C interface, which comprises
When detecting that the first USB Type-C interface is connect with the 2nd USB Type-C interface of the second electronic equipment, obtain
Take the current master slave mode of first electronic equipment;
The sliding block icon being activated is shown by graphic user interface GUI;
When detecting contact information on the sliding block icon, switch the master slave mode of first electronic equipment.
2. the method as described in claim 1, which is characterized in that the master slave mode of switching first electronic equipment
Include:
The level for changing the mark ID pin in the first USB Type-C interface, passes through the first USB Type-C interface
After being enumerated between the 2nd USB Type-C interface, switch the master slave mode of first electronic equipment.
3. the method as described in claim 1, which is characterized in that described to detect contact information on the sliding block icon
When, the method also includes:
The first control instruction is sent to the 2nd USB Type-C interface, so that institute by the first USB Type-C interface
State the master slave mode that the second electronic equipment switches itself according to first control instruction.
4. the method as described in claim 1, which is characterized in that the current master slave mode for obtaining first electronic equipment
Afterwards, the method also includes:
It receives second electronic equipment the first USB Type-C is sent to by the 2nd USB Type-C interface and connect
Second control instruction of mouth;
According to second control instruction, switch the master slave mode of first electronic equipment.
5. the method as described in claim 1, which is characterized in that the method also includes:
The master slave mode is shown on the gui interface.
6. the method as described in claim 1, which is characterized in that the method also includes:
When detecting that the first USB Type-C interface disconnects the connection with the 2nd USB Type-C interface,
Not-connected status is shown on the gui interface.
7. method as claimed in claim 6, which is characterized in that when detecting that the first USB Type-C interface disconnects and institute
When stating the connection of the 2nd USB Type-C interface, the method also includes:
Lock the sliding block icon.
8. a kind of switching control, which is characterized in that described device is used for the first electronic equipment, the first electronic equipment tool
There is the first general-purpose serial bus USB Type-C interface, described device includes:
Module is obtained, for as the 2nd USB Type-C for detecting the first USB Type-C interface and the second electronic equipment
When interface connects, the current master slave mode of first electronic equipment is obtained;
Display module, for showing the sliding block icon being activated by graphic user interface GUI;
First switching module, for switching first electronic equipment when detecting contact information on the sliding block icon
The master slave mode.
9. device as claimed in claim 8, which is characterized in that first switching module includes:
Switching submodule, the level of the mark ID pin for changing in the first USB Type-C interface, passes through described the
After being enumerated between one USB Type-C interface and the 2nd USB Type-C interface, switch first electronic equipment
The master slave mode.
10. device as claimed in claim 8, which is characterized in that described device further include:
Sending module, for sending the first control instruction to the 2nd USB by the first USB Type-C interface
Type-C interface, so that second electronic equipment switches the master slave mode of itself according to first control instruction.
11. device as claimed in claim 8, which is characterized in that described device further include:
Receiving module is sent to described first by the 2nd USB Type-C interface for receiving second electronic equipment
Second control instruction of USB Type-C interface;
Second switching module, for switching the master slave mode of first electronic equipment according to second control instruction.
12. device as claimed in claim 8, which is characterized in that described device further include:
First display module, for showing the master slave mode on the gui interface.
13. device as claimed in claim 8, which is characterized in that described device further include:
Second display module detects that the first USB Type-C interface disconnection connects with the 2nd USB Type-C for working as
When the connection of mouth, not-connected status is shown on the gui interface.
14. device as claimed in claim 13, which is characterized in that described device further include:
Locking module detects that the first USB Type-C interface disconnects and the 2nd USB Type-C interface for working as
When the connection, the sliding block icon is locked.
15. a kind of switching control, which is characterized in that be used for the first electronic equipment, first electronic equipment has first
General-purpose serial bus USB Type-C interface, comprising: processor;
Memory for storage processor executable instruction;
Wherein, the processor is configured to:
When detecting that the first USB Type-C interface is connect with the 2nd USB Type-C interface of the second electronic equipment, obtain
Take the current master slave mode of first electronic equipment;
The sliding block icon being activated is shown by graphic user interface GUI;
When detecting contact information on the sliding block icon, switch the master slave mode of first electronic equipment.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510498331.7A CN105183309B (en) | 2015-08-13 | 2015-08-13 | Method for handover control and device |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN201510498331.7A CN105183309B (en) | 2015-08-13 | 2015-08-13 | Method for handover control and device |
Publications (2)
Publication Number | Publication Date |
---|---|
CN105183309A CN105183309A (en) | 2015-12-23 |
CN105183309B true CN105183309B (en) | 2019-04-16 |
Family
ID=54905420
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN201510498331.7A Active CN105183309B (en) | 2015-08-13 | 2015-08-13 | Method for handover control and device |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN105183309B (en) |
Families Citing this family (5)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
KR102781369B1 (en) * | 2016-06-29 | 2025-03-17 | 삼성전자주식회사 | Method for determing role of electronic device and electronic device thereof |
CN107977331A (en) * | 2016-10-25 | 2018-05-01 | 中兴通讯股份有限公司 | A kind of control method, device and terminal |
KR102757440B1 (en) * | 2016-11-23 | 2025-01-20 | 삼성전자주식회사 | Electronic apparatus and method for communicating with a external electronic appratus |
CN108563594B (en) * | 2018-03-26 | 2022-03-25 | 联想(北京)有限公司 | Data transmission method and device and USB adapter |
CN113419515A (en) * | 2021-06-22 | 2021-09-21 | 上海星融汽车科技有限公司 | Master-slave mode switching method, electronic equipment and vehicle diagnostic instrument |
Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101471833A (en) * | 2007-12-29 | 2009-07-01 | 联想(北京)有限公司 | Method and apparatus for processing data |
CN101526930A (en) * | 2008-10-13 | 2009-09-09 | 建荣集成电路科技(珠海)有限公司 | USB interface master-slave machine detection device and detection method |
CN103744821A (en) * | 2014-01-10 | 2014-04-23 | 广东欧珀移动通信有限公司 | Method and device for realizing USB OTG (Universal Serial Bus On-The-Go) function of mobile terminal |
-
2015
- 2015-08-13 CN CN201510498331.7A patent/CN105183309B/en active Active
Patent Citations (3)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN101471833A (en) * | 2007-12-29 | 2009-07-01 | 联想(北京)有限公司 | Method and apparatus for processing data |
CN101526930A (en) * | 2008-10-13 | 2009-09-09 | 建荣集成电路科技(珠海)有限公司 | USB interface master-slave machine detection device and detection method |
CN103744821A (en) * | 2014-01-10 | 2014-04-23 | 广东欧珀移动通信有限公司 | Method and device for realizing USB OTG (Universal Serial Bus On-The-Go) function of mobile terminal |
Also Published As
Publication number | Publication date |
---|---|
CN105183309A (en) | 2015-12-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN105068958B (en) | Method for handover control and device | |
CN104159218B (en) | Internetwork connection establishing method and device | |
CN105183309B (en) | Method for handover control and device | |
CN105703185A (en) | Signal transmission method, signal transmission device and adapter connecting head | |
CN105373464A (en) | Charging warning method and device of wearable equipment | |
CN104244045B (en) | The method that control video pictures presents and device | |
CN105117033A (en) | Connection method and device of external equipment | |
CN104506443A (en) | Router setting interface display method and device | |
CN105224494A (en) | Method for handover control and device | |
CN105120505A (en) | Method, apparatus and system for making intelligent equipment accessed to router | |
CN104468971A (en) | Method and device for connecting playing source | |
CN104461568A (en) | Electronic accessory recognition device and method | |
CN105549960B (en) | Control the method and device of camera | |
CN104933419A (en) | Method and device for obtaining iris images and iris identification equipment | |
CN104837154A (en) | Wireless access point control method and device | |
CN105224171A (en) | icon display method, device and terminal | |
CN106532367B (en) | The method and apparatus of intelligent socket electricity consumption warning | |
CN104243829A (en) | Self-shooting method and self-shooting device | |
CN105376144A (en) | Information processing method and device | |
CN105472706A (en) | Method and device for connection establishment | |
CN104216672A (en) | Display control method and display control device | |
CN105589622B (en) | Chat method and device based on barrage | |
CN104881342B (en) | terminal test method and device | |
CN106299515B (en) | Charging method and device | |
CN105183274B (en) | Method for handover control and device |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
C06 | Publication | ||
PB01 | Publication | ||
C10 | Entry into substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |