CN-115344519-B - Function module and terminal equipment
Abstract
The application relates to a functional module and terminal equipment, and relates to the field of communication. The functional module comprises a module body, a switching circuit, a first USB interface, a second USB interface and a control circuit, wherein a voltage detection end of the first USB interface is connected with a control end of the switching circuit and a first input end of the control circuit, a device detection end of the first USB interface is connected with a second input end of the control circuit, a mode control end of the control circuit is connected with a mode switching end of the module body, when the first USB interface is inserted into a main device, the control circuit controls the module body to work in a slave device mode, the switching circuit switches to the first USB interface, and when the first USB interface is inserted into a slave device, the control circuit controls the module body to work in the main device mode, and the switching circuit switches to the first USB interface. The application is used for solving the problem that the USB debugging interface can not realize the OTG function under the condition that the function module expands the USB interface through the HUB.
Inventors
- WANG PENG
Assignees
- 深圳市广和通无线股份有限公司
Dates
- Publication Date
- 20260508
- Application Date
- 20220805
Claims (8)
- 1. The functional module is characterized by comprising a module main body, a switching circuit, a first USB interface, a second USB interface and a control circuit; The USB connecting end of the module main body is connected with the fixed connecting end of the switching circuit, the first switching end and the second switching end of the switching circuit are respectively connected with the USB connecting end of the first USB interface and the USB connecting end of the second USB interface, the voltage detecting end of the first USB interface is connected with the control end of the switching circuit and the first input end of the control circuit, the equipment detecting end of the first USB interface is connected with the second input end of the control circuit, and the mode control end of the control circuit is connected with the mode switching end of the module main body; When the first USB interface is inserted into the slave device, the control circuit controls the module main body to work in a master device mode, and the switching circuit is switched to the first USB interface; When the first USB interface is suspended, the control circuit controls the module main body to work in a main equipment mode, the switching circuit is switched to the second USB interface, the voltage detection end is low level, the equipment detection end is high level, and the mode switching end is low level.
- 2. The function module of claim 1, wherein the voltage detection terminal is high, the device detection terminal is high, the mode switching terminal is high, and the module body operates in a slave mode when the first USB interface is plugged into the master device, wherein the voltage detection terminal is high, the device detection terminal is low, the mode switching terminal is low, and the module body operates in a master mode when the first USB interface is plugged into the slave device.
- 3. The functional module of claim 1, wherein a power output of the control circuit is connected to the voltage detection terminal of the first USB interface; and when the equipment detection end is at a low level, the power supply output end is at a high level.
- 4. A functional module according to claim 3, wherein the control circuit comprises an in-phase circuit a, an in-phase circuit B, OTG power supply and an and operation circuit; The voltage detection end of the first USB interface is connected with the input end of the in-phase circuit B, the output end of the in-phase circuit B is connected with the first input end of the AND operation circuit, the equipment detection end of the first USB interface is connected with the input end of the in-phase circuit A, the output end of the in-phase circuit A is connected with the second input end of the AND operation circuit, the output end of the AND operation circuit is connected with the mode switching end of the module main body, the control end of the in-phase circuit A is connected with the enabling end of the OTG power supply, and the output end of the OTG power supply is connected with the voltage detection end of the first USB interface.
- 5. The functional module of claim 4, wherein the in-phase circuit a includes a first transistor and a second transistor, and the in-phase circuit B includes a third transistor and a fourth transistor; The device detection end of the first USB interface is connected with the base electrode of the first triode, the emitting electrode of the first triode is grounded, the collecting electrode of the first triode is connected with the base electrode of the second triode, the emitting electrode of the second triode is grounded, the collecting electrode of the second triode is connected with the second input end of the AND operation circuit, the collecting electrode of the first triode is connected with the enabling end of the OTG power supply, the voltage detection end of the first USB interface is connected with the base electrode of the third triode, the emitting electrode of the third triode is grounded, the collecting electrode of the third triode is connected with the base electrode of the fourth triode, the emitting electrode of the fourth triode is grounded, and the collecting electrode of the fourth triode is connected with the first input end of the AND operation circuit.
- 6. The function module according to claim 1, further comprising a device detection end normal high circuit; the output end of the device detection end normal state high setting circuit is connected with the device detection end of the first USB interface; And the device detection end normal state high setting circuit is used for outputting a high level to the device detection end of the first USB interface when the first USB interface is suspended.
- 7. The functional module of claim 1, wherein the voltage detection terminal of the first USB interface is connected to a voltage detection terminal of the module body; The module main body is used for communicating with the equipment inserted into the first USB interface when the voltage detection end of the module main body is at a high level.
- 8. A terminal device comprising the functional module of any one of claims 1 to 7.
Description
Function module and terminal equipment Technical Field The present application relates to the field of communications, and in particular, to a functional module and a terminal device. Background Currently, a functional module needs to be connected to a plurality of USB (Universal Serial Bus ) devices, for example, a USB device is a camera, a display screen, etc., and since the functional module itself has only one USB interface and can be used as one of a host (host) mode and a slave (device) mode, a connection HUB (HUB) is required to extend the USB interface. Since the USB protocol specifies that only one master device can connect to multiple slave devices, and not one slave device can connect to multiple master devices, multiple USB interfaces extended by the HUB can only connect to slave devices, and operate in host mode. At present, due to The structure or The problem of own USB resource, a plurality of functional modules set The USB port expanded by The HUB inside The functional module, and The USB port can not be put outside The functional module for users to use, and The functional module is exposed outside, so that The users can use only an external USB debug interface, and The external USB debug interface must support The automatic switching function of The master device mode and The slave device mode, namely The OTG (On-The-Go) function. However, currently, when the function module expands the USB interface through the HUB, the USB debug interface can only support the slave mode, but cannot support the master mode. Disclosure of Invention The application provides a functional module and terminal equipment, which are used for solving the problem that an OTG (on-the-fly) function cannot be realized by a USB (universal serial bus) debugging interface under the condition that the USB interface is expanded by the functional module through a HUB. In a first aspect, an embodiment of the present application provides a functional module, including a module body, a switching circuit, a first USB interface, a second USB interface, and a control circuit; The USB connecting end of the module main body is connected with the fixed connecting end of the switching circuit, the first switching end and the second switching end of the switching circuit are respectively connected with the USB connecting end of the first USB interface and the USB connecting end of the second USB interface, the voltage detecting end of the first USB interface is connected with the control end of the switching circuit and the first input end of the control circuit, the equipment detecting end of the first USB interface is connected with the second input end of the control circuit, and the mode control end of the control circuit is connected with the mode switching end of the module main body; When the first USB interface is inserted into the slave device, the control circuit controls the module main body to work in the master device mode, and the switching circuit is switched to the first USB interface. Optionally, when the first USB interface is inserted into the master device, the voltage detection end is at a high level, the device detection end is at a high level, the mode switching end is at a high level, the module main body works in a slave device mode, when the first USB interface is inserted into the slave device, the voltage detection end is at a high level, the device detection end is at a low level, the mode switching end is at a low level, and the module main body works in a master device mode. Optionally, when the first USB interface is suspended, the control circuit controls the module main body to operate in a main device mode, and the switching circuit switches to the second USB interface. Optionally, when the first USB interface is suspended, the voltage detection end is at a low level, the device detection end is at a high level, the mode switching end is at a low level, and the module main body works in a main device mode. Optionally, a power output end of the control circuit is connected with the voltage detection end of the first USB interface; and when the equipment detection end is at a low level, the power supply output end is at a high level. Optionally, the control circuit includes an in-phase circuit a, an in-phase circuit B, OTG power supply, and an and operation circuit; The voltage detection end of the first USB interface is connected with the input end of the in-phase circuit B, the output end of the in-phase circuit B is connected with the first input end of the AND operation circuit, the equipment detection end of the first USB interface is connected with the input end of the in-phase circuit A, the output end of the in-phase circuit A is connected with the second input end of the AND operation circuit, the output end of the AND operation circuit is connected with the mode switching end of the module main body, the control end of the in-phase circuit A is connected with the enabling end of the OTG power