WO2012083839A1 - 电子设备及数据传输方法 - Google Patents
电子设备及数据传输方法 Download PDFInfo
- Publication number
- WO2012083839A1 WO2012083839A1 PCT/CN2011/084283 CN2011084283W WO2012083839A1 WO 2012083839 A1 WO2012083839 A1 WO 2012083839A1 CN 2011084283 W CN2011084283 W CN 2011084283W WO 2012083839 A1 WO2012083839 A1 WO 2012083839A1
- Authority
- WO
- WIPO (PCT)
- Prior art keywords
- connector
- data
- driving module
- component
- hardware device
- 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.)
- Ceased
Links
Classifications
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/40—Bus structure
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/42—Bus transfer protocol, e.g. handshake; Synchronisation
- G06F13/4282—Bus transfer protocol, e.g. handshake; Synchronisation on a serial bus, e.g. I2C bus, SPI bus
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/38—Information transfer, e.g. on bus
- G06F13/382—Information transfer, e.g. on bus using universal interface adapter
- G06F13/385—Information transfer, e.g. on bus using universal interface adapter for adaptation of a particular data processing system to different peripheral devices
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0016—Inter-integrated circuit (I2C)
-
- G—PHYSICS
- G06—COMPUTING OR CALCULATING; COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F2213/00—Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F2213/0042—Universal serial bus [USB]
Definitions
- the present invention relates to the field of electronic device technologies, and in particular, to an electronic device and a data transmission method. Background technique
- a first component and a second component each component being provided with a respective main board, a processor, etc., wherein one component can be operated independently, for example
- the PAD mode operates independently, but when the two components are connected to each other, the two can operate as a whole.
- a part that can be operated independently has some hardware devices, such as a wireless network card, a camera, a touch screen, a sensor, etc., when the two components are connected to each other, the hardware devices need to be operated as a whole system.
- this involves the sharing of devices.
- the sharing method in the prior art is performed by means of switcher switching, that is, by means of hardware circuits, the hardware devices are switched from being connected to the first motherboard to being connected to another motherboard to realize sharing of the hardware devices.
- an electronic device including:
- a first component configured with a first motherboard, a first processor connected to the first motherboard, a hardware device that can be shared, and a first connector;
- the first component and the second component are capable of forming a connection through the first connector and the second connector;
- the first connector is configured to receive from the first driver module of the hardware device by the first connector driving module First data from the hardware device, and transmitting the first data to the second connector, enabling the second connector driver module to pass the first data from the second connector through the hardware device
- a second drive module is provided for use by the first application operating in the second component.
- the hardware device capable of sharing includes a plurality of, the first connector driving module is specifically configured to package the first data and a device identifier of the hardware device that sends the first data to In the first data packet;
- the first connector is configured to send the first data packet to the second connector, so that the second connector driving module can obtain the first data packet by using the second connector, according to the a device identifier in the first data packet, where the first data in the first data packet is provided to a first application running in the second component by using a driving module of the hardware device corresponding to the device identifier .
- an embodiment of the present invention further provides a first electronic device, where the first electronic device is provided with a first main board, a first processor connected to the first main board, a hardware device that can be shared, and First connector
- the first connector is configured to be connected to the second connector, the second connector is disposed on the second electronic device, the second electronic device is configured with a second main board and a second connected to the second main board
- the first connector is further configured to receive first data from the hardware device by using the first connector driving module and the first driving module of the hardware device, and send the first data to the
- the second connector enables the second connector driving module to provide the first data from the second connector to the second electronic device through the second driving module of the hardware device
- the first application is used.
- the first electronic device wherein the hardware device that can be shared includes multiple, the first connector driving module is specifically configured to: use the first data and a device identifier of a hardware device that sends the first data Encapsulated into the first data packet;
- the first connector is specifically configured to send the first data packet to the second connector, so that the second connector driving module can obtain the first data packet by using the second connector. Determining, by the device identifier in the first data packet, the first data in the first data packet to a first one running in the second electronic device by using a driving module of the hardware device corresponding to the device identifier Application use.
- an embodiment of the present invention further provides a second electronic device, where the second electronic device a second motherboard, a second processor and a second connector connected to the second motherboard;
- the second connector is configured to be connected to the first connector, the first connector is disposed on the first electronic device, and the first electronic device is configured with a first motherboard, and the first processing connected to the first motherboard , a hardware device capable of being shared, and the first connector;
- the second connector is further configured to send the first data received from the first connector to the second connector driving module, so that the second connector driving module passes the first data through the hardware device a second driver module is provided for use by the first application running in the second component;
- the first data is data received by the first connector by the first connector driving module and the first driving module of the hardware device from the hardware device.
- the second electronic device wherein the hardware device that can be shared includes multiple, the second connector is specifically configured to receive a first data packet from the first connector, and the first data packet Sending to the second connector driving module, the second connector driving module is capable of passing the first data in the first data packet through the device identifier according to the device identifier in the first data packet a driving module of the hardware device is provided for use by the first application running in the second electronic device;
- the first data packet is a data packet obtained by the first connector driving module, which encapsulates the first data and a device identifier of a hardware device that sends the first data.
- an embodiment of the present invention further provides an electronic device, including:
- a first component configured with a first motherboard, a first processor connected to the first motherboard, a hardware device that can be shared, and a first connector;
- a second component a second motherboard, a second processor connected to the second motherboard, and a second connector corresponding to the first connector;
- the first component and the second component are capable of forming a connection through the first connector and the second connector;
- the second connector is configured to receive from the second driver module of the hardware device by the second connector driving module Second data from a second application operating in the second component and transmitting the second data to the first connector to enable a first connector driver module to be from the first connector Obtaining the second data, and sending the second data to the hardware device by using a first driving module of the hardware device.
- the hardware device is responsive to the second data.
- the electronic device wherein the second connector driving module is configured to package the second data and the device identifier of the target hardware device of the second data to the first device In the second data packet;
- the second connector is configured to send the second data packet to the first connector, so that the first connector driving module can obtain the second data packet by using the first connector, according to the
- the device identifier in the second data packet is sent to the target hardware device by using a driving module of the target hardware device corresponding to the device identifier.
- an embodiment of the present invention further provides a first electronic device, where the first electronic device is provided with a first main board, a first processor connected to the first main board, a hardware device that can be shared, and First connector
- the first connector is configured to be connected to the second connector
- the second connector is disposed on the second electronic device
- the second electronic device is configured with a second main board and a second connected to the second main board a first connector for transmitting second data from the second connector to a first connector driver module, such that the first connector driver module will be from the first connector Transmitting the second data to the hardware device by using a first driving module of the hardware device;
- the second data is data received by the second connector from the second application running in the second electronic device through the second connector driving module and the second driving module of the hardware device.
- the first electronic device wherein the plurality of hardware devices that can be shared include a plurality
- the first connector is specifically configured to send the second data packet from the second connector to the first connector driving module, so that The first connector driving module is configured to send, according to the device identifier in the second data packet, the second data in the second data packet to the driving module of the target hardware device corresponding to the device identifier to the
- the second data packet is a data packet obtained by the second connector driving module by encapsulating the second data and the device identifier of the target hardware device of the second data.
- an embodiment of the present invention further provides a second electronic device, where the second electronic device is provided with a second main board, a second processor and a second connector connected to the second main board;
- the second connector is configured to be connected to the first connector, the first connector is disposed on the first electronic device, and the first electronic device is configured with a first motherboard, and the first processing connected to the first motherboard , a hardware device capable of being shared, and the first connector;
- the second connector is configured to receive, by the second connector driving module, second data from the second application running in the second component from the second driving module of the hardware device, and the second Sending data to the first connector, enabling the first connector driver module to acquire the second number from the first connector And transmitting the second data to the hardware device by using the first driving module of the hardware device.
- the second electronic device wherein the second connector driving module is specifically configured to use the second data and the second data target hardware device
- the identifier is encapsulated into the second data packet;
- the second connector is configured to send the second data packet to the first connector, so that the first connector driving module can obtain the second data packet by using the first connector, according to the
- the device identifier in the second data packet is sent to the target hardware device by using a driving module of the target hardware device corresponding to the device identifier.
- an embodiment of the present invention further provides a data transmission method, configured to perform data transmission between a first component part and a second component part, where the first component part and the second component part are correspondingly configured.
- the first connector and the second connector form a connection, and the first component is provided with a hardware device that can be shared, and the data transmission method includes:
- the first driving module receives the first data from the hardware device; the first driving module runs in an operating system of the first component;
- the first driving module sends the first data to the first connector driving module
- the first connector driving module sends the second connector driving module by using the data channel formed by connecting the first data to the first connector and the second connector;
- the second connector driving module transmits the first data from the second connector to the second driving module, and the second driving module operates in the operating system of the second component;
- the second driver module provides the first data for use by the first application running in the second component.
- an embodiment of the present invention further provides a data transmission method, configured to perform data transmission between a first component part and a second component part, where the first component part and the second component part are correspondingly configured.
- the first connector and the second connector form a connection, and the first component is provided with a hardware device that can be shared, and the data transmission method includes:
- the second driving module receives second data from the second application running in the second component; the second driving module operates in an operating system of the first component;
- the second driving module sends the second data to the second connector driving module
- the second connector driving module sends the first connector driving module by transmitting the second data through a data channel formed by connecting the first connector and the second connector;
- the first connector driving module transmits the second data from the first connector to the first driving module, where the first driving module runs in an operating system of the second component;
- the first drive module provides the second data to the hardware device.
- a driving module of the hardware device is simultaneously disposed in the operating system of the two components, so that the driving module of the hardware device in the first component can interact with the hardware device, and the hardware in the second component
- the driving module of the device can interact with the application, and the hardware data channel formed by the corresponding connection between the first connector and the second connector is formed between the two driving modules. Therefore, the embodiment of the present invention implements different components. Applications and hardware enable data interaction.
- the connector can be realized by multiplexing the existing connector, so the implementation cost is greatly reduced.
- the connector driver module can be used to package it into a unified mode, and the destination is distinguished by a hardware device ID, so the present invention
- the electronic device of the embodiment is no longer limited by the hardware interface of the device, and the device of the USB/I2C/SPI interface can be shared in the same manner, so that the effective sharing of the hardware device can be realized.
- FIG. 1 is a schematic flow chart of a method according to a first embodiment of the present invention
- FIG. 2 is a schematic flow chart of a method according to a second embodiment of the present invention.
- FIG. 3 is a schematic diagram showing the structure and connection of a processor and a connector in a first component and a second component according to an embodiment of the present invention
- 4 and 5 are respectively schematic diagrams of hardware and software architectures according to an embodiment of the present invention. detailed description
- the electronic device includes a first component and a second component, and each component is provided with a respective main board, a processor, etc., wherein each component can be Runs independently, but when the two components are connected to each other, the two can operate as a whole and coordinate work.
- the first component and the second component are correspondingly connected by a connector, in the first group
- the part and the second component respectively set the driving module for the hardware device, and the data channels are transmitted between the two driving modules through the corresponding connection of the connector, so that the effective sharing of the hardware devices can be realized.
- a first component configured with a first motherboard, a first processor connected to the first motherboard, a hardware device that can be shared, and a first connector;
- a second component a second motherboard, a second processor connected to the second motherboard, and a second connector corresponding to the first connector;
- the first component and the second component are capable of forming a connection through the first connector and the second connector;
- the first connector is configured to receive from the first driver module of the hardware device by the first connector driving module First data from the hardware device, and transmitting the first data to the second connector, enabling the second connector driver module to pass the first data from the second connector through the hardware device
- a second drive module is provided for use by the first application operating in the second component.
- the first component is a first electronic device, and the second component is a second electronic device.
- the first electronic device is provided with a first motherboard, a first processor connected to the first motherboard, and can be shared. Hardware device and first connector;
- the first connector is configured to be connected to the second connector, the second connector is disposed on the second electronic device, the second electronic device is configured with a second main board and a second connected to the second main board
- the first connector is further configured to receive first data from the hardware device by using the first connector driving module and the first driving module of the hardware device, and send the first data to the
- the second connector enables the second connector driving module to provide the first data from the second connector to the second electronic device through the second driving module of the hardware device
- the first application is used.
- the second electronic device is provided with a second main board, a second processor and a second connector connected to the second main board;
- the second connector is configured to be connected to the first connector
- the first electronic device is provided with a first main board, a first processor connected to the first main board, a hardware device that can be shared, and the first connection Device
- the second connector is further configured to send the first data received from the first connector to the second connector driving module, so that the second connector driving module passes the first data through the hardware device a second driver module is provided for use by the first application running in the second component;
- the first data is the first connector that drives the module and the hardware device through the first connector A data received by the driver module from the hardware device.
- the user touches the touch exhibition located on the first component
- the touch drive driver operating in the operating system of the first component obtains an input data by interacting with the touch display
- the touch screen driver transmits the input data to a first connector driver operating in an operating system of the first component
- the first connector driver sends the data to the first connector driver through the data channel between the first connector and the second connector;
- the second connector After receiving the data packet, the second connector drives the packet and then forwards it to the touch screen driver running in the operating system of the second component;
- the touch drive driver operating in the second component of the operating system sends the data to the application for use by the application.
- the pointing track detected by the touch component on the first component is transmitted to the application running in the second component, and the hardware sharing of the device is realized without using the hardware switcher. .
- the above describes the process of transferring the data collected by the shared hardware device to the application.
- the data of the application is transmitted to the hardware device, and the hardware device outputs the data.
- the electronic device of the second embodiment of the invention includes:
- a first component configured with a first motherboard, a first processor connected to the first motherboard, a hardware device that can be shared, and a first connector;
- a second component a second motherboard, a second processor connected to the second motherboard, and a second connector corresponding to the first connector;
- the first component and the second component are capable of forming a connection through the first connector and the second connector;
- the second connector is configured to receive from the second driver module of the hardware device by the second connector driving module Second data from a second application operating in the second component and transmitting the second data to the first connector to enable a first connector driver module to be from the first connector Obtaining the second data, and sending the second data to the hardware device by using a first driving module of the hardware device.
- the first electronic device is provided with a first main board, a first processor connected to the first main board, a hardware device that can be shared, and a first connector;
- the first connector is configured to be connected to the second connector
- the second connector is disposed on the second electronic device
- the second electronic device is configured with a second main board and a second connected to the second main board a first connector for transmitting second data from the second connector to a first connector driver module, such that the first connector driver module will be from the first connector Transmitting the second data to the hardware device by using a first driving module of the hardware device;
- the second data is data received by the second connector from the second application running in the second electronic device through the second connector driving module and the second driving module of the hardware device.
- the plurality of hardware devices that can be shared include: the first connector is specifically configured to send the second data packet from the second connector to the first connector driving module, so that the first connector driving module can And sending, according to the device identifier in the second data packet, the second data in the second data packet to the target hardware device by using a driving module of the target hardware device corresponding to the device identifier;
- the second data packet is a data packet obtained by the second connector driving module by encapsulating the second data and the device identifier of the target hardware device of the second data.
- the second electronic device is provided with a second main board, a second processor and a second connector connected to the second main board;
- the second connector is configured to be connected to the first connector, the first connector is disposed on the first electronic device, and the first electronic device is configured with a first motherboard, and the first processing connected to the first motherboard , a hardware device capable of being shared, and the first connector;
- the second connector is configured to receive, by the second connector driving module, second data from the second application running in the second component from the second driving module of the hardware device, and the second Sending data to the first connector, enabling the first connector driver module to acquire the second data from the first connector, and transmitting the second data through the first driver module of the hardware device Give the hardware device.
- the second connector driving module is specifically configured to encapsulate the second data and the device identifier of the target hardware device of the second data into the second data packet;
- the second connector is configured to send the second data packet to the first connector, so that the first connector driving module can obtain the second data packet by using the first connector, according to the a device identifier in the second data packet, where the second data in the second data packet is used by the target hardware device corresponding to the device identifier A driver module is sent to the target hardware device.
- the audio playback software running in the second component opens a sound file (such as an MP3 file, a WAV file, etc.);
- the audio playback software transmits the sound data extracted from the sound file to the sound card driver operating in the operating system of the second component;
- a sound card driver operating within the operating system of the second component transmits sound data to a connector driver operating within the operating system of the second component;
- a connector driver operating in the operating system of the second component encapsulates the sound data and transmits it to the connector driver operating in the operating system of the first component through a data channel between the first connector and the second connector ;
- the connector driver operating in the operating system of the first component is decapsulated and forwarded to the sound card driver operating in the operating system of the first component;
- the sound card driver operating in the first component of the operating system sends the sound data to the sound card for playback by the sound card.
- an application running in the second component it is desirable to cause an application running in the second component to perform data interaction with the hardware device in the first component, and simultaneously set in the operating system of the first component and the second component.
- the driver module of the hardware device in the second component can also interact with the application program, so only Establishing a channel between the driving modules of the hardware devices set in the operating system of the first component and the second component, that is, between the application running in the second component and the hardware device in the first component A data channel is established, which is implemented by the first connector and the second connector and the corresponding connector driver.
- the connector can be implemented by multiplexing the existing connector, and the first connector and the second connector are specifically used for data.
- the transmission is not limited in the specific embodiment of the present invention, and only needs to be able to transmit data.
- the drive module is to convert the data format between the application and the hardware device, so that the application and the hardware design The device can recognize the received data.
- the operation of the conversion can be performed by any one of the driver modules, and the other driver module can provide only one access interface, as illustrated below.
- the sound card driving in the operating system running in the second component can convert the sound data sent by the audio playing software, and at this time, the sound card running in the operating system of the first component The driver does not need to convert the received data, but only provides a channel for sending data to the sound card.
- the sound card driver running in the operating system of the first component can also convert the sound data sent by the audio playing software.
- the sound card driver running in the operating system of the second component does not need to be The received data is converted, but only provides an interface for receiving data to be delivered from the application.
- the above two embodiments respectively describe the process of acquiring data from the hardware device and delivering the data to the hardware device, but in some cases, the two processes exist simultaneously, such as reading data from the storage device, modifying and saving to the storage. Equipment, for this case, there is no real shield between the two processes. Separately, the two processes correspond to the two processes mentioned before, therefore, this situation is no longer Detailed description.
- the first connector driving module of the first embodiment of the present invention is specifically configured to send the first data and send the first The device identifier of the hardware device of a data is encapsulated into the first data packet;
- the first connector is configured to send the first data packet to the second connector, so that the second connector driving module can obtain the first data packet by using the second connector, according to the a device identifier in the first data packet, where the first data in the first data packet is provided to a first application running in the second component by using a driving module of the hardware device corresponding to the device identifier .
- the first connector driving module is specifically configured to encapsulate the first data and the device identifier of the hardware device that sends the first data into the first data packet, when the plurality of hardware devices that can be shared include
- the first connector is specifically configured to send the first data packet to the second connector, so that the second connector driving module can obtain the first data packet after using the second connector And providing, according to the device identifier in the first data packet, the first data in the first data packet to a driving module running in the second electronic device by using a driving module of the hardware device corresponding to the device identifier An application to use.
- the second connector is specifically configured to use the first connection Receiving the first data packet, and transmitting the first data packet to the second connector driver module, so that the second connector driver module can enable the first data packet according to the device identifier in the first data packet
- the first data in a data packet is provided by the driving module of the corresponding hardware device of the device identifier to the first application running in the second electronic device;
- the first data packet is a data packet obtained by the first connector driving module, which encapsulates the first data and a device identifier of a hardware device that sends the first data.
- the touch drive driver operating in the operating system of the first component obtains an input data by interacting with the touch display
- the touch screen driver transmits the input data to a first connector driver operating in an operating system of the first component
- the first connector driver sends the data to the first connector driver through the data channel between the first connector and the second connector;
- the encapsulated data packet includes at least the following two parts: the original data and the device identifier of the hardware device of the first data, which is a touch screen in this example, and the device identifier may be set to 1 in advance.
- the second connector After receiving the data packet, the second connector decapsulates and obtains two parts of data: device identifier and original data, and the second connector driver can forward the original data to the operation running on the second component according to the device identifier.
- Touch display drive within the system
- the touch drive driver operating in the second component of the operating system sends the data to the application for use by the application.
- the second connector driving module is specifically configured to use the second data and the target hardware device of the second data.
- the device identifier is encapsulated into the second data packet;
- the second connector is configured to send the second data packet to the first connector, so that the first connector driving module can obtain the second data packet by using the first connector, according to the
- the device identifier in the second data packet is sent to the target hardware device by using a driving module of the target hardware device corresponding to the device identifier.
- the audio playback software running in the second component opens a sound file (such as an MP3 file, a WAV file, etc.);
- the audio playback software transmits the sound data extracted from the sound file to the sound card driver operating in the operating system of the second component;
- a sound card driver operating within the operating system of the second component transmits sound data to a connector driver operating within the operating system of the second component;
- a connector driver operating in the operating system of the second component encapsulates the sound data and transmits it to the connector driver operating in the operating system of the first component through a data channel between the first connector and the second connector ;
- the encapsulated data packet now consists of two parts: the sound data and the device identification of the target hardware device (sound card);
- the connector driver operating in the first component of the operating system decapsulates two pieces of data: the sound data and the device identification of the target hardware device (sound card), at which point the sound data can be forwarded to the first component.
- Sound card driver within the operating system
- the sound card driver operating in the first component of the operating system sends the sound data to the sound card for playback by the sound card.
- the connector driver module can be used to package them into a unified mode, and the destination is distinguished by a hardware device ID, so the electronic device of the embodiment of the present invention is no longer subject to
- the limitations of the hardware interface of the device whether it is a USB/I2C/SPI interface device, can be shared in the same way, thus enabling efficient sharing of hardware devices.
- a data transmission method configured to perform data transmission between a first component part and a second component part, wherein the first component part and the second component part are correspondingly disposed by the first connector and the second component
- the connector forms a connection, and the first component is provided with a hardware device that can be shared.
- the data transmission method is as shown in FIG. 1 and includes:
- Step S102 the first driving module receives the first data from the hardware device, where the first driving module runs in an operating system of the first component;
- Step S104 the first driving module sends the first data to the first connector driving module
- Step S106 the first connector driving module connects the first data through the first connector and the second connector And connecting the formed data channel to send the second connector driving module;
- Step S108 the second connector driving module sends the first data from the second connector to the second driving module, and the second driving module runs in the operating system of the second component;
- Step S110 the second driving module provides the first data to the first application running in the second component.
- a data transmission method is used for data transmission between a first component and a second component, the first component and the second component being correspondingly disposed by a first connector and The second connector forms a connection, and the first component is provided with a hardware device that can be shared.
- the data transmission method is as shown in FIG. 2, and includes:
- Step S202 the second driving module receives the second data from the second application running in the second component, where the second driving module runs in the operating system of the first component;
- Step S204 the second driving module sends the second data to the second connector driving module
- Step S206 the second connector driving module sends the first connector driving module by using the data channel formed by connecting the second data through the first connector and the second connector;
- Step S208 the first connector driving module sends the second data from the first connector to the first driving module, where the first driving module runs in the operating system of the second component;
- Step S210 The first driving module provides the second data to the hardware device.
- the MCU in order to ensure the validity of the data, it is also possible to detect whether the first component and the second component are connected through the corresponding first connector and the second connector, and according to the connection status. Subsequent processing, wherein when the MCU detects that the connection exists, the data from the hardware device that can be shared is sent to the first connector, and then the data is transmitted to the second connector through the first connector, and The data received from the first connector is sent to the hardware device that can be shared by the driver of the connector and the driver of the hardware device.
- the MCU detects that the connection does not exist, it will be processed according to the existing method, and will come from The data of the hardware device that can be shared is sent to the corresponding application for processing, and/or will be sent to Data of hardware devices that can be shared is sent to the hardware device.
- the data received from the second connector from the shareable hardware device is sent to the application running in the second component, while When the data to be sent through the connector is received, the data is transmitted to the first connector through the second connector.
- the hardware device that can be shared it is disposed in the first component and is not disposed in the second component. Therefore, when the EC does not detect that the connection exists, in the second component, the hardware device that can be shared is in Unusable state, so there is no data to be sent to the hardware device, and the second connector will not receive data from the peer.
- the second component 302 is assumed to be the main system, including the embedded system.
- the controller EC, the first component 304 as a slave system, including the micro-control unit MCU, has a physical interface respectively set on the EC and the MCU, and the physical interface includes a connection detection interface CONJNF and a data transmission interface DATA INF.
- the first and second connectors CO NECTOR1, CO NECTOR2 are also provided with a connection detection pin CON PIN and a data transmission pin DATA PIN, and are connected to the connection detection interface CONJNF and the data transmission interface D ATAJNF.
- the EC and the MCU are configured to determine whether the first connector CO NECTOR1 and the second connector CONNECTOR2 are connected by the connection detection interface CONJNF and the connection detection pin CON PIN, and determine the first connector CO NECTOR1 and the second connector CO When NECTOR2 is connected, data is sent to the corresponding connector.
- B_DET is used to transmit the first signal of the primary system to the MCU by the EC, when the primary system and the secondary system are engaged, the MCU can detect whether the primary system exists according to the first signal;
- S_DET is used The second signal transmitted from the system by the MCU to the EC, when the primary system and the secondary system are engaged, thereby the EC can detect whether there is a slave system according to the second signal;
- S_BUS is a serial communication bus, such as I2C (Inter-Integrated Circuit) SPI (Serial Peripheral Interface), UART (Universal Asynchronous Receiver/Transmitter), etc.
- I2C Inter-Integrated Circuit
- SPI Serial Peripheral Interface
- UART Universal Asynchronous Receiver/Transmitter
- FIG. 4 it is a schematic diagram of a hardware architecture according to an embodiment of the present invention, which includes two parts, one part is an ARM system 402, and a shared hardware device (touch screen TOUC, camera CAM, and optical finger navigation device OFN) is connected through a bus 404.
- a shared hardware device touch screen TOUC, camera CAM, and optical finger navigation device OFN
- the ARM system is coupled to the X86 system 408 via the connector 406 and via the data link DATA_LINK.
- FIG. 5 it is a schematic diagram of a software architecture according to an embodiment of the present invention.
- the Android operating system loads the drivers/drivers DRV1, DRV2, and DRV3 of various shared hardware devices (touch screen TOUC, camera CAM, and optical finger navigation device OFN).
- the drive modules DRV1, DRV2, and DRV3 interact with their respective hardware devices in accordance with the corresponding protocols in a conventional manner.
- the drive modules DRV1, DRV2 and DRV3 on the electronic device of the Android operating system are real drive modules.
- the shared device driver/driver modules DRV1, DRV2, and DRV3 are connected to the connector driver connection C0N_DRV1.
- the Window 7 operating system also has CON DRV2 and the shared device drivers DRV1, DRV2' and DRV3 ', which interact with related applications under Windows 7, and are also connected to the connector driver CON_DRV2.
- the drive modules DRV1', DRV2' and DRV3' on the Windows 7 operating system side are virtual drive modules. Because there is no real hardware corresponding to DRV1', DRV2' and DRV3' on the electronic device of the Windows7 operating system.
- the drive modules DRV 1 ', DRV2' and DRV3' on the electronic device of the Windows 7 operating system can recognize/load the drive modules DRV1', DRV2' when the two system connections are detected. And DRV3'.
- the connector drivers in the two operating systems, C0N_DRV1 and CON_DRV2 are connected to each other via a connector to form a data link DATA LINK or data channel.
- the driver module DRV2 receives data from the CAM under the Android operating system
- the driver module DRV2 sends data to the connector driver module C0N_DRV1
- the connector driver module C0N_DRV1 transmits data to the connector driver module CON_DRV2 through the data channel.
- the connector driver module CON_DRV2 sends the data from the corresponding driver module DRV2 under Windows 7 system, which in turn provides the data to applications running under Windows 7.
- a connector driving module is provided, thereby combining two in combination with FIG. Only three pairs of corresponding pins need to be set between the connectors for connection detection and data transmission, which reduces the number of pins and the length of the pins. Data can be routed by setting the hardware device ID. Even if there are more shared devices, the connector driver module can be used to package it into a unified mode, and the destination is determined by a hardware device ID. Therefore, the electronic device of the embodiment of the present invention is no longer limited by the hardware interface of the device, whether
- USB/I2C/SPI interfaces can be shared in the same way, thus enabling efficient sharing of hardware devices.
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Hardware Design (AREA)
- Stored Programmes (AREA)
- Information Transfer Systems (AREA)
Description
电子设备及数据传输方法 技术领域
本发明涉及电子设备技术领域, 特别是一种电子设备及数据传输方法。 背景技术
在 Hybrid架构的电子设备中,可以包括两个组成部分: 第一组成部分和第二组成 部分, 每个组成部分都设置有各自的主板、 处理器等, 其中一个组成部分可以独立运 行, 如以 PAD方式独立运行, 但当两个组成部分相互连接之后, 二者又可以作为一个 整体运行。
上述架构的电子设备中,如可以独立运行的部分具有一些硬件设备,如无线网卡、 摄像头、 触摸屏、 传感器等, 当两个组成部分相互连接之后, 这些硬件设备如果需要 被作为整体运行的系统所应用, 这就涉及到设备的共享问题。
现有技术中的共享方法是通过切换器切换的方式来进行, 即通过硬件电路的方 式, 将这些硬件设备从与第一主板连接切换到与另外一个主板连接, 来实现硬件设备 的共享。
然而, 发明人在实现本发明实施例的过程中发现, 现有技术至少存在如下缺点: 需要硬件切换器, 不但增加了成本, 还提高了硬件设计和布局的难度; 而同时由于每 个设备的接口不同, 则硬件切换器需要同时满足所有的接口规范, 这也存在硬件设计 难度的问题。 发明内容
本发明的目的是提供一种电子设备及数据传输方法, 实现筒单有效的硬件设备共 享。
为了实现上述目的, 本发明实施例提供了一种电子设备, 包括:
第一组成部分, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享 的硬件设备和第一连接器;
第二组成部分, 设置有第二主板、 与所述第二主板连接的第二处理器以及与所述 第一连接器对应设置的第二连接器;
第一组成部分和第二组成部分能够通过所述第一连接器和第二连接器形成连接; 所述第一连接器用于通过第一连接器驱动模块从所述硬件设备的第一驱动模块 接收来自所述硬件设备的第一数据 , 并将所述第一数据发送到所述第二连接器, 使第 二连接器驱动模块能够将来自第二连接器的第一数据通过所述硬件设备的第二驱动 模块提供给运行于所述第二组成部分中的第一应用使用。
上述的电子设备, 其中, 所述能够共享的硬件设备包括多个, 所述第一连接器驱 动模块具体用于将所述第一数据以及发送所述第一数据的硬件设备的设备标识封装 到第一数据包中;
所述第一连接器用于将所述第一数据包发送到所述第二连接器, 使第二连接器驱 动模块能够在通过所述第二连接器获取所述第一数据包后, 根据所述第一数据包中的 设备标识, 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的驱动 模块提供给运行于所述第二组成部分中的第一应用使用。
为了实现上述目的, 本发明实施例还提供了一种第一电子设备, 所述第一电子设 备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的硬件设备和第一 连接器;
所述第一连接器用于与第二连接器连接, 所述第二连接器设置于第二电子设备 上, 所述第二电子设备设置有第二主板以及与所述第二主板连接的第二处理器; 所述第一连接器还用于通过第一连接器驱动模块和所述硬件设备的第一驱动模 块接收来自所述硬件设备的第一数据 , 并将所述第一数据发送到所述第二连接器, 使 第二连接器驱动模块能够将来自所述第二连接器的所述第一数据通过所述硬件设备 的第二驱动模块提供给运行于所述第二电子设备中的第一应用使用。
上述的第一电子设备, 其中, 所述能够共享的硬件设备包括多个, 所述第一连接 器驱动模块具体用于将所述第一数据以及发送所述第一数据的硬件设备的设备标识 封装到第一数据包中;
所述第一连接器具体用于将所述第一数据包发送到所述第二连接器, 使第二连接 器驱动模块能够在通过所述第二连接器获取所述第一数据包后, 根据所述第一数据包 中的设备标识 , 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的 驱动模块提供给运行于所述第二电子设备中的第一应用使用。
为了实现上述目的, 本发明实施例还提供了一种第二电子设备, 所述第二电子设
备设置有第二主板、 与所述第二主板连接的第二处理器和第二连接器;
所述第二连接器用于与第一连接器连接, 所述第一连接器设置于第一电子设备, 所述第一电子设备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的 硬件设备和所述第一连接器;
所述第二连接器还用于将从所述第一连接器接收到的第一数据发送到第二连接 器驱动模块 , 使第二连接器驱动模块将所述第一数据通过所述硬件设备的第二驱动模 块提供给运行于所述第二组成部分中的第一应用使用;
其中, 所述第一数据为所述第一连接器通过第一连接器驱动模块和所述硬件设备 的第一驱动模块接收到的来自所述硬件设备的数据。
上述的第二电子设备, 其中, 所述能够共享的硬件设备包括多个, 所述第二连接 器具体用于从所述第一连接器接收第一数据包, 并将所述第一数据包发送给第二连接 器驱动模块 , 使所述第二连接器驱动模块能够根据所述第一数据包中的设备标识 , 将 所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的驱动模块提供给 运行于所述第二电子设备中的第一应用使用;
所述第一数据包为第一连接器驱动模块将所述第一数据以及发送所述第一数据 的硬件设备的设备标识封装得到的数据包。
为了实现上述目的, 本发明实施例还提供了一种电子设备, 包括:
第一组成部分, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享 的硬件设备和第一连接器;
第二组成部分, 设置有第二主板、 与所述第二主板连接的第二处理器以及与所述 第一连接器对应设置的第二连接器;
第一组成部分和第二组成部分能够通过所述第一连接器和第二连接器形成连接; 所述第二连接器用于通过第二连接器驱动模块从所述硬件设备的第二驱动模块 接收来自运行于所述第二组成部分中的第二应用的第二数据, 并将所述第二数据发送 到所述第一连接器, 使第一连接器驱动模块能够从所述第一连接器获取所述第二数 据, 并将所述第二数据通过所述硬件设备的第一驱动模块发送给所述硬件设备。
所述硬件设备响应所述第二数据。
上述的电子设备, 其中, 在存在多个共享设备的情况下, 所述第二连接器驱动模 块具体用于将所述第二数据以及所述第二数据的目标硬件设备的设备标识封装到第
二数据包中;
所述第二连接器用于将所述第二数据包发送到所述第一连接器, 使第一连接器驱 动模块能够在通过所述第一连接器获取所述第二数据包后, 根据所述第二数据包中的 设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的 驱动模块发送给所述目标硬件设备。
为了实现上述目的, 本发明实施例还提供了一种第一电子设备, 所述第一电子设 备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的硬件设备和第一 连接器;
所述第一连接器用于与第二连接器连接, 所述第二连接器设置于第二电子设备 上, 所述第二电子设备设置有第二主板以及与所述第二主板连接的第二处理器; 所述第一连接器用于将来自所述第二连接器的第二数据发送到第一连接器驱动 模块, 使所述第一连接器驱动模块将来自所述第一连接器的所述第二数据通过所述硬 件设备的第一驱动模块发送给所述硬件设备;
所述第二数据为所述第二连接器通过第二连接器驱动模块和所述硬件设备的第 二驱动模块接收到的来自运行于所述第二电子设备中的第二应用的数据。
上述的第一电子设备, 其中, 所述能够共享的硬件设备包括多个, 所述第一连接 器具体用于将来自第二连接器的第二数据包发送给第一连接器驱动模块, 使所述第一 连接器驱动模块能够根据所述第二数据包中的设备标识 , 将所述第二数据包中的第二 数据通过所述设备标识对应的目标硬件设备的驱动模块发送给所述目标硬件设备; 所述第二数据包为所述第二连接器驱动模块将所述第二数据以及所述第二数据 的目标硬件设备的设备标识封装得到的数据包。
为了实现上述目的, 本发明实施例还提供了一种第二电子设备, 所述第二电子设 备设置有第二主板、 与所述第二主板连接的第二处理器和第二连接器;
所述第二连接器用于与第一连接器连接, 所述第一连接器设置于第一电子设备, 所述第一电子设备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的 硬件设备和所述第一连接器;
所述第二连接器用于通过第二连接器驱动模块从所述硬件设备的第二驱动模块 接收来自运行于所述第二组成部分中的第二应用的第二数据, 并将所述第二数据发送 到所述第一连接器, 使第一连接器驱动模块能够从所述第一连接器获取所述第二数
据, 并将所述第二数据通过所述硬件设备的第一驱动模块发送给所述硬件设备。 上述的第二电子设备, 其中, 所述能够共享的硬件设备包括多个时, 所述第二连 接器驱动模块具体用于将所述第二数据以及所述第二数据的目标硬件设备的设备标 识封装到第二数据包中;
所述第二连接器用于将所述第二数据包发送到所述第一连接器, 使第一连接器驱 动模块能够在通过所述第一连接器获取所述第二数据包后, 根据所述第二数据包中的 设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的 驱动模块发送给所述目标硬件设备。
为了实现上述目的, 本发明实施例还提供了一种数据传输方法, 用于在第一组成 部分和第二组成部分之间进行数据传输, 所述第一组成部分和第二组成部分通过对应 设置的第一连接器和第二连接器形成连接 , 所述第一组成部分中设置有能够共享的硬 件设备 , 所述数据传输方法包括:
第一驱动模块接收来自所述硬件设备的第一数据; 所述第一驱动模块运行于第一 组成部分的操作系统中;
第一驱动模块将第一数据发送到第一连接器驱动模块;
第一连接器驱动模块将所述第一数据通过第一连接器和第二连接器连接后形成 的数据通道发送第二连接器驱动模块;
第二连接器驱动模块将来自第二连接器的第一数据发送到第二驱动模块, 所述第 二驱动模块运行于第二组成部分的操作系统中;
第二驱动模块将第一数据提供给运行于所述第二组成部分中的第一应用使用。 为了实现上述目的, 本发明实施例还提供了一种数据传输方法, 用于在第一组成 部分和第二组成部分之间进行数据传输, 所述第一组成部分和第二组成部分通过对应 设置的第一连接器和第二连接器形成连接 , 所述第一组成部分中设置有能够共享的硬 件设备 , 所述数据传输方法包括:
第二驱动模块接收来自运行于第二组成部分中的第二应用的第二数据; 所述第二 驱动模块运行于第一组成部分的操作系统中;
第二驱动模块将第二数据发送到第二连接器驱动模块;
第二连接器驱动模块将所述第二数据通过第一连接器和第二连接器连接后形成 的数据通道发送第一连接器驱动模块;
第一连接器驱动模块将来自第一连接器的第二数据发送到第一驱动模块, 所述第 一驱动模块运行于第二组成部分的操作系统中;
第一驱动模块将第二数据提供给硬件设备。
本发明实施例具有以下的有益效果:
本发明的具体实施例中, 在两个组成部分的操作系统中同时设置有硬件设备的驱 动模块, 使得第一组成部分中硬件设备的驱动模块能够与硬件设备交互, 而第二组成 部分中硬件设备的驱动模块能够与应用程序交互, 同时上述两个驱动模块之间搭建有 由第一连接器和第二连接器对应连接形成的硬件数据通道, 因此, 本发明实施例实现 了位于不同组成部分的应用程序和硬件能够实现数据的交互。
同时, 由于现有的第一部分和第二部分之间也存在连接器, 所以该连接器可以复 用已有的连接器来实现, 所以大大降低了实现成本。
同时, 通过设置硬件设备 ID来实现数据的路由, 即使需要共享的设备再多, 也 可以利用连接器驱动模块将其封装成统一的模式, 并通过一个硬件设备 ID来区分目 的地, 所以本发明实施例的电子设备不再受到设备硬件接口的局限, 无论是 USB/I2C/SPI接口的设备, 都可以通过相同的方式进行共享, 因此能够实现筒单有效 的硬件设备共享。 附图说明
图 1为本发明第一实施例的方法的流程示意图;
图 2为本发明第二实施例的方法的流程示意图;
图 3为本发明实施例的第一组成部分和第二组成部分中处理器与连接器的结构及 连接示意图; 以及
图 4和图 5分别为本发明实施例的硬件和软件架构示意图。 具体实施方式
本发明实施例的电子设备及其数据传输方法中, 该电子设备包括第一组成部分和 第二组成部分, 每个组成部分都设置有各自的主板、 处理器等, 其中每一个组成部分 都可以独立运行, 但当两个组成部分相互连接之后, 二者又可以作为一个整体运行, 协调工作。 其中 第一组成部分和第二组成部分通过连接器对应连接, 在所述第一组
成部分和第二组成部分分别为硬件设备设置驱动模块, 两个驱动模块之间通过连接器 对应连接形成的数据通道进行数据的传递, 因此能够实现筒单有效的硬件设备共享。
本发明第一实施例的电子设备包括:
第一组成部分, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享 的硬件设备和第一连接器;
第二组成部分, 设置有第二主板、 与所述第二主板连接的第二处理器以及与所述 第一连接器对应设置的第二连接器;
第一组成部分和第二组成部分能够通过所述第一连接器和第二连接器形成连接; 所述第一连接器用于通过第一连接器驱动模块从所述硬件设备的第一驱动模块 接收来自所述硬件设备的第一数据 , 并将所述第一数据发送到所述第二连接器, 使第 二连接器驱动模块能够将来自第二连接器的第一数据通过所述硬件设备的第二驱动 模块提供给运行于所述第二组成部分中的第一应用使用。
在此第一组成部分为第一电子设备, 第二组成部分为第二电子设备, 则所述第一 电子设备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的硬件设备 和第一连接器;
所述第一连接器用于与第二连接器连接, 所述第二连接器设置于第二电子设备 上, 所述第二电子设备设置有第二主板以及与所述第二主板连接的第二处理器; 所述第一连接器还用于通过第一连接器驱动模块和所述硬件设备的第一驱动模 块接收来自所述硬件设备的第一数据 , 并将所述第一数据发送到所述第二连接器, 使 第二连接器驱动模块能够将来自所述第二连接器的所述第一数据通过所述硬件设备 的第二驱动模块提供给运行于所述第二电子设备中的第一应用使用。
而第二电子设备中设置有第二主板、 与所述第二主板连接的第二处理器和第二连 接器;
所述第二连接器用于与第一连接器连接, 所述第一电子设备设置有第一主板、 与 所述第一主板连接的第一处理器、 能够共享的硬件设备和所述第一连接器;
所述第二连接器还用于将从所述第一连接器接收到的第一数据发送到第二连接 器驱动模块 , 使第二连接器驱动模块将所述第一数据通过所述硬件设备的第二驱动模 块提供给运行于所述第二组成部分中的第一应用使用;
所述第一数据为所述第一连接器通过第一连接器驱动模块和所述硬件设备的第
一驱动模块接收到的来自所述硬件设备的数据。
以能够共享的硬件设备为触摸屏为例对本发明实施例的电子设备的工作过程详 细说明如下。
用户触摸位于第一组成部分上的触摸展;
运行于第一组成部分的操作系统内的触摸展驱动通过与触摸展交互, 得到一输入 数据;
触摸屏驱动将该输入数据发送给运行于第一组成部分的操作系统内的第一连接 器驱动;
第一连接器驱动将数据封装后通过第一连接器和第二连接器之间的数据通道发 送到第一连接器驱动;
第二连接器驱动接收到数据包后, 解封装后将之转发给运行于第二组成部分的操 作系统内的触摸屏驱动;
运行于第二组成部分的操作系统内的触摸展驱动将该数据发送给应用程序, 供应 用程序使用。
通过上述的过程, 将第一组成部分上的触摸展检测到的指点轨迹传递到了第二组 成部分中运行的应用程序, 而不需要通过硬件切换器的方式, 实现了筒单有效的硬件 设备共享。
上述描述的是将共享硬件设备釆集到的数据传递给应用程序的过程, 但本发明第 二实施例的电子设备中,是将应用程序的数据传递到硬件设备, 由硬件设备进行输出, 本发明第二实施例的电子设备, 包括:
第一组成部分, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享 的硬件设备和第一连接器;
第二组成部分, 设置有第二主板、 与所述第二主板连接的第二处理器以及与所述 第一连接器对应设置的第二连接器;
第一组成部分和第二组成部分能够通过所述第一连接器和第二连接器形成连接; 所述第二连接器用于通过第二连接器驱动模块从所述硬件设备的第二驱动模块 接收来自运行于所述第二组成部分中的第二应用的第二数据, 并将所述第二数据发送 到所述第一连接器, 使第一连接器驱动模块能够从所述第一连接器获取所述第二数 据, 并将所述第二数据通过所述硬件设备的第一驱动模块发送给所述硬件设备。
第二实施例中, 第一电子设备设置有第一主板、 与所述第一主板连接的第一处理 器、 能够共享的硬件设备和第一连接器;
所述第一连接器用于与第二连接器连接, 所述第二连接器设置于第二电子设备 上, 所述第二电子设备设置有第二主板以及与所述第二主板连接的第二处理器; 所述第一连接器用于将来自所述第二连接器的第二数据发送到第一连接器驱动 模块, 使所述第一连接器驱动模块将来自所述第一连接器的所述第二数据通过所述硬 件设备的第一驱动模块发送给所述硬件设备;
所述第二数据为所述第二连接器通过第二连接器驱动模块和所述硬件设备的第 二驱动模块接收到的来自运行于所述第二电子设备中的第二应用的数据。
所述能够共享的硬件设备包括多个, 所述第一连接器具体用于将来自第二连接器 的第二数据包发送给第一连接器驱动模块 , 使所述第一连接器驱动模块能够根据所述 第二数据包中的设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的 目标硬件设备的驱动模块发送给所述目标硬件设备;
所述第二数据包为所述第二连接器驱动模块将所述第二数据以及所述第二数据 的目标硬件设备的设备标识封装得到的数据包。
第二实施例中, 第二电子设备设置有第二主板、 与所述第二主板连接的第二处理 器和第二连接器;
所述第二连接器用于与第一连接器连接, 所述第一连接器设置于第一电子设备, 所述第一电子设备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的 硬件设备和所述第一连接器;
所述第二连接器用于通过第二连接器驱动模块从所述硬件设备的第二驱动模块 接收来自运行于所述第二组成部分中的第二应用的第二数据, 并将所述第二数据发送 到所述第一连接器, 使第一连接器驱动模块能够从所述第一连接器获取所述第二数 据, 并将所述第二数据通过所述硬件设备的第一驱动模块发送给所述硬件设备。
所述能够共享的硬件设备包括多个时, 所述第二连接器驱动模块具体用于将所述 第二数据以及所述第二数据的目标硬件设备的设备标识封装到第二数据包中;
所述第二连接器用于将所述第二数据包发送到所述第一连接器, 使第一连接器驱 动模块能够在通过所述第一连接器获取所述第二数据包后, 根据所述第二数据包中的 设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的
驱动模块发送给所述目标硬件设备。
以能够共享的硬件设备为声卡为例对本发明实施例的电子设备的工作过程详细 说明如下。
第二组成部分中运行的音频播放软件打开一声音文件(如 MP3文件、 WAV文件 等);
音频播放软件将从声音文件中提取的声音数据发送到运行于第二组成部分的操 作系统内的声卡驱动;
运行于第二组成部分的操作系统内的声卡驱动将声音数据发送到运行于第二组 成部分的操作系统内的连接器驱动;
运行于第二组成部分的操作系统内的连接器驱动将声音数据封装后通过第一连 接器和第二连接器之间的数据通道发送到运行于第一组成部分的操作系统内的连接 器驱动;
运行于第一组成部分的操作系统内的连接器驱动解封装后将之转发给运行于第 一组成部分的操作系统内的声卡驱动;
运行于第一组成部分的操作系统内的声卡驱动将声音数据发送给声卡, 由声卡播 放。
在本发明的具体实施例中, 想要使得第二组成部分中运行的应用程序与第一组成 部分中的硬件设备进行数据交互, 在第一组成部分和第二组成部分的操作系统中同时 设置有硬件设备的驱动模块的情况下, 由于已经可以通过第一组成部分中硬件设备的 驱动模块与硬件设备交互, 也可以通过第二组成部分中硬件设备的驱动模块与应用程 序交互, 所以只需要在第一组成部分和第二组成部分的操作系统中设置的硬件设备的 驱动模块之间搭建一个通道, 即可在第二组成部分中运行的应用程序与第一组成部分 中的硬件设备之间建立数据通道, 而该通道由第一连接器和第二连接器以及对应的连 接器驱动来实现。
由于现有的第一部分和第二部分之间也存在连接器, 所以该连接器可以复用已有 的连接器来实现, 至于第一连接器和第二连接器具体釆用何种方式进行数据传输, 在 本发明的具体实施例中并不限定, 只需要能够进行数据的传递即可。
从以上描述可以发现, 对于同一硬件设备, 存在两个驱动模块, 而驱动模块的一 个重要作用是在应用程序和硬件设备间进行数据格式的转换, 使得应用程序和硬件设
备能够识别接收到的数据, 在存在两个驱动模块的情况下, 该转换的操作可以由任意 一个驱动模块来执行, 而另外一个驱动模块就只是提供一个访问接口即可, 举例说明 如下。
以上述的声音数据为例, 可以将运行于第二组成部分的操作系统内的声卡驱动对 音频播放软件下发的声音数据进行转换, 此时, 运行于第一组成部分的操作系统内的 声卡驱动就不需要对接收到的数据进行转换处理, 而只是提供一个下发数据到声卡的 通道。
当然, 也可以将运行于第一组成部分的操作系统内的声卡驱动对音频播放软件下 发的声音数据进行转换, 此时, 运行于第二组成部分的操作系统内的声卡驱动就不需 要对接收到的数据进行转换处理, 而只是提供一个从应用程序接收待下发数据的接 Π。
以上两个实施例分别描述了从硬件设备获取数据和下发数据到硬件设备的过程, 但在某些情况下, 这两个过程同时存在, 如从存储设备读取数据进行修改后保存到存 储设备, 对于这种情况而言, 其两个过程之间并没有实盾的联系, 分开来看, 两个过 程分别与之前提到的两个过程——对应, 因此, 对这种情况不再详细说明。
以上都是以单个共享设备为例进行的说明, 在存在多个共享设备的情况下, 本发 明第一实施例的第一连接器驱动模块具体用于将所述第一数据以及发送所述第一数 据的硬件设备的设备标识封装到第一数据包中;
所述第一连接器用于将所述第一数据包发送到所述第二连接器, 使第二连接器驱 动模块能够在通过所述第二连接器获取所述第一数据包后, 根据所述第一数据包中的 设备标识, 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的驱动 模块提供给运行于所述第二组成部分中的第一应用使用。
在所述能够共享的硬件设备包括多个时, 所述第一连接器驱动模块具体用于将所 述第一数据以及发送所述第一数据的硬件设备的设备标识封装到第一数据包中; 所述第一连接器具体用于将所述第一数据包发送到所述第二连接器, 使第二连接 器驱动模块能够在通过所述第二连接器获取所述第一数据包后, 根据所述第一数据包 中的设备标识 , 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的 驱动模块提供给运行于所述第二电子设备中的第一应用使用。
所述能够共享的硬件设备包括多个时, 所述第二连接器具体用于从所述第一连接
器接收第一数据包, 并将所述第一数据包发送给第二连接器驱动模块, 使所述第二连 接器驱动模块能够根据所述第一数据包中的设备标识, 将所述第一数据包中的第一数 据通过所述设备标识对应的硬件设备的驱动模块提供给运行于所述第二电子设备中 的第一应用使用;
所述第一数据包为第一连接器驱动模块将所述第一数据以及发送所述第一数据 的硬件设备的设备标识封装得到的数据包。
以共享设备为触摸屏、 摄像头和网卡为例。
当用户触摸位于第一组成部分上的触摸展;
运行于第一组成部分的操作系统内的触摸展驱动通过与触摸展交互, 得到一输入 数据;
触摸屏驱动将该输入数据发送给运行于第一组成部分的操作系统内的第一连接 器驱动;
第一连接器驱动将数据封装后通过第一连接器和第二连接器之间的数据通道发 送到第一连接器驱动;
此时, 封装后的数据包中至少包括如下两部分的内容: 原始数据以及所述第一数 据的硬件设备的设备标识, 在这个举例中为触摸屏, 如可以预先设置其设备标识为 1。
第二连接器驱动接收到数据包后, 解封装, 得到两部分数据: 设备标识和原始数 据, 此时第二连接器驱动即可根据设备标识将原始数据转发给运行于第二组成部分的 操作系统内的触摸展驱动;
运行于第二组成部分的操作系统内的触摸展驱动将该数据发送给应用程序, 供应 用程序使用。
同样对于发送数据到共享设备的情况而言, 在存在多个共享设备的情况下, 所述 第二连接器驱动模块具体用于将所述第二数据以及所述第二数据的目标硬件设备的 设备标识封装到第二数据包中;
所述第二连接器用于将所述第二数据包发送到所述第一连接器, 使第一连接器驱 动模块能够在通过所述第一连接器获取所述第二数据包后, 根据所述第二数据包中的 设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的 驱动模块发送给所述目标硬件设备。
以能够共享的硬件设备包括声卡、 振动马达为例对本发明实施例的电子设备的工
作过程详细说明如下。
第二组成部分中运行的音频播放软件打开一声音文件(如 MP3文件、 WAV文件 等);
音频播放软件将从声音文件中提取的声音数据发送到运行于第二组成部分的操 作系统内的声卡驱动;
运行于第二组成部分的操作系统内的声卡驱动将声音数据发送到运行于第二组 成部分的操作系统内的连接器驱动;
运行于第二组成部分的操作系统内的连接器驱动将声音数据封装后通过第一连 接器和第二连接器之间的数据通道发送到运行于第一组成部分的操作系统内的连接 器驱动;
此时封装后的数据包包括两部分: 声音数据以及目标硬件设备(声卡) 的设备标 识;
运行于第一组成部分的操作系统内的连接器驱动解封装后得到两部分数据: 声音 数据以及目标硬件设备(声卡) 的设备标识, 此时即可将声音数据转发给运行于第一 组成部分的操作系统内的声卡驱动;
运行于第一组成部分的操作系统内的声卡驱动将声音数据发送给声卡, 由声卡播 放。
通过以上的设置, 即使需要共享的设备再多, 也可以利用连接器驱动模块将其封 装成统一的模式, 并通过一个硬件设备 ID来区分目的地, 所以本发明实施例的电子 设备不再受到设备硬件接口的局限, 无论是 USB/I2C/SPI接口的设备, 都可以通过相 同的方式进行共享, 因此能够实现筒单有效的硬件设备共享。
根据本发明实施例的数据传输方法, 用于在第一组成部分和第二组成部分之间进 行数据传输, 所述第一组成部分和第二组成部分通过对应设置的第一连接器和第二连 接器形成连接, 所述第一组成部分中设置有能够共享的硬件设备, 所述数据传输方法 如图 1所示, 包括:
步骤 S 102, 第一驱动模块接收来自所述硬件设备的第一数据, 所述第一驱动模块 运行于第一组成部分的操作系统中;
步骤 S104, 第一驱动模块将第一数据发送到第一连接器驱动模块;
步骤 S106,第一连接器驱动模块将所述第一数据通过第一连接器和第二连接器连
接后形成的数据通道发送第二连接器驱动模块;
步骤 S108,第二连接器驱动模块将来自第二连接器的第一数据发送到第二驱动模 块, 所述第二驱动模块运行于第二组成部分的操作系统中;
步骤 S110,第二驱动模块将第一数据提供给运行于所述第二组成部分中的第一应 用使用。
根据本发明另一实施例的数据传输方法, 用于在第一组成部分和第二组成部分之 间进行数据传输, 所述第一组成部分和第二组成部分通过对应设置的第一连接器和第 二连接器形成连接, 所述第一组成部分中设置有能够共享的硬件设备, 所述数据传输 方法如图 2所示, 包括:
步骤 S202, 第二驱动模块接收来自运行于第二组成部分中的第二应用的第二数 据, 所述第二驱动模块运行于第一组成部分的操作系统中;
步骤 S204 , 第二驱动模块将第二数据发送到第二连接器驱动模块;
步骤 S206,第二连接器驱动模块将所述第二数据通过第一连接器和第二连接器连 接后形成的数据通道发送第一连接器驱动模块;
步骤 S208,第一连接器驱动模块将来自第一连接器的第二数据发送到第一驱动模 块, 所述第一驱动模块运行于第二组成部分的操作系统中;
步骤 S210, 第一驱动模块将第二数据提供给硬件设备。
在以上的实施例中, 并不需要确定第一组成部分和第二组成部分是否连接, 当二 者没有连接时, 由于连接器并没有连接, 所以由 MCU/EC发送到第一连接器 /第二连 接器数据会被第一连接器 /第二连接器直接丢弃。 当两者连接在一起时, 由于连接器连 接在一起, 两个连接器之间的数据链路自然就形成, 所以由 MCU/EC发送到第一连接 器 /第二连接器数据会被第一连接器 /第二连接器对应发送到第二连接器 /第一连接器。
但在本发明的具体实施例中, 为了保证数据的有效性, 同样可以检测第一组成部 分和第二组成部分是否通过对应设置的第一连接器和第二连接器连接 , 并根据连接状 况来进行后续的处理, 其中, MCU检测到连接存在时, 会将来自能够共享的硬件设 备的数据发送到第一连接器, 进而通过第一连接器将数据传输到第二连接器, 同时, 也会将从第一连接器接收到的数据通过连接器驱动和硬件设备的驱动发送到能够共 享的硬件设备, 当然, 在 MCU检测到连接不存在时, 则会按照现有的方式进行处理, 将来自能够共享的硬件设备的数据发送到对应的应用程序进行处理,和 /或将待发送到
能够共享的硬件设备的数据发送到硬件设备。
而对于第二组成部分而言, 当 EC检测到连接存在时, 会将从第二连接器接收到 的来自能够共享的硬件设备的数据发送给第二组成部分中运行的应用程序使用, 而同 时,在收到待通过连接器发送的数据时,会通过第二连接器将数据传输到第一连接器。 对于能够共享的硬件设备而言,其设置于第一组成部分,并没有设置在第二组成部分, 因此, 当 EC检测不到连接存在时, 在第二组成部分中, 能够共享的硬件设备处于无 法使用的状态, 因此不会有待发送到硬件设备的数据 , 同时第二连接器也不会收到来 自对端的数据。
图 3示出了本发明实施例的第一组成部分和第二组成部分中处理器与连接器的结 构及连接 , 如图 3所示, 假定第二组成部分 302作为主系统, 其中包括嵌入式控制器 EC, 第一组成部分 304作为从系统, 其中包括了微控制单元 MCU, 在 EC和 MCU上 分别设置了的物理接口, 该物理接口包括连接检测接口 CONJNF 和数据传输接口 DATA INF, 而同时第一和第二连接器 CO NECTOR1, CO NECTOR2上也设置有连 接检测管脚 CON PIN和数据传输管脚 DATA PIN,与连接检测接口 CONJNF和数据 传输接口 D ATAJNF对应连接。
EC和 MCU用于通过连接检测接口 CONJNF和连接检测管脚 CON PIN来判断 第一连接器 CO NECTOR1和第二连接器 CONNECTOR2是否连接,并在判断出第一 连接器 CO NECTOR1和第二连接器 CO NECTOR2连接时,才将数据发送到对应的 连接器。
如图 3中所示, 其中 B_DET用于由 EC向 MCU传输主系统的第一信号, 当主系 统和从系统接合时, 由此 MCU可以根据该第一信号检测是否有主系统存在; S_DET 用于由 MCU向 EC传输从系统的第二信号, 当主系统和从系统接合时, 由此 EC可以 根据第二信号检测是否有从系统存在; S_BUS 为串行通讯总线, 例如 I2C ( Inter-Integrated Circuit )、 SPI ( Serial Peripheral Interface, 串行外围接口)、 UART ( Universal Asynchronous Receiver/Transmitter, 通用异步接收 /发射器 )等, 当主系统 和从系统接合该 S_BUS构成了主系统和从系统之间的数据传输通道。
通过以上的设置, 可以通过连接检测管脚来检测第一连接器 CO NECTOR1和第 二连接器 CO NECTOR2是否处于连接状态, 而只有在第一连接器 CO NECTOR1和 第二连接器 CO NECTOR2处于连接状态时, MCU/EC才会将数据通过第一连接器 /
第二连接器发送到对端。
如图 4所示, 为本发明实施例的一种硬件架构示意图, 其中包括两部分, 一部分 为 ARM系统 402, 有共享硬件设备 (触摸屏 TOUC、摄像头 CAM以及光学手指导航 设备 OFN )通过总线 404连接到 ARM系统 402, 而 ARM系统通过连接器 406并经 由数据链路 DATA_LINK连接到 X86系统 408。
如图 5所示, 为本发明实施例的一种软件架构示意图。 Android操作系统加载了 各种共享硬件设备 (触摸屏 TOUC、 摄像头 CAM以及光学手指导航设备 OFN ) 的驱 动程序 /驱动模块 DRV1、 DRV2和 DRV3。 当 Android操作系统进行常规处理时, 驱 动模块 DRV1、 DRV2和 DRV3按照常规方式, 按照相应的协议与各自的硬件设备交 互。 Android操作系统端的电子设备上的驱动模块 DRV1、 DRV2和 DRV3为真实的驱 动模块。 而当要与另一系统 (例如 Windows7操作系统)进行连接 , 以便在 Windows7系 统下运行有关硬件设备的应用时, 共享设备的驱动程序 /驱动模块 DRV1、 DRV2 和 DRV3 都连接到连接器驱动连接 C0N_DRV1。 Window7 操作系统中也对应设置有 CON DRV2 以及上述共享设备的驱动 DRV1, 、 DRV2' 和 DRV3 ' , 这些驱动与 Windows7 下的相关应用交互, 并且也都连接到连接器驱动 CON_DRV2。 Windows7 操作系统端的电子设备上的驱动模块 DRV1'、 DRV2' 和 DRV3 ' 为虚拟的驱动模块。 因为在 windows7操作系统端的电子设备上无 DRV1'、 DRV2' 和 DRV3' 对应的真实 硬件。 更进一步的, 所以 windows7 操作系统端的电子设备上的驱动模块 DRV 1 '、 DRV2' 和 DRV3' 在检测到两个系统连接上时, windows7操作系统才能够识别 /加载 该驱动模块 DRV1'、 DRV2' 和 DRV3'。 两个操作系统中的连接器驱动 C0N_DRV1 和 CON_DRV2通过连接器连接形成数据链路 DATA LINK或数据通道而相互连接。 例如,当 Android操作系统下驱动模块 DRV2接收来自 CAM的数据时,驱动模块 DRV2 将数据发送到连接器驱动模块 C0N_DRV1 , 该连接器驱动模块 C0N_DRV1将数据通 过数据通道发送连接器驱动模块 CON_DRV2。 连接器驱动模块 CON_DRV2将来自数 据发送到 Windows7系统下对应的驱动模块 DRV2, 该驱动模块 DRV2进而将数据提 供给运行于 Windows7系统下的应用使用。
在现有技术中需要在两个连接器分别针对每个硬件设备均设置相应的管脚, 例如 对于摄像头 CAM, 需要为 USB协议设置至少两个管脚, 导致连接器的管脚数量多, 所需长度较长。 而根据本发明实施例, 设置了连接器驱动模块, 从而结合图 3在两个
连接器之间只需要设置三对相应的管脚, 实现连接检测和数据传输, 这减少了管脚数 目和管脚长度。 可以通过设置硬件设备 ID来实现数据的路由, 即使共享的设备再多, 也可以利用连接器驱动模块将其封装成统一的模式, 并通过一个硬件设备 ID来区分 目的地。 所以本发明实施例的电子设备不再受到设备硬件接口的局限, 无论是
USB/I2C/SPI接口的设备, 都可以通过相同的方式进行共享, 因此能够实现筒单有效 的硬件设备共享。
以上所述仅是本发明的优选实施方式, 应当指出, 对于本技术领域的普通技术人 员来说, 在不脱离本发明原理的前提下, 还可以做出若千改进和润饰, 这些改进和润 饰也应视为本发明的保护范围。
Claims
1.一种电子设备, 包括:
第一组成部分, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享 的硬件设备和第一连接器;
第二组成部分,设置有第二主板、 与所述第二主板连接的第二处理器以及与所述 第一连接器对应设置的第二连接器;
第一组成部分和第二组成部分能够通过所述第一连接器和第二连接器形成连接; 所述第一连接器用于通过第一连接器驱动模块从所述硬件设备的第一驱动模块 接收来自所述硬件设备的第一数据 , 并将所述第一数据发送到所述第二连接器, 使第 二连接器驱动模块能够将来自第二连接器的第一数据通过所述硬件设备的第二驱动 模块提供给运行于所述第二组成部分中的第一应用使用。
2. 根据权利要求 1所述的电子设备, 其中, 所述能够共享的硬件设备包括多个, 所述第一连接器驱动模块具体用于将所述第一数据以及发送所述第一数据的硬件设 备的设备标识封装到第一数据包中;
所述第一连接器用于将所述第一数据包发送到所述第二连接器,使第二连接器驱 动模块能够在通过所述第二连接器获取所述第一数据包后, 根据所述第一数据包中的 设备标识, 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的驱动 模块提供给运行于所述第二组成部分中的第一应用使用。
3. 一种第一电子设备, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的硬件设备和第一连接器;
所述第一连接器用于与第二连接器连接, 所述第二连接器设置于第二电子设备 上, 所述第二电子设备设置有第二主板以及与所述第二主板连接的第二处理器;
所述第一连接器还用于通过第一连接器驱动模块和所述硬件设备的第一驱动模 块接收来自所述硬件设备的第一数据 , 并将所述第一数据发送到所述第二连接器, 使 第二连接器驱动模块能够将来自所述第二连接器的所述第一数据通过所述硬件设备 的第二驱动模块提供给运行于所述第二电子设备中的第一应用使用。
4. 根据权利要求 3 所述的第一电子设备, 其中, 所述能够共享的硬件设备包括 多个, 所述第一连接器驱动模块具体用于将所述第一数据以及发送所述第一数据的硬 件设备的设备标识封装到第一数据包中; 所述第一连接器具体用于将所述第一数据包发送到所述第二连接器,使第二连接 器驱动模块能够在通过所述第二连接器获取所述第一数据包后, 根据所述第一数据包 中的设备标识 , 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备的 驱动模块提供给运行于所述第二电子设备中的第一应用使用。
5. 一种第二电子设备, 设置有第二主板、 与所述第二主板连接的第二处理器和 第二连接器;
所述第二连接器用于与第一连接器连接, 所述第一连接器设置于第一电子设备, 所述第一电子设备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的 硬件设备和所述第一连接器;
所述第二连接器还用于将从所述第一连接器接收到的第一数据发送到第二连接 器驱动模块 , 使第二连接器驱动模块将所述第一数据通过所述硬件设备的第二驱动模 块提供给运行于所述第二组成部分中的第一应用使用;
其中,所述第一数据为所述第一连接器通过第一连接器驱动模块和所述硬件设备 的第一驱动模块接收到的来自所述硬件设备的数据。
6. 根据权利要求 5 所述的第二电子设备, 其中, 所述能够共享的硬件设备包括 多个, 所述第二连接器具体用于从所述第一连接器接收第一数据包, 并将所述第一数 据包发送给第二连接器驱动模块, 使所述第二连接器驱动模块能够根据所述第一数据 包中的设备标识 , 将所述第一数据包中的第一数据通过所述设备标识对应的硬件设备 的驱动模块提供给运行于所述第二电子设备中的第一应用使用;
所述第一数据包为第一连接器驱动模块将所述第一数据以及发送所述第一数据 的硬件设备的设备标识封装得到的数据包。
7. 一种电子设备, 包括:
第一组成部分, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享 的硬件设备和第一连接器;
第二组成部分,设置有第二主板、 与所述第二主板连接的第二处理器以及与所述 第一连接器对应设置的第二连接器;
第一组成部分和第二组成部分能够通过所述第一连接器和第二连接器形成连接; 所述第二连接器用于通过第二连接器驱动模块从所述硬件设备的第二驱动模块 接收来自运行于所述第二组成部分中的第二应用的第二数据, 并将所述第二数据发送 到所述第一连接器, 使第一连接器驱动模块能够从所述第一连接器获取所述第二数 据, 并将所述第二数据通过所述硬件设备的第一驱动模块发送给所述硬件设备。 所述硬件设备响应所述第二数据。
8. 根据权利要求 7所述的电子设备, 其中, 在存在多个共享设备的情况下, 所 述第二连接器驱动模块具体用于将所述第二数据以及所述第二数据的目标硬件设备 的设备标识封装到第二数据包中;
所述第二连接器用于将所述第二数据包发送到所述第一连接器,使第一连接器驱 动模块能够在通过所述第一连接器获取所述第二数据包后, 根据所述第二数据包中的 设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的 驱动模块发送给所述目标硬件设备。
9. 一种第一电子设备, 设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的硬件设备和第一连接器;
所述第一连接器用于与第二连接器连接, 所述第二连接器设置于第二电子设备 上, 所述第二电子设备设置有第二主板以及与所述第二主板连接的第二处理器; 所述第一连接器用于将来自所述第二连接器的第二数据发送到第一连接器驱动 模块, 使所述第一连接器驱动模块将来自所述第一连接器的所述第二数据通过所述硬 件设备的第一驱动模块发送给所述硬件设备;
所述第二数据为所述第二连接器通过第二连接器驱动模块和所述硬件设备的第 二驱动模块接收到的来自运行于所述第二电子设备中的第二应用的数据。
10. 根据权利要求 9所述的第一电子设备, 其中, 所述能够共享的硬件设备包括 多个, 所述第一连接器具体用于将来自第二连接器的第二数据包发送给第一连接器驱 动模块, 使所述第一连接器驱动模块能够根据所述第二数据包中的设备标识 , 将所述 第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的驱动模块发送给 所述目标硬件设备;
所述第二数据包为所述第二连接器驱动模块将所述第二数据以及所述第二数据 的目标硬件设备的设备标识封装得到的数据包。
11. 一种第二电子设备, 设置有第二主板、 与所述第二主板连接的第二处理器和 第二连接器;
所述第二连接器用于与第一连接器连接, 所述第一连接器设置于第一电子设备, 所述第一电子设备设置有第一主板、 与所述第一主板连接的第一处理器、 能够共享的 硬件设备和所述第一连接器; 所述第二连接器用于通过第二连接器驱动模块从所述硬件设备的第二驱动模块 接收来自运行于所述第二组成部分中的第二应用的第二数据, 并将所述第二数据发送 到所述第一连接器, 使第一连接器驱动模块能够从所述第一连接器获取所述第二数 据, 并将所述第二数据通过所述硬件设备的第一驱动模块发送给所述硬件设备。
12. 根据权利要求 11 所述的第二电子设备, 其中, 所述能够共享的硬件设备包 括多个时, 所述第二连接器驱动模块具体用于将所述第二数据以及所述第二数据的目 标硬件设备的设备标识封装到第二数据包中;
所述第二连接器用于将所述第二数据包发送到所述第一连接器,使第一连接器驱 动模块能够在通过所述第一连接器获取所述第二数据包后, 根据所述第二数据包中的 设备标识, 将所述第二数据包中的第二数据通过所述设备标识对应的目标硬件设备的 驱动模块发送给所述目标硬件设备。
13. 一种数据传输方法, 用于在第一组成部分和第二组成部分之间进行数据传 输, 其中, 所述第一组成部分和第二组成部分通过对应设置的第一连接器和第二连接 器形成连接, 所述第一组成部分中设置有能够共享的硬件设备, 所述数据传输方法包 括:
第一驱动模块接收来自所述硬件设备的第一数据;所述第一驱动模块运行于第一 组成部分的操作系统中;
第一驱动模块将第一数据发送到第一连接器驱动模块;
第一连接器驱动模块将所述第一数据通过第一连接器和第二连接器连接后形成 的数据通道发送第二连接器驱动模块;
第二连接器驱动模块将来自第二连接器的第一数据发送到第二驱动模块,所述第 二驱动模块运行于第二组成部分的操作系统中;
第二驱动模块将第一数据提供给运行于所述第二组成部分中的第一应用使用。
14. 一种数据传输方法, 用于在第一组成部分和第二组成部分之间进行数据传 输, 其中, 所述第一组成部分和第二组成部分通过对应设置的第一连接器和第二连接 器形成连接, 所述第一组成部分中设置有能够共享的硬件设备, 所述数据传输方法包 括:
第二驱动模块接收来自运行于第二组成部分中的第二应用的第二数据;所述第二 驱动模块运行于第一组成部分的操作系统中;
第二驱动模块将第二数据发送到第二连接器驱动模块; 第二连接器驱动模块将所述第二数据通过第一连接器和第二连接器连接后形成 的数据通道发送第一连接器驱动模块;
第一连接器驱动模块将来自第一连接器的第二数据发送到第一驱动模块,所述第 一驱动模块运行于第二组成部分的操作系统中;
第一驱动模块将第二数据提供给硬件设备。
Priority Applications (1)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| US13/995,536 US9430431B2 (en) | 2010-12-20 | 2011-12-20 | Multi-part electronic device and data transmission method |
Applications Claiming Priority (2)
| Application Number | Priority Date | Filing Date | Title |
|---|---|---|---|
| CN201010612356.2 | 2010-12-20 | ||
| CN201010612356.2A CN102567249B (zh) | 2010-12-20 | 2010-12-20 | 一种电子设备及其数据传输方法 |
Publications (1)
| Publication Number | Publication Date |
|---|---|
| WO2012083839A1 true WO2012083839A1 (zh) | 2012-06-28 |
Family
ID=46313167
Family Applications (1)
| Application Number | Title | Priority Date | Filing Date |
|---|---|---|---|
| PCT/CN2011/084283 Ceased WO2012083839A1 (zh) | 2010-12-20 | 2011-12-20 | 电子设备及数据传输方法 |
Country Status (3)
| Country | Link |
|---|---|
| US (1) | US9430431B2 (zh) |
| CN (1) | CN102567249B (zh) |
| WO (1) | WO2012083839A1 (zh) |
Families Citing this family (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN104111905B (zh) | 2013-04-18 | 2017-05-10 | 威盛电子股份有限公司 | 外接式电子装置与外接式电子装置控制方法 |
| CN103984657B (zh) | 2013-09-26 | 2017-05-10 | 威盛电子股份有限公司 | 接口控制器、外接式电子装置及其控制方法 |
| CN103823771B (zh) * | 2014-03-04 | 2017-02-08 | 飞天诚信科技股份有限公司 | 一种远程通信方法和系统 |
| CN104993983A (zh) * | 2015-05-27 | 2015-10-21 | 青岛海信电器股份有限公司 | 一种共享网络硬件的系统 |
Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1987791A (zh) * | 2005-12-22 | 2007-06-27 | 国际商业机器公司 | 用于共享硬件设备的基于文件的访问控制方法和装置 |
| CN101093448A (zh) * | 2006-06-23 | 2007-12-26 | 联想(北京)有限公司 | 一种虚拟机系统及其硬件设备的切换方法 |
| US20090113458A1 (en) * | 2007-10-31 | 2009-04-30 | Microsoft Corporation | Controlling hardware across two or more simultaneously running operating systems |
| US20100228816A1 (en) * | 2009-03-03 | 2010-09-09 | Asustek Computer Inc. | Sharing system and management method for hardware device |
Family Cites Families (6)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| US5764924A (en) * | 1995-08-24 | 1998-06-09 | Ncr Corporation | Method and apparatus for extending a local PCI bus to a remote I/O backplane |
| US5941968A (en) * | 1997-04-14 | 1999-08-24 | Advanced Micro Devices, Inc. | Computer system for concurrent data transferring between graphic controller and unified system memory and between CPU and expansion bus device |
| US6161157A (en) * | 1998-10-27 | 2000-12-12 | Intel Corporation | Docking system |
| US6718415B1 (en) * | 1999-05-14 | 2004-04-06 | Acqis Technology, Inc. | Computer system and method including console housing multiple computer modules having independent processing units, mass storage devices, and graphics controllers |
| US8015331B2 (en) * | 2005-06-29 | 2011-09-06 | Microsoft Corporation | Multi-console workstations concurrently supporting multiple users |
| TW200951731A (en) * | 2008-06-02 | 2009-12-16 | First Int Computer Inc | Changeable CPU module apparatus for a computer |
-
2010
- 2010-12-20 CN CN201010612356.2A patent/CN102567249B/zh active Active
-
2011
- 2011-12-20 WO PCT/CN2011/084283 patent/WO2012083839A1/zh not_active Ceased
- 2011-12-20 US US13/995,536 patent/US9430431B2/en active Active
Patent Citations (4)
| Publication number | Priority date | Publication date | Assignee | Title |
|---|---|---|---|---|
| CN1987791A (zh) * | 2005-12-22 | 2007-06-27 | 国际商业机器公司 | 用于共享硬件设备的基于文件的访问控制方法和装置 |
| CN101093448A (zh) * | 2006-06-23 | 2007-12-26 | 联想(北京)有限公司 | 一种虚拟机系统及其硬件设备的切换方法 |
| US20090113458A1 (en) * | 2007-10-31 | 2009-04-30 | Microsoft Corporation | Controlling hardware across two or more simultaneously running operating systems |
| US20100228816A1 (en) * | 2009-03-03 | 2010-09-09 | Asustek Computer Inc. | Sharing system and management method for hardware device |
Also Published As
| Publication number | Publication date |
|---|---|
| CN102567249A (zh) | 2012-07-11 |
| CN102567249B (zh) | 2015-08-26 |
| US9430431B2 (en) | 2016-08-30 |
| US20130275645A1 (en) | 2013-10-17 |
Similar Documents
| Publication | Publication Date | Title |
|---|---|---|
| US11681643B2 (en) | Flexible mobile device connectivity to automotive systems with USB hubs | |
| US10437765B2 (en) | Link system for establishing high speed network communications and file transfer between hosts using I/O device links | |
| KR101700380B1 (ko) | 다중 프로토콜 저장 장치 브리지 | |
| US9864607B2 (en) | Methods and physical computer-readable storage media for initiating re-enumeration of USB 3.0 compatible devices | |
| KR20110088454A (ko) | 디바이스들의 토폴로지에서 오디오/비디오 스트리밍을 위한 메시지 전달 프레임워크 | |
| CN107391419A (zh) | 支持多主机的通用序列汇流排集线设备及车用主机 | |
| CN210129132U (zh) | 交互智能平板 | |
| WO2012083839A1 (zh) | 电子设备及数据传输方法 | |
| CN210129206U (zh) | 交互智能平板 | |
| CN115663549B (zh) | 多接口转换装置及车辆 | |
| CN210129207U (zh) | 交互智能平板 | |
| CN221884301U (zh) | 高速接口扩展板卡与电子设备 | |
| US20120260013A1 (en) | KVM switcher (Multi-computer switcher) with integrated parallel transmission, serial peripheral interface and universal serial bus | |
| CN104360978B (zh) | Scart/uart接口复用电路及使用该电路的电子设备 | |
| CN100375072C (zh) | 一种电脑主机的延伸装置 | |
| US20130222121A1 (en) | Remote control system capable of bidirectionally exchanging data by signal line and method thereof | |
| CN106649174B (zh) | 一种usb设备及usb通信方法 | |
| CN103744822B (zh) | 向cpu传输来自usb主设备的信号的方法、控制器与系统 | |
| CN120729280A (zh) | 一种不同数据链路的输出匹配电路及数据输出系统 | |
| WO2025107196A1 (zh) | 解串控制电路、数据处理装置及相关方法 | |
| CN101316255A (zh) | 无线多媒体多跳收发/中转器及其信号传输方法 | |
| JP2004266564A (ja) | 通信システム |
Legal Events
| Date | Code | Title | Description |
|---|---|---|---|
| 121 | Ep: the epo has been informed by wipo that ep was designated in this application |
Ref document number: 11850912 Country of ref document: EP Kind code of ref document: A1 |
|
| WWE | Wipo information: entry into national phase |
Ref document number: 13995536 Country of ref document: US |
|
| NENP | Non-entry into the national phase |
Ref country code: DE |
|
| 122 | Ep: pct application non-entry in european phase |
Ref document number: 11850912 Country of ref document: EP Kind code of ref document: A1 |