Interface control method and device, electronic equipment, storage medium and chip
By automatically switching the USB Type-C interface mode based on the type of inserted device, the problem of the single function of the USB Type-C interface in the existing technology is solved. It realizes the integration of headphone, charging and debugging upgrade functions, simplifies the structure of electronic products and reduces development costs.
Patent Information
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- BEIJING BAIGEFEICHI TECH LLC
- Filing Date
- 2023-03-09
- Publication Date
- 2026-05-29
AI Technical Summary
The existing USB Type-C interface is difficult to implement headphone function, charging function and debugging and upgrade function simultaneously in electronic products, resulting in increased product size or missing functions, affecting user experience and development costs.
By identifying the type of device inserted into the host, the system automatically controls the USB Type-C interface to switch to the corresponding working mode, including headphone mode, charging mode, and debug/upgrade mode. It uses the device identification signal and audio playback mode identifier signal to configure the logic identification voltage signal, thereby realizing the multi-functional switching of the interface.
Integrating a single USB Type-C interface into electronic products can enable multiple functions, simplifying the structure, reducing development costs, and improving the user experience.
Smart Images

Figure CN116340229B_ABST
Abstract
Description
Technical Field
[0001] This disclosure relates to the field of USB Type-C interface control, and more particularly to an interface control method, apparatus, electronic device, storage medium, and chip. Background Technology
[0002] With the widespread use of electronic products, users have placed higher demands on the appearance of certain electronic products (such as electronic flashcards), requiring them not only to be small in size but also aesthetically pleasing. However, electronic products typically need to have headphone functionality, charging functionality, and debugging / upgrade functionality. This requires that the Universal Serial Bus (USB) interface of electronic products can operate in headphone mode, charging mode, and debugging / upgrade mode accordingly.
[0003] The current mainstream USB interface is the USB Type-C interface. In order to meet the requirements of small size and aesthetics of electronic products, there is an urgent need for a method that integrates only one USB Type-C interface into electronic products to enable them to simultaneously have headphone function, charging function and debugging and upgrade function. Summary of the Invention
[0004] This disclosure provides an interface control method, apparatus, electronic device, storage medium, and chip to solve problems in related technologies. Based on the identification result of the device type of the USB Type-C interface inserted into the host, the USB Type-C interface can be executed in the corresponding working mode, thus meeting the requirements of small size and aesthetics of the host.
[0005] A first aspect of this disclosure provides an interface control method, the method comprising:
[0006] Acquire device identification signal;
[0007] Based on the Device identification signal, the current working mode of the host's USB Type-C interface is determined, including headphone mode, charging mode, and debugging / upgrade mode.
[0008] The USB Type-C interface will be configured to operate in a defined mode.
[0009] In some embodiments of this disclosure, prior to acquiring the Device identification signal, the method further includes:
[0010] Obtain the audio playback mode identifier signal indicating that the host is operating in audio playback mode;
[0011] Based on the audio playback mode identifier signal, a first channel logic identification voltage signal is configured for the configuration channel pin of the USB Type-C interface. The first channel logic identification voltage signal is a non-zero voltage signal.
[0012] In some embodiments of this disclosure, obtaining the Device identification signal includes:
[0013] Obtain the second channel logic identification voltage signal or interrupt signal.
[0014] In some embodiments of this disclosure, determining the current operating mode of the host's USB Type-C interface based on the Device identification signal includes:
[0015] If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a zero voltage signal, then the current working mode of the Host's USB Type-C interface is headphone mode.
[0016] If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a non-zero voltage signal, then the current working mode of the Host's USB Type-C interface is debug upgrade mode.
[0017] If the acquired Device identification signal is an interrupt signal, then the current operating mode of the Host's USB Type-C interface is charging mode.
[0018] In some embodiments of this disclosure, executing a defined operating mode on the USB Type-C interface includes:
[0019] If the current working mode of the USB Type-C interface of the Host is headphone mode, then connect the audio output channel of the Host's controller to the DP / DM pin of the USB Type-C interface.
[0020] If the current operating mode of the USB Type-C interface of the Host is debug upgrade mode, then connect the data communication channel of the Host's controller to the DP / DM pin of the USB Type-C interface;
[0021] If the current operating mode of the USB Type-C interface of the Host is charging mode, then configure the configuration channel pin of the USB Type-C interface with a zero voltage signal.
[0022] A second aspect of this disclosure provides an interface control device, comprising:
[0023] The identification signal acquisition unit is used to acquire the device identification signal;
[0024] The working mode determination unit is used to determine the current working mode of the host's USB Type-C interface based on the Device identification signal. The working mode includes headphone mode, charging mode, and debugging / upgrade mode.
[0025] An execution unit is used to execute a determined working mode of the USB Type-C interface.
[0026] In some embodiments of this disclosure, the interface control device further includes:
[0027] The identification signal acquisition unit is used to acquire the audio playback mode identification signal of the host operating in audio playback mode;
[0028] The first channel logic identification voltage signal acquisition unit is used to configure the first channel logic identification voltage signal for the configuration channel pin of the USB Type-C interface based on the audio playback mode identification signal. The first channel logic identification voltage signal is a non-zero voltage signal.
[0029] A third aspect of this disclosure provides an electronic device comprising:
[0030] A processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the steps of the method described in the first aspect of this disclosure.
[0031] A fourth aspect of this disclosure provides a non-transitory computer-readable storage medium storing computer instructions for causing the computer to perform the steps of the method described in the first aspect of this disclosure.
[0032] A fifth aspect of this disclosure provides a chip including one or more interface circuits and one or more processors; the interface circuits are configured to receive signals from a memory of an electronic device and send the signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processors, cause the electronic device to perform the steps of the method described in the first aspect of this disclosure.
[0033] In summary, the interface control method provided in this disclosure enables electronic products to automatically identify the type of device inserted into the USB Type-C interface when only one USB Type-C interface is integrated, and then control the USB Type-C interface to execute the working mode corresponding to the device type. This simplifies the structure of electronic products, meets user needs, and reduces development costs.
[0034] It should be understood that the above general description and the following detailed description are exemplary and explanatory only, and are not intended to limit this disclosure. Attached Figure Description
[0035] The accompanying drawings, which are incorporated in and form part of this specification, illustrate embodiments consistent with this disclosure and, together with the description, serve to explain the principles of this disclosure, and are not intended to unduly limit this disclosure.
[0036] Figure 1 A flowchart of an interface control method provided in an embodiment of this disclosure;
[0037] Figure 2 This is a schematic diagram of the structure of an interface control device provided in an embodiment of the present disclosure;
[0038] Figure 3 This is a schematic diagram of the structure of the first channel logic identification circuit provided in an embodiment of the present disclosure;
[0039] Figure 4 This is a schematic diagram illustrating the composition of an electronic device provided in an embodiment of this disclosure. Detailed Implementation
[0040] Embodiments of this disclosure are described in detail below. Examples of these embodiments are illustrated in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this disclosure, and should not be construed as limiting this disclosure.
[0041] With the widespread use of electronic products, users have placed higher demands on the appearance of certain electronic products (such as electronic flashcards), requiring them not only to be small in size but also aesthetically pleasing. However, electronic products typically need to have headphone functionality, charging functionality, and debugging / upgrade functionality, which requires the USB interface of the electronic product to be able to operate in headphone mode, charging mode, and debugging / upgrade mode respectively.
[0042] Taking electronic flashcards as an example, electronic flashcards are electronic products that assist people in learning and memorizing electronic words. They integrate a large amount of content from traditional paper-based flashcards into a miniaturized electronic device. Electronic flashcards not only have massive memory and vocabulary resources, capable of accommodating a vast number of words, but their small size also makes them easy for users to carry and view. Recently, with the promotion and popularization of electronic flashcards, their functions have become increasingly rich to enhance the user experience. For example, electronic flashcards not only meet users' viewing needs but also support audio playback, allowing users to connect headphones to listen to words. Simultaneously, electronic flashcards also have a built-in rechargeable lithium battery, which can be charged when the battery is low. Furthermore, electronic flashcards also have a built-in microcontroller unit (MCU) acting as a controller. During product development, the product can be upgraded or printed messages can be viewed via a USB interface or a Universal Asynchronous Receiver Transmitter (UART) interface for problem localization.
[0043] The current mainstream USB interface is USB Type-C. The audio output channel and data communication channel of the USB Type-C interface share the DP / DM pins. However, the audio output channels (HP_L and HP_R) and data communication channels (USB_DP / USB_DM) on the controller of electronic products belong to different pins, meaning that the headphone function and debugging / upgrade functions of electronic products cannot be simultaneously satisfied. Therefore, many manufacturers often choose to increase the number of USB Type-C ports or abandon some functions. However, increasing the number of USB Type-C ports will cause electronic products to lose their miniaturization and aesthetic appeal. Abandoning some functions means supporting only charging and headphone functions, or charging and debugging / upgrade functions, or only supporting charging. If the electronic word card only supports charging and headphone functions and does not support debugging / upgrade functions, then R&D personnel will need to disassemble and rewire the device every time they encounter a problem, which is inefficient. If the production line needs to upgrade software in batches, the disassembly and upgrade method is not only inefficient, but may also damage the product structure during the disassembly process, leading to the scrapping of the entire device. If the electronic word card only supports charging and debugging functions, it will result in missing product functions, affecting the user experience.
[0044] To address the problems existing in related technologies, this disclosure provides an interface control method that enables electronic products to automatically identify the type of device inserted into the USB Type-C interface when only one USB Type-C interface is integrated, and then control the USB Type-C interface to execute the working mode corresponding to the device type. This simplifies the structure of electronic products, meets user needs, and reduces development costs.
[0045] Before introducing the detailed solution of this disclosure, the application scenario of this disclosure will be described first. This application scenario includes a host, a device, and a connecting cable for connecting the host and the device. The host integrates a USB Type-C interface and has a built-in controller. The host can also install several applications, which can identify the type of device plugged into the host's USB Type-C interface and execute the working mode of the USB Type-C interface based on the device type. The host can be an electronic product such as an electronic flashcard or audio / video player, and the device can be an analog headset, a power adapter, or a computer. The computer can perform debugging and upgrade operations on the electronic product through the USB Type-C interface. In practical applications, the roles of the host and device may be interchanged; for example, when the power adapter charges the electronic product, the power adapter acts as the host, and the electronic product acts as the device.
[0046] Figure 1 A flowchart illustrating an interface control method provided in an embodiment of this disclosure. Figure 1 As shown, the interface control method includes the following steps:
[0047] Step 101: Obtain the Device identification signal.
[0048] The Device identification signal indicates the type of Device inserted into the USB Type-C interface of the Host, such as headphones, power adapters, or devices such as computers and tablets that can be debugged and upgraded by the host via serial communication.
[0049] Step 102: Based on the Device identification signal, determine the current working mode of the Host's USB Type-C interface. The working mode includes headphone mode, charging mode, and debugging / upgrade mode.
[0050] The USB Type-C interface executing headphone mode refers to connecting the audio output channels (HP_L and HP_R) of the Host's controller to the DP / DM pin of the USB Type-C interface;
[0051] The USB Type-C interface executing debug upgrade mode refers to connecting the data communication channel (USB_DP / USB_DM) of the Host's controller to the DP / DM pin of the USB Type-C interface;
[0052] Step 103: Execute the determined working mode of the USB Type-C interface.
[0053] After obtaining the Device identification signal, the type of the Device is identified based on the Device identification signal. Then, based on the Device type, the current required operating mode of the USB Type-C interface can be determined, and the USB Type-C interface can be executed in the determined operating mode to realize its corresponding function.
[0054] In summary, the interface control method provided in this disclosure can identify the type of device inserted into the USB Type-C interface, and then execute the corresponding working mode of the USB Type-C interface. This solution integrates a single USB Type-C interface into an electronic product to realize the product's headphone function, charging function, and debugging and upgrade function, which not only simplifies the structure of the electronic product but also saves production costs.
[0055] In practical applications, when the USB Type-C interface is not plugged into a device, the voltage signal collected by the configuration channel pins (CC1, CC2) of the USB Type-C interface is a zero voltage signal. However, since the configuration channel pins of the analog headset's USB Type-C connector are grounded, when the analog headset's USB Type-C connector is plugged into the host's USB Type-C interface, the voltage signal collected by the configuration channel pins (CC1, CC2) of the USB Type-C interface is still a zero voltage signal, meaning it is impossible to distinguish between the analog headset being plugged in and not plugged in. To address the aforementioned issues, a non-zero voltage signal can be applied to the configuration channel pins of the USB Type-C interface. Specifically, in the unplugged state, the voltage signal of the configuration channel pins is non-zero; when headphones are plugged in, the voltage signal is zero; when the power adapter is plugged in, the charging management chip within the host can acquire the input voltage signal and simultaneously output an interrupt signal. This interrupt signal is used to restore the default pull-down resistor of the USB Type-C interface's configuration channel pins to meet the Type-C charging protocol requirements. If the voltage signal of the USB Type-C interface's configuration channel pins is non-zero and no interrupt signal is acquired, it is determined that the USB Type-C interface needs to execute a debug upgrade mode.
[0056] Based on this, in one embodiment, before acquiring the Device identification signal, the method further includes:
[0057] Obtain the audio playback mode identification signal when the Host is working in audio playback mode; the audio playback mode identification signal refers to the identification signal generated by the controller of the Host when the Host is working in audio playback mode;
[0058] Based on the audio playback mode identifier signal, a first channel logic identification voltage signal is configured for the configuration channel pin of the USB Type-C interface. The first channel logic identification voltage signal is a non-zero voltage signal.
[0059] The acquisition of the Device identification signal includes:
[0060] Obtain the second channel logic identification voltage signal or interrupt signal.
[0061] Based on the above description, in one embodiment, determining the current operating mode of the host's USB Type-C interface based on the Device identification signal includes:
[0062] If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a zero voltage signal, then the current working mode of the Host's USB Type-C interface is headphone mode.
[0063] If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a non-zero voltage signal, then the current working mode of the Host's USB Type-C interface is debug upgrade mode.
[0064] If the acquired Device identification signal is an interrupt signal, then the current operating mode of the Host's USB Type-C interface is charging mode.
[0065] Furthermore, in practical applications, in order to meet the requirements of the Type-C charging protocol, the configuration channel pins of the USB Type-C interface need to be restored to their default pull-down resistors during charging mode.
[0066] Based on this, in one embodiment, executing a defined operating mode on the USB Type-C interface includes:
[0067] If the current working mode of the USB Type-C interface of the Host is headphone mode, then connect the audio output channels (HP_L and HP_R) of the Host's controller to the DP / DM pin of the USB Type-C interface.
[0068] If the current operating mode of the USB Type-C interface of the Host is debug upgrade mode, then connect the data communication channel (USB_DP / USB_DM) of the Host's controller to the DP / DM pin of the USB Type-C interface;
[0069] If the current operating mode of the USB Type-C interface of the Host is charging mode, then configure the configuration channel pin of the USB Type-C interface with a zero voltage signal.
[0070] In summary, the disclosed solution can achieve the following beneficial effects:
[0071] This disclosure uses the Device identification signal to identify the type of device inserted into the Host, and then controls the USB Type-C interface to execute the working mode corresponding to the device type. Based on this, it enables electronic products to achieve headphone, charging, and debugging / upgrade functions with only one USB Type-C interface integrated, simplifying the structure of electronic products and reducing development costs.
[0072] Figure 2 This is a schematic diagram of an interface control device provided in an embodiment of the present disclosure. To implement the interface control method provided in this embodiment, such as… Figure 2 As shown, this disclosure also provides an interface control device. The interface control device 200 includes:
[0073] The identification signal acquisition unit 201 is used to acquire the device identification signal;
[0074] The working mode determination unit 202 is used to determine the current working mode of the USB Type-C interface of the host based on the Device identification signal. The working mode includes headphone mode, charging mode and debugging and upgrade mode.
[0075] The execution unit 203 is used to execute a determined working mode of the USB Type-C interface.
[0076] In one embodiment, the interface control device 200 further includes:
[0077] The identification signal acquisition unit is used to acquire the audio playback mode identification signal of the Host operating in audio playback mode;
[0078] The first channel logic identification voltage signal acquisition unit is used to configure the first channel logic identification voltage signal for the configuration channel pin of the USB Type-C interface based on the audio playback mode identification signal. The first channel logic identification voltage signal is a non-zero voltage signal.
[0079] The signal identification unit can be implemented as follows: the controller of the Host, taking an MCU as an example, executes the audio playback mode of the Host's working mode, and outputs an audio playback mode identification signal (high level signal) through the CCOUT pin of the MCU's configuration channel. Then, the first channel logic identification voltage signal acquisition unit receives the audio playback mode identification signal.
[0080] The first channel logic recognition voltage signal acquisition unit can also be implemented by the following first channel logic recognition circuit. Specifically, as shown below... Figure 3 As shown, Figure 3This is a schematic diagram of the structure of the first channel logic identification circuit provided in an embodiment of this disclosure. The first channel logic identification circuit includes a first transistor Q1, a second transistor Q2, a first resistor R1, a second resistor R2, a third resistor R3, a fourth resistor R4, a fifth resistor R5, and a sixth resistor R6; the bases of the first transistor Q1 and the second transistor Q2 are connected; the emitters of both the first transistor Q1 and the second transistor Q2 are connected to a power supply; the first end of the first resistor R1 is connected to the first configuration channel input CCIN1 pin of the MCU, and the second end of the first resistor R1 is connected to the first configuration channel CC1 pin of the USB Type-C interface; the first end of the second resistor R2 is connected to the CC1 pin of the USB Type-C interface, and the second end of the second resistor R2 is connected to the collector of the first transistor Q1; the first end of the third resistor R3 is connected to the second configuration channel input CCIN2 pin of the MCU, and the second end of the third resistor R3 is connected to the second configuration channel CC2 pin of the USB Type-C interface; the first end of the fourth resistor R4 is connected to the... The CC2 pin of the Type-C interface is connected. The second end of the fourth resistor R4 is connected to the collector of the second transistor Q2. The first end of the fifth resistor R5 is connected to the CCOUT pin of the MCU, and the second end of the fifth resistor R5 is connected to the base of the first transistor Q1. The first end of the sixth resistor R6 is connected to the base of the first transistor Q1, and the second end of the sixth resistor R6 is connected to the emitter of the first transistor Q1. When the MCU's configuration channel output CCOUT pin outputs an audio playback mode identification signal (high-level signal), the first transistor Q1 and the second transistor Q2 turn on, generating a voltage divider on the CC1 and CC2 pins of the USB Type-C interface. Based on this, a non-zero voltage signal can be detected on the CCIN1 and CCIN2 pins of the MCU.
[0081] In one embodiment, the identification signal acquisition unit 201 is specifically used to: acquire the second channel logic identification voltage signal or interrupt signal.
[0082] In one embodiment, the operating mode determination unit 202 is specifically used for:
[0083] If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a zero voltage signal, then the current working mode of the Host's USB Type-C interface is headphone mode.
[0084] If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a non-zero voltage signal, then the current working mode of the Host's USB Type-C interface is debug upgrade mode.
[0085] If the acquired Device identification signal is an interrupt signal, then the current operating mode of the Host's USB Type-C interface is charging mode.
[0086] In one embodiment, the execution unit 203 is specifically used for:
[0087] If the current working mode of the USB Type-C interface of the Host is headphone mode, then connect the audio output channel of the Host's controller to the DP / DM pin of the USB Type-C interface.
[0088] If the current operating mode of the USB Type-C interface of the Host is debug upgrade mode, then connect the data communication channel of the Host's controller to the DP / DM pin of the USB Type-C interface;
[0089] If the current operating mode of the USB Type-C interface of the Host is charging mode, then configure the configuration channel pin of the USB Type-C interface with a zero voltage signal.
[0090] Those skilled in the art should understand that Figure 2 The functions of each unit in the interface control device 200 shown can be understood by referring to the relevant description of the aforementioned interface control method. Figure 2 The functions of each unit in the interface control device 200 shown can be implemented through a program running on a processor or through specific logic circuits. It should be noted that the interface control device 200 provided in the above embodiments is only illustrated by the division of the program units described above when performing interface control. In practical applications, the above processing can be assigned to different program units as needed, that is, the internal structure of the system can be divided into different program units to complete all or part of the processing described above. Furthermore, the interface control device 200 provided in the above embodiments and the interface control method embodiments belong to the same concept; its specific implementation process is detailed in the method embodiments and will not be repeated here.
[0091] Based on the hardware implementation of the above-described program units, and in order to implement the interface control method provided in the embodiments of this application, this application also provides an electronic device 400. For example... Figure 4 As shown, Figure 4This is a schematic diagram of the composition of an electronic device provided in an embodiment of the present disclosure. The electronic device 400 includes a processor 401 and a memory 402. The memory 402 is used to store computer programs, and the processor 401 is used to call and run the computer programs stored in the memory 402 to execute the steps of the interface control method provided in the embodiment of the present disclosure.
[0092] In practical applications, such as Figure 4 As shown, the various components in the electronic device 400 are coupled together via a bus module 403. It is understood that the bus module 403 is used to implement communication between these components. In addition to a data bus, the bus module 403 also includes a power bus, a control bus, and a status signal bus. However, for clarity, in... Figure 4 The general labels all buses as bus module 403.
[0093] This disclosure also provides a non-transitory computer-readable storage medium storing computer instructions, which, when executed by the computer, implement the steps of the interface control method provided in this disclosure.
[0094] In some embodiments, the computer-readable storage medium may be a magnetic random access memory (FRAM), a read-only memory (ROM), a programmable read-only memory (PROM), an erasable programmable read-only memory (EPROM), an electrically erasable programmable read-only memory (EEPROM), a flash memory, a magnetic surface memory, an optical disc, or a compact disc read-only memory (CD-ROM), etc.; or it may be a device that includes one or any combination of the above-mentioned memories.
[0095] In some embodiments, computer instructions may take the form of programs, software, software modules, scripts, or code, written in any type of programming language (including compiled or interpreted languages, or declarative or procedural languages), and may be deployed in any form, including as standalone programs or as modules, components, subroutines, or other units suitable for use in a computing environment. As an example, computer instructions may, but not necessarily, correspond to files in a file system, and may be stored as part of a file containing other programs or data, for example, in one or more scripts within a HyperText Markup Language (HTML) document, in a single file dedicated to the program in question, or in multiple co-located files (e.g., files storing one or more modules, subroutines, or code portions). As an example, computer instructions may be deployed to execute on a single computing device, or on multiple computing devices located in one location, or on multiple computing devices distributed across multiple locations and interconnected via a communication network.
[0096] Embodiments of this disclosure also provide a computer program product, including a computer program that is executed by a processor in the steps of the interface control method provided in the embodiments of this disclosure.
[0097] Embodiments of this disclosure also propose a chip including one or more interface circuits and one or more processors; the interface circuits are used to receive signals from the memory of an electronic device and send signals to the processors, the signals including computer instructions stored in the memory, and when the processor executes the computer instructions, it causes the electronic device to perform the steps of the interface control method provided in the embodiments of this disclosure.
[0098] It should be noted that the terms "first," "second," etc., used in the specification, claims, and accompanying drawings of this disclosure are used to distinguish similar objects and are not necessarily used to describe a specific order or sequence. It should be understood that such data can be interchanged where appropriate so that the embodiments of this disclosure described herein can be implemented in orders other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with this disclosure. Rather, they are merely examples of apparatuses and methods consistent with some aspects of this disclosure as detailed in the appended claims.
[0099] In the description of this specification, the references to terms such as "one embodiment," "some embodiments," "illustrative embodiment," "example," "specific example," or "some examples," etc., indicate that a specific feature, structure, material, or characteristic described in connection with an embodiment or example is included in at least one embodiment or example of the present invention. In this specification, the illustrative expressions of the above terms do not necessarily refer to the same embodiment or example. Furthermore, the specific features, structures, materials, or characteristics described may be combined in any suitable manner in one or more embodiments or examples.
[0100] Any process or method description in the flowchart or otherwise herein can be understood as representing a module, segment, or portion of code comprising one or more executable instructions for implementing a particular logical function or process, and the scope of the preferred embodiments of the invention includes additional implementations in which functions may be performed not in the order shown or discussed, including substantially simultaneously or in reverse order depending on the functions involved, as will be understood by those skilled in the art to which embodiments of the invention pertain.
[0101] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a sequenced list of executable instructions for implementing logical functions, and can be embodied in any computer-readable medium for use by, or in conjunction with, an instruction execution system, apparatus or device (such as a computer-based system, a system including a processing module or other system that can fetch and execute instructions from, an instruction execution system, apparatus or device).
[0102] It should be understood that various parts of the embodiments of the present invention can be implemented in hardware, software, firmware, or a combination thereof. In the above embodiments, multiple steps or methods can be implemented in software or firmware stored in memory and executed by a suitable instruction execution system. For example, if implemented in hardware, as in another embodiment, it can be implemented using any one or a combination of the following techniques known in the art: discrete logic circuits having logic gates for implementing logical functions on data signals, application-specific integrated circuits (ASICs) having suitable combinational logic gates, programmable gate arrays (PGAs), field-programmable gate arrays (FPGAs), etc.
[0103] Those skilled in the art will understand that all or part of the steps of the methods described in the above embodiments can be implemented by a program instructing related hardware. The program can be stored in a computer-readable storage medium, and when executed, the program includes one or a combination of the steps of the method embodiments.
[0104] Furthermore, the functional units in the various embodiments of the present invention can be integrated into a processing module, or each unit can exist physically separately, or two or more units can be integrated into a module. The integrated module can be implemented in hardware or as a software functional module. If the integrated module is implemented as a software functional module and sold or used as an independent product, it can also be stored in a computer-readable storage medium. The storage medium mentioned above can be a read-only memory, a disk, or an optical disk, etc.
[0105] Although embodiments of the present invention have been shown and described above, it is understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those skilled in the art can make changes, modifications, substitutions and variations to the above embodiments within the scope of the present invention.
Claims
1. An interface control method, characterized in that, include: Acquire device identification signal; Based on the Device identification signal, the current working mode of the host's USB Type-C interface is determined, including headphone mode, charging mode, and debugging / upgrade mode. The USB Type-C interface will be configured to operate in a specific mode. Before acquiring the Device identification signal, the process also includes: Obtain the audio playback mode identifier signal of the Host when it is operating in audio playback mode; Based on the audio playback mode identification signal, a first channel logic identification voltage signal is configured for the configuration channel pin of the USB Type-C interface, and the first channel logic identification voltage signal is a non-zero voltage signal; The acquisition of the Device identification signal includes: Obtain the second channel logic identification voltage signal or interrupt signal; The step of determining the current operating mode of the Host's USB Type-C interface based on the Device identification signal includes: If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a zero voltage signal, then the current working mode of the Host's USB Type-C interface is headphone mode. If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a non-zero voltage signal, then the current working mode of the Host's USB Type-C interface is debug upgrade mode. If the acquired Device identification signal is an interrupt signal, then the current operating mode of the Host's USB Type-C interface is charging mode.
2. The method according to claim 1, characterized in that, The step of executing a determined operating mode on the USB Type-C interface includes: If the current working mode of the USB Type-C interface of the Host is headphone mode, then connect the audio output channel of the Host's controller to the DP / DM pin of the USB Type-C interface. If the current operating mode of the USB Type-C interface of the Host is debug upgrade mode, then connect the data communication channel of the Host's controller to the DP / DM pin of the USB Type-C interface; If the current operating mode of the USB Type-C interface of the Host is charging mode, then configure the configuration channel pin of the USB Type-C interface with a zero voltage signal.
3. An interface control device, characterized in that, include: The identification signal acquisition unit is used to acquire the device identification signal; The working mode determination unit is used to determine the current working mode of the host's USB Type-C interface based on the Device identification signal. The working mode includes headphone mode, charging mode, and debugging / upgrade mode. An execution unit is used to execute a determined working mode of the USB Type-C interface; Also includes: The identification signal acquisition unit is used to acquire the audio playback mode identification signal of the Host operating in audio playback mode; The first channel logic identification voltage signal acquisition unit is used to configure the first channel logic identification voltage signal for the configuration channel pin of the USB Type-C interface based on the audio playback mode identification signal. The first channel logic identification voltage signal is a non-zero voltage signal. The identification signal acquisition unit is used to: acquire the second channel logic identification voltage signal or interrupt signal; The working mode determination unit is used to: if the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a zero voltage signal, then the current working mode of the Host's USB Type-C interface is headphone mode; If the acquired Device identification signal is the second channel logic identification voltage signal, and the second channel logic identification voltage signal is a non-zero voltage signal, then the current working mode of the Host's USB Type-C interface is debug upgrade mode. If the acquired Device identification signal is an interrupt signal, then the current operating mode of the Host's USB Type-C interface is charging mode.
4. An electronic device, characterized in that, include: A processor and a memory for storing a computer program, the processor for calling and running the computer program stored in the memory to perform the steps of the method as described in any one of claims 1 to 2.
5. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to perform the steps of the method as described in any one of claims 1 to 2.
6. A chip, characterized in that, The device includes one or more interface circuits and one or more processors; the interface circuits are configured to receive signals from the memory of the electronic device and send the signals to the processors, the signals including computer instructions stored in the memory, which, when executed by the processors, cause the electronic device to perform the steps of the method as described in any one of claims 1 to 2.