CN108268407B - Processing method of access equipment and mobile terminal - Google Patents

Processing method of access equipment and mobile terminal Download PDF

Info

Publication number
CN108268407B
CN108268407B CN201611265682.4A CN201611265682A CN108268407B CN 108268407 B CN108268407 B CN 108268407B CN 201611265682 A CN201611265682 A CN 201611265682A CN 108268407 B CN108268407 B CN 108268407B
Authority
CN
China
Prior art keywords
mobile terminal
pin
interface
type
charger
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201611265682.4A
Other languages
Chinese (zh)
Other versions
CN108268407A (en
Inventor
贾广琪
朱先平
刘彦彬
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Vivo Mobile Communication Co Ltd
Original Assignee
Vivo Mobile Communication Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Vivo Mobile Communication Co Ltd filed Critical Vivo Mobile Communication Co Ltd
Priority to CN201611265682.4A priority Critical patent/CN108268407B/en
Publication of CN108268407A publication Critical patent/CN108268407A/en
Application granted granted Critical
Publication of CN108268407B publication Critical patent/CN108268407B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F13/00Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F13/38Information transfer, e.g. on bus
    • G06F13/40Bus structure
    • G06F13/4063Device-to-bus coupling
    • G06F13/4068Electrical coupling
    • G06F13/4081Live connection to bus, e.g. hot-plugging

Abstract

The embodiment of the invention provides a processing method of access equipment and a mobile terminal, wherein the mobile terminal is connected with a transfer adapter through a Type C interface, and the method comprises the following steps: determining access equipment accessed to the mobile terminal through the switching adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is determined to be storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of the Type-C interface; and when the access equipment is determined to be a charger, charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin. The embodiment of the invention can solve the problems that the mobile terminal cannot realize simultaneous music listening, data transmission and charging and cannot process access of a plurality of devices by using one Type-C interface, and further cannot meet the development trend of ultra-thinness and integration of the mobile terminal.

Description

Processing method of access equipment and mobile terminal
Technical Field
The present invention relates to the field of communications technologies, and in particular, to a processing method for an access device and a mobile terminal.
Background
With The development of electronic technology and communication technology, a mobile terminal can listen to music, take a picture and store data, and The mobile terminal with The On-The-Go function can also perform data communication with a storage device.
Corresponding to the specific functions, the mobile terminal needs to be provided with an interface for accessing a peripheral device that needs to perform data interaction, such as an interface for accessing a peripheral device such as an earphone to perform audio transmission, a USB (universal serial Bus) interface for accessing a storage device, and a charging interface for accessing a charger. Therefore, the mobile terminal has a plurality of interfaces to meet the access requirements of different peripherals. The Type-C interface can carry out audio transmission, storage data transmission and charge, can cancel dedicated 3.5mm audio interface and the interface that charges to the Type-C interface volume is littleer, uses the Type-C interface can satisfy mobile terminal towards ultra-thinness and the development trend that integrates.
However, in the prior art, the mobile terminal with the OTG function cannot simultaneously listen to music, transmit data and charge and cannot handle the access of multiple devices by using one Type-C interface, and thus cannot meet the development trend of the mobile terminal towards ultra-thinness and integration.
Disclosure of Invention
The embodiment of the invention provides a processing method of access equipment and a mobile terminal, and aims to solve the problems that the mobile terminal cannot listen to music, transmit data and charge at the same time and cannot process access of a plurality of pieces of equipment by using a Type-C interface, and further cannot meet the development trend of the mobile terminal towards ultra-thinness and integration.
In a first aspect, an embodiment of the present invention provides a processing method for an access device, which is applied to a mobile terminal having a Type C interface, where the mobile terminal is connected to a transit adapter through the Type C interface, and the method includes:
determining access equipment accessed to the mobile terminal through the switching adapter;
when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface;
when the access equipment is determined to be storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of the Type-C interface;
and when the access equipment is determined to be a charger, charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
In a second aspect, a mobile terminal is provided, which includes a Type C interface, where the mobile terminal is connected to a transfer adapter through the Type C interface, and the mobile terminal further includes:
an access device determining module, configured to determine an access device that accesses the mobile terminal through the adaptor;
the first data communication module is used for carrying out data communication with the earphone through a D +/D-pin of the Type-C interface when the access equipment is determined to be the earphone;
the second data communication module is used for carrying out data communication with the storage device through a TX/RX pin of the Type-C interface when the access device is determined to be the storage device;
and the charging module is used for charging the mobile terminal through a D +/D-pin, a CC1/CC2 pin and a Vbus pin of the Type-C interface when the access equipment is determined to be a charger.
In the embodiment of the invention, the mobile terminal is connected with the switching adapter through the Type C interface, and the access equipment of the mobile terminal is determined to be accessed through the switching adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of a Type-C interface; when the access equipment is a charger, the mobile terminal is charged through a D +/D-pin of a Type-C interface, a CC1/CC2 pin and a Vbus pin.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the description of the embodiments of the present invention will be briefly introduced below, and it is obvious that the drawings in the following description are only some embodiments of the present invention, and it is obvious for those skilled in the art that other drawings can be obtained according to these drawings without inventive labor.
Fig. 1 is a flowchart illustrating steps of a processing method of an access device according to a first embodiment of the present invention;
fig. 2 is a flowchart illustrating steps of a processing method of an access device according to a second embodiment of the present invention;
FIG. 3 is a schematic diagram of the connection of the mobile terminal with the earphone, the storage device and the charger according to the embodiment of the invention;
fig. 4 is a block diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 4a is a second block diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 4b is a third block diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 4c is a fourth block diagram of a mobile terminal according to a third embodiment of the present invention;
fig. 5 is a block diagram of a mobile terminal according to a fourth embodiment of the present invention;
fig. 6 is a schematic structural diagram of a mobile terminal according to a fifth embodiment of the present invention.
Detailed Description
The technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, not all, embodiments of the present invention. All other embodiments, which can be derived by a person skilled in the art from the embodiments given herein without making any creative effort, shall fall within the protection scope of the present invention.
Example one
Fig. 1 is a flowchart illustrating steps of a processing method of an access device according to a first embodiment of the present invention.
Referring to fig. 1, a processing method of an access device according to an embodiment of the present invention is applied to a mobile terminal having a Type C interface, where the mobile terminal is connected to a transit adapter through the Type C interface, and the method includes:
step 101, determining an access device accessed to the mobile terminal through the switching adapter.
In the embodiment of the invention, a Type C interface of a mobile terminal is connected with a switching adapter, the switching adapter can be provided with an earphone sub-interface, a storage device sub-interface and a charger sub-interface, and CC pins of the earphone sub-interface, the storage device sub-interface and the charger sub-interface are connected with a CC1 pin or a CC2 pin of the Type C interface, so that the mobile terminal can detect access through the CC1/CC2 pin, distinguish front and back sides, distinguish a master and a slave, and configure other modes.
And 102, when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface.
The Type C interface is provided with a plurality of groups of pins, including TX, RX, CC1, CC2, D +, D-, SBU1, SBU2 and the like, wherein CC1 and CC2 are two key pins and can be used for realizing detection access, distinguishing front and back sides, distinguishing master and slave and configuring other modes.
In the embodiment of the present invention, the adaptor may include an earphone sub-interface, wherein signal lines of the earphone sub-interface, for example, a left audio signal line and a right audio signal line, may be respectively connected to a D +/D-pin of the adaptor, and when the earphone is connected to the mobile terminal through the earphone sub-interface of the adaptor, an audio decoder of the mobile terminal transmits the left audio signal and the right audio signal to the earphone through the D +/D-pin of the Type C interface, thereby implementing data communication between the mobile terminal and the earphone.
And 103, when the access device is determined to be a storage device, performing data communication with the storage device through a TX/RX pin of the Type-C interface.
In the embodiment of the present invention, the adaptor adapter may include a storage device sub-interface, wherein a signal pin of the storage device sub-interface may be connected to a TX/RX pin of the adaptor adapter, and when the storage device is connected to the mobile terminal through the storage device sub-interface of the adaptor adapter, the USB module of the mobile terminal transmits communication data to the storage device through the TX/RX pin of the Type C interface, thereby implementing data communication between the mobile terminal and the storage device.
And 104, when the access equipment is determined to be a charger, charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
In the embodiment of the present invention, the adaptor adapter may include a charger sub-interface, wherein pins of the charger sub-interface, such as Vbus, D +/D-pin, and CC pin, may be respectively connected to Vbus, D +/D-pin, CC1, or CC2 pin of the adaptor adapter, the D +/D-pin, CC1/CC2 pin, and Vbus pin of the Type-C interface of the mobile terminal may be connected to a charging input terminal of a charging manager of the mobile terminal through a switch module inside the mobile terminal, when the charger is connected to the mobile terminal through the charger sub-interface of the adaptor adapter, output currents of the Vbus, D +/D-pin, and CC pin of the charger are connected to the charging input terminal of the charging manager through the D +/D-pin, CC1/CC2 pin, and Vbus pin of the Type C interface of the mobile terminal, the charging of the mobile terminal is achieved through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
Of course, if the access device is a charger and a headset, the mobile terminal is charged only through the CC1/CC2 pin and the Vbus pin, and the D +/D-pin is used for the headset.
In the embodiment of the invention, the mobile terminal is connected with the switching adapter through the Type C interface, and the access equipment of the mobile terminal is determined to be accessed through the switching adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of a Type-C interface; when the access equipment is a charger, the mobile terminal is charged through a D +/D-pin of a Type-C interface, a CC1/CC2 pin and a Vbus pin.
Example two
Fig. 2 is a flowchart illustrating a processing method of an access device according to a second embodiment of the present invention.
Referring to fig. 2, a processing method of an access device according to an embodiment of the present invention is applied to a mobile terminal having a Type C interface, where the mobile terminal is connected to a transit adapter through the Type C interface, and the method includes:
step 201, detecting the voltage value of the CC1 or CC2 pin of the Type C interface of the mobile terminal.
In the embodiment of the present invention, a transit adapter may be provided, where one end of the transit adapter may be connected to the Type C interface of the mobile terminal, and the other end of the transit adapter is provided with three sub-interfaces, so that a voltage value of a CC1 or a CC2 pin of the Type C interface of the mobile terminal may be detected to determine an access device of the sub-interface of the transit adapter.
Step 202, determining the access device accessed to the mobile terminal according to the voltage value.
In the Type-C connection, whether a device is connected to a Type-C interface is detected through a CC pin, and the Type of the connected device is determined through the difference in voltage values of the CC pin, in the embodiment of the present invention, the adaptor adapter may have three sub-interfaces, which may be an earphone sub-interface, a storage device sub-interface, and a charger sub-interface, so that voltage values when different devices are connected may be stored in the mobile terminal, and when a corresponding voltage value is detected, the connected device of the sub-interface may be determined, specifically, determining the connected device connected to the mobile terminal according to the voltage value may include the following sub-steps:
substep 2021, determining that the access device is an earphone when the voltage value is a first preset value;
substep 2022, determining that the access device is a storage device when the voltage value is a second preset value;
substep 2023, determining that the access device is a charger when the voltage value is a third preset value;
substep 2024, determining that the access device is an earphone and a charger when the voltage value is a fourth preset value;
substep 2025, when the voltage value is a fifth preset value, determining that the access device is a storage device and a charger;
substep 2026, determining the access device to be an earphone, a storage device and a charger when the voltage value is a sixth preset value.
By storing the preset value of the voltage in the mobile terminal, when the corresponding preset value is detected, the corresponding access state of the switching adapter can be determined.
It should be noted that when two or more devices are accessed, the adapter may be first connected to the mobile terminal, and then detect that one sub-interface has a device access, and the voltage value changes, and then detect that another sub-interface has a device access, or two or more sub-interfaces may be first connected to the device, and then the adapter is connected to the mobile terminal.
In the embodiment of the present invention, the access device is determined by the voltage value of the CC1 or CC2 pin, and certainly, the access device may also be determined by the impedance of the CC1 or CC2 pin, which is not limited in this embodiment of the present invention.
In the embodiment of the invention, the mobile terminal can be provided with a change-over switch, and when the charger is determined to be connected to the mobile terminal, the change-over switch is connected with a D +/D-pin of a Type-C interface and a CC1/CC2 pin; and charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
Step 203, when the access device is determined to be an earphone, performing data communication with the earphone through a D +/D-pin of the Type-C interface;
step 204, when the access device is determined to be a storage device, performing data communication with the storage device through a TX/RX pin of the Type-C interface;
and step 205, when the access device is determined to be a charger, charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
The above-mentioned steps 203-205 can refer to the corresponding steps in the first embodiment, and are not described herein again to avoid repetition.
In this embodiment of the present invention, when it is determined that the access device is an earphone and a charger, or the access device is a storage device and a charger, or the access device is an earphone, a storage device, and a charger, the method further includes:
and step 206, when the access equipment is determined not to comprise the charger, supplying power to the earphone and/or the storage equipment.
In the embodiment of the invention, when no charger is accessed, a reverse power supply circuit inside the mobile terminal needs to supply power to the storage device and/or the earphone through the Vbus pin; or, the connection between the charger and the mobile terminal is disconnected due to the charging of the mobile terminal being over or due to other reasons, the power supply from the mobile terminal to the storage device and/or the earphone through the Vbus pin through the reverse power supply circuit needs to be switched.
Step 207, when the access equipment is determined to comprise the charger, stopping supplying power to the earphone and/or the storage equipment; wherein the charger is used for supplying power to the earphone and/or the storage device through the power supply circuit.
The switching adapter can be provided with a power supply circuit, and the power supply circuit can charge the mobile terminal and also can supply power to the earphone sub-interface and the storage device sub-interface of the switching adapter.
In the embodiment of the invention, when the charger and the storage device or the earphone are simultaneously connected to the mobile terminal, the Vbus pin of the sub-interface of the charger has a voltage output of 5V, so that the charger can be directly connected to the power supply circuit through the Vbus pin to supply power to the storage device and/or the earphone.
In order to better explain the embodiments of the present invention, the embodiments of the present invention are explained below with reference to the accompanying drawings.
As shown in fig. 3, a schematic diagram of a mobile terminal according to an embodiment of the present invention for data communication and charging with an earphone, a storage device, and a charger includes:
the Type C interface is used for being connected with one end of the switching adapter, the other end of the switching adapter is connected with the earphone through the earphone sub-interface, the storage device is connected with the storage device through the storage device interface, and the charger is connected with the charger through the charger interface.
The left audio output and the right audio output of the audio output module are connected with the D +/D-pin of the Type C interface and used for outputting audio data.
The TX/RX output end of the USB module is connected with a TX/RX pin of the Type C interface and used for finishing USB3.0 data communication; CC port of USB module passes through switch module and Type C interface
And the pin connection of CC1/CC2 is used for finishing CC detection.
The current input end of the charging manager is connected with the Vbus pin of the Type C interface through the switch module,
and the D +/D-pin is connected and is used for charging through a Vbus pin of the switch module multiplexing Type C interface, the D +/D-pin and the CC1/CC2 pin or supplying power to the storage device and/or the earphone through the Vbus pin through a reverse power supply circuit.
When the USB module detects the voltage change of a CC1 pin or a CC2 pin through a CC, the sub-interface access state of the switching adapter is determined through a voltage value, and when the earphone access is detected, the audio output module carries out data communication with the earphone through a D +/D-pin of a Type-C interface; when the storage device is detected to be accessed, the USB carries out data communication with the storage device through a TX/RX pin of a Type-C interface; when detecting that the charger is connected, the switch module connects the D +/D-pin, the CC1/CC2 pin and the Vbus pin of the Type-C interface to the current input end of the charging manager, and charges the mobile terminal by multiplexing the D +/D-pin, the CC1/CC2 pin and the Vbus pin of the Type-C interface.
Above-mentioned example has solved mobile terminal and has used a Type-C interface can not realize listening simultaneously music, transmission data and charging, and then can't satisfy mobile terminal towards the problem of ultra-thinness and the development trend that integrates, has realized mobile terminal ultra-thinness and has integrated.
In the embodiment of the invention, the mobile terminal is connected with the switching adapter through the Type C interface, and the access equipment of the mobile terminal is determined to be accessed through the switching adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of a Type-C interface; when the access equipment is a charger, the mobile terminal is charged through a D +/D-pin of a Type-C interface, a CC1/CC2 pin and a Vbus pin.
EXAMPLE III
Fig. 4 is a block diagram of a mobile terminal according to a third embodiment of the present invention.
Referring to fig. 4, a mobile terminal 400 according to an embodiment of the present invention includes:
an access device determining module 401, configured to determine an access device that accesses the mobile terminal through the adaptor;
a first data communication module 402, configured to perform data communication with an earphone through a D +/D-pin of the Type-C interface when it is determined that the access device is the earphone;
a second data communication module 403, configured to perform data communication with a storage device through a TX/RX pin of the Type-C interface when it is determined that the access device is the storage device;
a charging module 404, configured to charge the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin, and a Vbus pin when it is determined that the access device is a charger.
Referring to fig. 4a, the mobile terminal 500 according to the embodiment of the present invention further includes:
a power supply module 405, configured to supply power to the headset and/or the storage device when it is detected that the access device does not include a charger.
A power supply stopping module 406, configured to stop supplying power to the headset and/or the storage device when it is detected that the access device includes a charger; wherein the charger is used for supplying power to the earphone and/or the storage device through the power supply circuit.
Referring to fig. 4b, in the mobile terminal 500 according to the embodiment of the present invention, the access device determining module 401 includes:
the voltage value detection submodule 4011 is configured to detect a voltage value of a pin CC1 or a pin CC2 of the Type C interface of the mobile terminal;
and an access device determining submodule 4012, configured to determine, according to the voltage value, an access device that is accessed to the mobile terminal.
The charging module 404 includes:
the switch sub-module 4041 is configured to connect, when it is detected that the charger is connected to the mobile terminal, the D +/D-pin of the Type-C interface and the CC1/CC2 pin through the switch;
and the charging sub-module 4042 is used for charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
As shown in fig. 4c, the access device determining submodule 4012 includes:
the first determining unit 40121 is configured to determine that the access device is an earphone when the voltage value is a first preset value;
a second determining unit 40122, configured to determine that the access device is a storage device when the voltage value is a second preset value;
a third determining unit 40123, configured to determine that the access device is a charger when the voltage value is a third preset value;
a fourth determining unit 40124, configured to determine that the access device is an earphone and a charger when the voltage value is a fourth preset value;
a fifth determining unit 40125, configured to determine that the access device is a storage device and a charger when the voltage value is a fifth preset value;
a sixth determining unit 40126, configured to determine that the access device is an earphone, a storage device, and a charger when the voltage value is a sixth preset value.
The mobile terminal can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 2, and details are not repeated here to avoid repetition.
In the embodiment of the invention, the mobile terminal is connected with the switching adapter through the Type C interface, and the access equipment of the mobile terminal is determined to be accessed through the switching adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of a Type-C interface; when the access equipment is a charger, the mobile terminal is charged through a D +/D-pin of a Type-C interface, a CC1/CC2 pin and a Vbus pin.
Example four
Fig. 5 is a block diagram of a mobile terminal according to a fourth embodiment of the present invention, where the mobile terminal 1000 shown in fig. 5 includes: at least one processor 1001, memory 1002, at least one network interface 1004, a switch module 1006, and a user interface 1003. Various components in mobile terminal 1000 are coupled together by a bus system 1005. It is understood that bus system 1005 is used to enable communications among the components connected. The bus system 1005 includes a power bus, a control bus, and a status signal bus, in addition to a data bus. But for the sake of clarity the various busses are labeled in figure 5 as the bus system 1005.
The user interface 1003 may include, among other things, a display, a keyboard, or a pointing device (e.g., a mouse, trackball, touch pad, or touch screen, among others.
It is to be understood that the memory 1002 in embodiments of the present invention may be either volatile memory or nonvolatile memory, or may include both volatile and nonvolatile memory. The non-volatile Memory may be a Read-Only Memory (ROM), a Programmable ROM (PROM), an Erasable PROM (EPROM), an Electrically Erasable PROM (EEPROM), or a flash Memory. Volatile Memory can be Random Access Memory (RAM), which acts as external cache Memory. By way of example, but not limitation, many forms of RAM are available, such as Static random access memory (Static RAM, SRAM), Dynamic Random Access Memory (DRAM), Synchronous Dynamic random access memory (Synchronous DRAM, SDRAM), Double data rate Synchronous Dynamic random access memory (ddr DRAM), Enhanced Synchronous SDRAM (ESDRAM), Synchronous link SDRAM (SLDRAM), and Direct Rambus RAM (DRRAM). The memory 1002 of the subject systems and methods is intended to comprise, without being limited to, these and any other suitable types of memory.
In some embodiments, memory 1002 stores the following elements, executable modules or data structures, or a subset thereof, or an expanded set thereof: an operating system 10021 and applications 10022.
The operating system 10021 includes various system programs, such as a framework layer, a core library layer, a driver layer, and the like, and is used for implementing various basic services and processing hardware-based tasks. The application 10022 includes various applications, such as a Media Player (Media Player), a Browser (Browser), and the like, for implementing various application services. The program implementing the method according to the embodiment of the present invention may be included in the application program 10022.
In the embodiment of the present invention, the processor 1001 is configured to determine an access device that accesses the mobile terminal through the transit adapter by calling a program or an instruction stored in the memory 1002, specifically, a program or an instruction stored in the application 10022; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is determined to be storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of the Type-C interface; and when the access equipment is determined to be a charger, charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
The method disclosed by the embodiment of the invention can be applied to the processor 1001 or can be implemented by the processor 1001. The processor 1001 may be an integrated circuit chip having signal processing capabilities. In implementation, the steps of the above method may be implemented by integrated logic circuits of hardware or instructions in the form of software in the processor 1001. The Processor 1001 may be a general-purpose Processor, a Digital Signal Processor (DSP), an Application Specific Integrated Circuit (ASIC), an off-the-shelf programmable Gate Array (FPGA) or other programmable logic device, discrete Gate or transistor logic device, or discrete hardware components. The various methods, steps and logic blocks disclosed in the embodiments of the present invention may be implemented or performed. A general purpose processor may be a microprocessor or the processor may be any conventional processor or the like. The steps of the method disclosed in connection with the embodiments of the present invention may be directly implemented by a hardware decoding processor, or implemented by a combination of hardware and software modules in the decoding processor. The software module may be located in ram, flash memory, rom, prom, or eprom, registers, etc. storage media as is well known in the art. The storage medium is located in the memory 1002, and the processor 1001 reads the information in the memory 1002 and performs the steps of the method in combination with the hardware.
The switch module 1006 is used for connecting the D +/D-pin and the CC1/CC2 pin connected to the Type-C interface to the charging module of the mobile terminal when the charger is connected to the mobile terminal.
It is to be understood that the embodiments described herein may be implemented in hardware, software, firmware, middleware, microcode, or any combination thereof. For a hardware implementation, the processing units may be implemented within one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), general purpose processors, controllers, micro-controllers, microprocessors, other electronic units configured to perform the functions described herein, or a combination thereof.
For a software implementation, the techniques described in this disclosure may be implemented with modules (e.g., procedures, functions, and so on) that perform the functions described in this disclosure. The software codes may be stored in a memory and executed by a processor. The memory may be implemented within the processor or external to the processor.
Preferably, the processor 1001 is further configured to: detecting the voltage value of a CC1 or CC2 pin of the Type C interface of the mobile terminal; and determining the access equipment accessed to the mobile terminal according to the voltage value.
Preferably, the processor 1001 is further configured to: when the voltage value is a first preset value, determining that the access equipment is an earphone; when the voltage value is a second preset value, determining that the access equipment is storage equipment; when the voltage value is a third preset value, determining that the access equipment is a charger; when the voltage value is a fourth preset value, determining that the access equipment is an earphone and a charger; when the voltage value is a fifth preset value, determining that the access equipment is storage equipment and a charger; and when the voltage value is a sixth preset value, determining that the access equipment is an earphone, a storage device and a charger.
Preferably, the processor 1001 is further configured to: when it is determined that the access device does not include a charger, power is provided to the headset and/or storage device.
Preferably, the processor 1001 is further configured to: when it is determined that the access device includes a charger, ceasing to provide power to the headset and/or storage device; wherein the charger is used for supplying power to the earphone and/or the storage device through the power supply circuit.
Preferably, the processor 1001 is further configured to connect the D +/D-pin of the Type-C interface and the CC1/CC2 pin through the switch when detecting that the charger is connected to the mobile terminal; and charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
The mobile terminal 1000 can implement each process implemented by the mobile terminal in the method embodiments of fig. 1 to fig. 3, and is not described herein again to avoid repetition.
The mobile terminal 1000 according to the embodiment of the present invention is connected to the adapter through the Type C interface, and determines an access device that accesses the mobile terminal through the adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of a Type-C interface; when the access equipment is a charger, the mobile terminal is charged through a D +/D-pin of a Type-C interface, a CC1/CC2 pin and a Vbus pin.
EXAMPLE five
Fig. 6 is a schematic structural diagram of a mobile terminal according to a fifth embodiment of the present invention. Specifically, the mobile terminal 1100 in fig. 6 may be a mobile phone, a tablet computer, a Personal Digital Assistant (PDA), or a vehicle-mounted computer.
The mobile terminal 1100 in fig. 6 includes a Radio Frequency (RF) circuit 1101, a memory 1102, an input unit 1103, a display unit 1104, a switch module 1105, a processor 1106, an audio circuit 1107, a wifi (wireless fidelity) module 1108, and a power supply 1109.
The input unit 1103 may be used, among other things, to receive numeric or character information input by a user and to generate signal inputs related to user settings and function control of the mobile terminal 1100. Specifically, in the embodiment of the present invention, the input unit 1103 may include a touch panel 11031. The touch panel 11031, also referred to as a touch screen, may collect touch operations of a user (e.g., operations of the user on the touch panel 11031 using any suitable object or accessory such as a finger, a stylus, etc.) thereon or nearby, and drive corresponding connection devices according to a preset program. Alternatively, the touch panel 11031 may include two portions of a touch detection device and a touch controller. The touch detection device detects the touch direction of a user, detects a signal brought by touch operation and transmits the signal to the touch controller; the touch controller receives touch information from the touch sensing device, converts it to touch point coordinates, and sends the touch point coordinates to the processor 1106, where it can receive and execute commands from the processor 1106. In addition, the touch panel 11031 may be implemented by various types, such as a resistive type, a capacitive type, an infrared ray, and a surface acoustic wave. In addition to the touch panel 11031, the input unit 1103 may also include other input devices 11032, and the other input devices 11032 may include, but are not limited to, one or more of a physical keyboard, function keys (such as volume control keys, switch keys, etc.), a trackball, a mouse, a joystick, and the like.
Among other things, the display unit 1104 may be used to display information input by or provided to the user and various menu interfaces of the mobile terminal 1100. The display unit 1104 may include a display panel 11041, and optionally, the display panel 11041 may be configured in the form of an LCD or an Organic Light-Emitting Diode (OLED), or the like.
It should be noted that the touch panel 11031 may overlay the display panel 11041 to form a touch display screen, and when the touch display screen detects a touch operation thereon or nearby, the touch display screen is transmitted to the processor 1106 to determine the type of the touch event, and then the processor 1106 provides a corresponding visual output on the touch display screen according to the type of the touch event.
The touch display screen comprises an application program interface display area and a common control display area. The arrangement modes of the application program interface display area and the common control display area are not limited, and can be an arrangement mode which can distinguish two display areas, such as vertical arrangement, left-right arrangement and the like. The application interface display area may be used to display an interface of an application. Each interface may contain at least one interface element such as an icon and/or widget desktop control for an application. The application interface display area may also be an empty interface that does not contain any content. The common control display area is used for displaying controls with high utilization rate, such as application icons like setting buttons, interface numbers, scroll bars, phone book icons and the like.
The processor 1106 is a control center of the mobile terminal 1100, connects various parts of the entire mobile phone using various interfaces and lines, and performs various functions of the mobile terminal 1100 and processes data by operating or executing software programs and/or modules stored in the first memory 11021 and calling data stored in the second memory 11022, thereby integrally monitoring the mobile terminal 1100. Optionally, processor 1106 may include one or more processing units.
The switch module 1105 is used for connecting the D +/D-pin and the CC1/CC2 pin connected with the Type-C interface to the charging module of the mobile terminal when the charger is connected to the mobile terminal.
In an embodiment of the present invention, the processor 1106 is configured to determine an access device for accessing the mobile terminal through the transit adapter by invoking a software program and/or a module stored in the first memory 11021 and/or data stored in the second memory 11022; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is determined to be storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of the Type-C interface; and when the access equipment is determined to be a charger, charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
Preferably, the processor 1106 is further configured to: detecting the voltage value of a CC1 or CC2 pin of the Type C interface of the mobile terminal; and determining the access equipment accessed to the mobile terminal according to the voltage value.
Preferably, the processor 1106 is further configured to: when the voltage value is a first preset value, determining that the access equipment is an earphone; when the voltage value is a second preset value, determining that the access equipment is storage equipment; when the voltage value is a third preset value, determining that the access equipment is a charger; when the voltage value is a fourth preset value, determining that the access equipment is an earphone and a charger; when the voltage value is a fifth preset value, determining that the access equipment is storage equipment and a charger; and when the voltage value is a sixth preset value, determining that the access equipment is an earphone, a storage device and a charger.
Preferably, the processor 1106 is further configured to: when it is determined that the access device does not include a charger, power is provided to the headset and/or storage device.
Preferably, the processor 1106 is further configured to: when it is determined that the access device includes a charger, ceasing to provide power to the headset and/or storage device; wherein the charger is used for supplying power to the earphone and/or the storage device through the power supply circuit.
Preferably, the processor 1106 is further configured to connect the D +/D-pin of the Type-C interface and the CC1/CC2 pin through the switch when it is detected that the charger is connected to the mobile terminal; and charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
The mobile terminal 1100 is capable of implementing each process implemented by the mobile terminal in the foregoing embodiments, and details are not repeated here to avoid repetition.
The mobile terminal 1100 of the embodiment of the present invention is connected to the transit adapter through the Type C interface, and determines an access device that accesses the mobile terminal through the transit adapter; when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface; when the access equipment is storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of a Type-C interface; when the access equipment is a charger, the mobile terminal is charged through a D +/D-pin of a Type-C interface, a CC1/CC2 pin and a Vbus pin.
Those of ordinary skill in the art will appreciate that the various illustrative elements and algorithm steps described in connection with the embodiments disclosed herein may be implemented as electronic hardware or combinations of computer software and electronic hardware. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the implementation. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
It is clear to those skilled in the art that, for convenience and brevity of description, the specific working processes of the above-described systems, apparatuses and units may refer to the corresponding processes in the foregoing method embodiments, and are not described herein again.
In the embodiments provided in the present application, it should be understood that the disclosed apparatus and method may be implemented in other ways. For example, the above-described apparatus embodiments are merely illustrative, and for example, the division of the units is only one logical division, and other divisions may be realized in practice, for example, a plurality of units or components may be combined or integrated into another system, or some features may be omitted, or not executed. In addition, the shown or discussed mutual coupling or direct coupling or talking connection may be through some interfaces, indirect coupling or talking connection of devices or units, and may be in electric, mechanical or other forms.
The units described as separate parts may or may not be physically separate, and parts displayed as units may or may not be physical units, may be located in one place, or may be distributed on a plurality of network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiment.
In addition, functional units in the embodiments of the present invention may be integrated into one processing unit, or each unit may exist alone physically, or two or more units are integrated into one unit.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a computer readable storage medium. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a U disk, a removable hard disk, a ROM, a RAM, a magnetic disk, or an optical disk.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the claims.

Claims (6)

1. A processing method of an access device is applied to a mobile terminal with a Type-C interface, and is characterized in that the mobile terminal is connected with a switching adapter through the Type-C interface, and the method comprises the following steps:
determining access equipment accessed to the mobile terminal through the switching adapter;
when the access equipment is determined to be the earphone, carrying out data communication with the earphone through a D +/D-pin of the Type-C interface;
when the access equipment is determined to be storage equipment, carrying out data communication with the storage equipment through a TX/RX pin of the Type-C interface;
when the access equipment is determined to be a charger, charging the mobile terminal through a D +/D-pin, a CC1/CC2 pin and a Vbus pin of the Type-C interface;
the switching adapter is provided with a power supply circuit, and the method further comprises the following steps:
when it is determined that the access device includes a charger, ceasing to provide power to the headset and/or storage device; wherein the charger is used for supplying power to the earphone and/or the storage device through the power supply circuit;
the step of determining the access device accessed to the mobile terminal through the switching adapter comprises the following steps:
detecting the voltage value of a CC1 or CC2 pin of the Type-C interface of the mobile terminal;
determining the access equipment accessed to the mobile terminal according to the voltage value
The step of determining the access device accessing the mobile terminal according to the voltage value comprises the following steps:
when the voltage value is a first preset value, determining that the access equipment is an earphone;
when the voltage value is a second preset value, determining that the access equipment is storage equipment;
when the voltage value is a third preset value, determining that the access equipment is a charger;
when the voltage value is a fourth preset value, determining that the access equipment is an earphone and a charger;
when the voltage value is a fifth preset value, determining that the access equipment is storage equipment and a charger;
and when the voltage value is a sixth preset value, determining that the access equipment is an earphone, a storage device and a charger.
2. The method of claim 1, further comprising:
when it is determined that the access device does not include a charger, power is provided to the headset and/or storage device.
3. The method of claim 1, wherein the mobile terminal further comprises a switch, and when it is detected that a charger is connected to the mobile terminal, the step of charging the mobile terminal through the D +/D-pin, the CC1/CC2 pin, and the Vbus pin of the Type-C interface comprises:
when detecting that a charger is connected to the mobile terminal, connecting a D +/D-pin of the Type-C interface and a CC1/CC2 pin through the change-over switch;
and charging the mobile terminal through a D +/D-pin of the Type-C interface, a CC1/CC2 pin and a Vbus pin.
4. The utility model provides a mobile terminal, includes Type-C interface, its characterized in that, mobile terminal passes through Type-C interface is connected with the switching adapter, the switching adapter is provided with supply circuit, mobile terminal still includes:
an access device determining module, configured to determine an access device that accesses the mobile terminal through the adaptor;
the first data communication module is used for carrying out data communication with the earphone through a D +/D-pin of the Type-C interface when the access equipment is determined to be the earphone;
the second data communication module is used for carrying out data communication with the storage device through a TX/RX pin of the Type-C interface when the access device is determined to be the storage device;
the charging module is used for charging the mobile terminal through a D +/D-pin, a CC1/CC2 pin and a Vbus pin of the Type-C interface when the access equipment is determined to be a charger;
the mobile terminal further includes:
the power supply stopping module is used for stopping supplying power to the earphone and/or the storage equipment when the access equipment is detected to comprise a charger; wherein the charger is used for supplying power to the earphone and/or the storage device through the power supply circuit;
the access device determination module comprises:
the voltage value detection submodule is used for detecting the voltage value of a CC1 or CC2 pin of the Type-C interface of the mobile terminal;
the access equipment determining submodule is used for determining the access equipment accessed to the mobile terminal according to the voltage value;
the access device determination submodule includes:
the first determining unit is used for determining that the access equipment is an earphone when the voltage value is a first preset value;
the second determining unit is used for determining the access equipment as storage equipment when the voltage value is a second preset value;
the third determining unit is used for determining that the access equipment is a charger when the voltage value is a third preset value;
the fourth determining unit is used for determining that the access equipment is an earphone and a charger when the voltage value is a fourth preset value;
the fifth determining unit is used for determining the access equipment as storage equipment and a charger when the voltage value is a fifth preset value;
and the sixth determining unit is used for determining that the access equipment is an earphone, a storage device and a charger when the voltage value is a sixth preset value.
5. The mobile terminal of claim 4, wherein the mobile terminal further comprises:
and the power supply module is used for supplying power to the earphone and/or the storage device when detecting that the access device does not comprise a charger.
6. The mobile terminal of claim 4, wherein the charging module comprises:
the switch sub-module is used for connecting a D +/D-pin of the Type-C interface and a CC1/CC2 pin through a change-over switch when the charger is detected to be connected to the mobile terminal;
and the charging submodule is used for charging the mobile terminal through a D +/D-pin, a CC1/CC2 pin and a Vbus pin of the Type-C interface.
CN201611265682.4A 2016-12-30 2016-12-30 Processing method of access equipment and mobile terminal Active CN108268407B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201611265682.4A CN108268407B (en) 2016-12-30 2016-12-30 Processing method of access equipment and mobile terminal

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201611265682.4A CN108268407B (en) 2016-12-30 2016-12-30 Processing method of access equipment and mobile terminal

Publications (2)

Publication Number Publication Date
CN108268407A CN108268407A (en) 2018-07-10
CN108268407B true CN108268407B (en) 2020-03-06

Family

ID=62771002

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201611265682.4A Active CN108268407B (en) 2016-12-30 2016-12-30 Processing method of access equipment and mobile terminal

Country Status (1)

Country Link
CN (1) CN108268407B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN108268396B (en) * 2016-12-30 2020-01-03 维沃移动通信有限公司 Processing method of access equipment and mobile terminal

Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767260A (en) * 2015-03-30 2015-07-08 华为技术有限公司 Charger, terminal device and charging system
CN105120404A (en) * 2015-07-31 2015-12-02 华为技术有限公司 Audio equipment, terminal equipment and electronic equipment
CN105872904A (en) * 2016-04-20 2016-08-17 乐视控股(北京)有限公司 Microphone circuit, system and headset
CN105955912A (en) * 2016-05-16 2016-09-21 芯海科技(深圳)股份有限公司 Device detection method for USB Type-C interface
CN105954644A (en) * 2016-06-30 2016-09-21 成绎半导体技术(上海)有限公司 USB Type-C interface male head intelligent detection and protection circuit
CN106207687A (en) * 2016-08-30 2016-12-07 硅谷数模半导体(北京)有限公司 The conversion method of data-interface and device

Family Cites Families (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN205790815U (en) * 2016-06-21 2016-12-07 深圳市爱迪芯科技有限公司 A kind of HUB integrating HUB, video, portable power source

Patent Citations (6)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104767260A (en) * 2015-03-30 2015-07-08 华为技术有限公司 Charger, terminal device and charging system
CN105120404A (en) * 2015-07-31 2015-12-02 华为技术有限公司 Audio equipment, terminal equipment and electronic equipment
CN105872904A (en) * 2016-04-20 2016-08-17 乐视控股(北京)有限公司 Microphone circuit, system and headset
CN105955912A (en) * 2016-05-16 2016-09-21 芯海科技(深圳)股份有限公司 Device detection method for USB Type-C interface
CN105954644A (en) * 2016-06-30 2016-09-21 成绎半导体技术(上海)有限公司 USB Type-C interface male head intelligent detection and protection circuit
CN106207687A (en) * 2016-08-30 2016-12-07 硅谷数模半导体(北京)有限公司 The conversion method of data-interface and device

Also Published As

Publication number Publication date
CN108268407A (en) 2018-07-10

Similar Documents

Publication Publication Date Title
US10949374B2 (en) Type-C interface controlling circuit, controlling method and mobile terminal
WO2018157662A1 (en) Display control method for mobile terminal, and mobile terminal
CN108900770B (en) Method and device for controlling rotation of camera, smart watch and mobile terminal
CN108271093B (en) Processing method of access equipment and mobile terminal
CN108268397B (en) Processing method of access equipment and mobile terminal
US10120488B2 (en) Display method and display device
KR20190043015A (en) An electronic device having a plurality of displays and control method
EP2817706A1 (en) Method and apparatus for interpreting a gesture
CN107562262B (en) Method for responding touch operation, terminal and computer readable storage medium
CN202995668U (en) All-in-one machine used for controlling external equipment in touching mode
CN105518634A (en) Method, apparatus, and recording medium for interworking with external terminal
WO2022104952A1 (en) Screen state control method and apparatus, and storage medium
KR20140028546A (en) Apparatus for controlling key input and method for the same
CN108268396B (en) Processing method of access equipment and mobile terminal
CN108271092B (en) Processing method of access equipment and mobile terminal
CN106208297B (en) Charging circuit, method for controlling charging of charging circuit and mobile terminal
CN108268395A (en) A kind of method and mobile terminal of data communication
RU2679253C1 (en) Method, device and terminal for processing fingerprint event
CN108268407B (en) Processing method of access equipment and mobile terminal
CN203982283U (en) Flat computer
KR102106354B1 (en) Method and apparatus for controlling operation in a electronic device
CN108271094B (en) Processing method of access equipment and mobile terminal
CN108268394B (en) Processing method of access equipment and mobile terminal
CN107291415B (en) Charging and audio data processing method and terminal
US9857910B2 (en) Method for controlling multiple touchscreens and electronic device

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant