CN108038034A - Electronic equipment adjustment method, adapter, device and storage medium - Google Patents

Electronic equipment adjustment method, adapter, device and storage medium Download PDF

Info

Publication number
CN108038034A
CN108038034A CN201711322651.2A CN201711322651A CN108038034A CN 108038034 A CN108038034 A CN 108038034A CN 201711322651 A CN201711322651 A CN 201711322651A CN 108038034 A CN108038034 A CN 108038034A
Authority
CN
China
Prior art keywords
interface
usb type
debugging
electronic equipment
uart
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.)
Pending
Application number
CN201711322651.2A
Other languages
Chinese (zh)
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.)
Beijing Xiaomi Mobile Software Co Ltd
Original Assignee
Beijing Xiaomi Mobile Software 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 Beijing Xiaomi Mobile Software Co Ltd filed Critical Beijing Xiaomi Mobile Software Co Ltd
Priority to CN201711322651.2A priority Critical patent/CN108038034A/en
Publication of CN108038034A publication Critical patent/CN108038034A/en
Pending legal-status Critical Current

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2205Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested
    • G06F11/221Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing using arrangements specific to the hardware being tested to test buses, lines or interfaces, e.g. stuck-at or open line faults
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/2273Test methods
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F11/00Error detection; Error correction; Monitoring
    • G06F11/22Detection or location of defective computer hardware by testing during standby operation or during idle time, e.g. start-up testing
    • G06F11/26Functional testing
    • G06F11/273Tester hardware, i.e. output processing circuits
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F2213/00Indexing scheme relating to interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
    • G06F2213/0042Universal serial bus [USB]

Landscapes

  • Engineering & Computer Science (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Computer Hardware Design (AREA)
  • Quality & Reliability (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Debugging And Monitoring (AREA)

Abstract

The disclosure is directed to a kind of electronic equipment adjustment method, adapter, device and storage medium, the problem of to solve existing electronic device exterior without UART debugging interfaces, cause UART debugging efficiencies low.Wherein, electronic equipment includes mainboard, USB Type C interface, UART interface, USB Type C interface pins and debugging switch are provided with the mainboard, USB Type C interface, UART interface are connected by debugging switch with USB Type C interface pins respectively, and above-mentioned electronic equipment adjustment method includes:When electronic equipment meets debugging trigger condition, control debugging switch connection UART interface and USB Type C interface pins;When USB Type C interface pin connects external equipment, the Log information that UART interface exports is output to external equipment by USB Type C interface pins.

Description

Electronic equipment adjustment method, adapter, device and storage medium
Technical field
This disclosure relates to electronic device field, more particularly to a kind of electronic equipment adjustment method, adapter, device and storage Medium.
Background technology
Rapid with electronic equipment manufacturing technology improves, and the form of electronic equipment is more diversified, novel electron equipment Product is had begun to constantly to the trend development such as intelligent, high-fineness and ultrathin.In the related art, due to USB (University Serial Bus, Universal Serial Bus) Type-C interfaces use ease, transmission rate and defeated Go out electric current etc. to have a clear superiority, with reference to the development trend of electronic equipment, more and more producer's selections are in electronic equipment It is upper to use USB Type-C interfaces.It is essential to the process of product machine debugging in order to ensure the quality of electronic equipment, Wherein, UART (Universal Asynchronous Receiver/Transmitter, universal asynchronous receiving-transmitting transmitter) is one The widely used debugging interface of kind.But in view of the factor such as product design beauty, electronic device exterior do not have UART debugging and connect Mouthful, thus need to tear machine processing open carrying out electronic equipment UART debugging.
The content of the invention
It is a general object of the present disclosure to provide a kind of electronic equipment adjustment method, adapter, device and storage medium, to The problem of existing electronic device exterior is solved without UART debugging interfaces, causes UART debugging efficiencies low.
According to the first aspect of the embodiment of the present disclosure, there is provided a kind of electronic equipment adjustment method, the electronic equipment include Mainboard, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, institute are provided with the mainboard State USB Type-C interfaces, UART interface to be connected with the USB Type-C interface pins by debugging switch respectively, the side Method includes:
When the electronic equipment meets debugging trigger condition, UART interface and institute described in the debugging switch connection are controlled State USB Type-C interface pins;
When the USB Type-C interface pins connect external equipment, the Log information that the UART interface exports is led to Cross the USB Type-C interface pins and be output to the external equipment.
Alternatively, the method further includes:
When being unsatisfactory for the debugging trigger condition, USB Type-C interfaces and institute described in the debugging switch connection are controlled State USB Type-C interface pins.
Alternatively, the debugging trigger condition includes:Receive it is input by user open debugging switch operational order and/ Or the electronic equipment is in starting state.
Alternatively, it is described to detect that UART described in the control debugging switch connection connects when meeting debugging trigger condition Mouth and the USB Type-C interface pins, including:
Detect meet the debugging trigger condition when, configure the level of the target pin of the electronics processors For the first level state, to trigger UART interface and the USB Type-C interface pins described in the debugging switch connection, its In, the debugging switch is turned on and off by the level state control of the target pin.
According to the second aspect of the embodiment of the present disclosure, there is provided a kind of adapter, including:
USB Type-C interface plugs, USB interface and AccessPort interface;
Wherein, the USB Type-C interface plugs are used to be connected with the USB Type-C interface pins of electronic equipment, institute USB interface is stated to be used to be connected with external equipment;
The AccessPort interface is used to be connected with external equipment, is carried out data transmission between the external equipment, The data include:
The debugging instruction and/or the USB in the electronic equipment that the external equipment is sent to the electronic equipment When Type-C interface pins and UART interface are connected, Log information that the UART interface is sent to the external equipment.
According to the third aspect of the embodiment of the present disclosure, there is provided a kind of electronic equipment debugging apparatus, the electronic equipment include Mainboard, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, institute are provided with the mainboard State USB Type-C interfaces, UART interface to be connected with the USB Type-C interface pins by debugging switch respectively, the dress Put including:
Link block, is configured as, when the electronic equipment meets debugging trigger condition, controlling the debugging switch to connect Lead to the UART interface and the USB Type-C interface pins;
Output module, is configured as, when the USB Type-C interface pins connect external equipment, the UART being connect The Log information of mouth output is output to the external equipment by the USB Type-C interface pins.
Alternatively, the link block is additionally configured to, and when being unsatisfactory for the debugging trigger condition, controls the debugging USB Type-C interfaces described in switch connection and the USB Type-C interface pins.
Alternatively, the link block includes:
Configure submodule, be configured as detect meet it is described debugging trigger condition when, configure at the electronic equipment The level of target pin for managing device be the first level state, with trigger it is described debug UART interface described in switch connection with it is described USB Type-C interface pins, wherein, the debugging switch is turned on and off by the level state control of the target pin.
According to the fourth aspect of the embodiment of the present disclosure, there is provided a kind of electronic equipment debugging apparatus, the electronic equipment include Mainboard, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, institute are provided with the mainboard USB Type-C interfaces, UART interface is stated to be connected with the USB Type-C interface pins by debugging switch respectively, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
When the electronic equipment meets debugging trigger condition, UART interface and institute described in the debugging switch connection are controlled State USB Type-C interface pins;
When the USB Type-C interface pins connect external equipment, the Log information that the UART interface exports is led to Cross the USB Type-C interface pins and be output to the external equipment.
According to a fifth aspect of the embodiments of the present disclosure, there is provided a kind of computer-readable recording medium, is stored thereon with calculating Machine programmed instruction, the programmed instruction realize the electronic equipment that the first aspect of the embodiment of the present disclosure is provided when being executed by processor The step of adjustment method.
The technical scheme provided by this disclosed embodiment can include the following benefits:
According to above-mentioned technical proposal, electronic equipment includes mainboard, USB Type-C interfaces is provided with the mainboard, UART connects Mouth, USB Type-C interface pins and debugging switch, when detecting satisfaction debugging trigger condition, control debugging switch connection UART interface and USB Type-C interface pins, and when USB Type-C interface pins connect external equipment, by UART interface The Log information of output is output to external equipment by USB Type-C interface pins.So, can be by debugging switch choosing Select USB Type-C interface pins to be connected with USB Type-C interfaces or UART interface, even if electronic device exterior is without UART tune Try mouth, UART debugging can also be carried out in the case where not tearing machine open, improve the efficiency of electronic equipment UART debugging.
It should be appreciated that the general description and following detailed description of the above are only exemplary and explanatory, not The disclosure can be limited.
Brief description of the drawings
Attached drawing herein is merged in specification and forms the part of this specification, shows the implementation for meeting the disclosure Example, and be used to together with specification to explain the principle of the disclosure.
Fig. 1 is the flow chart of a kind of electronic equipment adjustment method according to an exemplary embodiment.
Fig. 2 is a kind of structural representation of the socket pins of USB Type-C interfaces according to an exemplary embodiment Figure.
Fig. 3 is a kind of structure diagram of adapter according to an exemplary embodiment.
Fig. 4 is the flow chart of a kind of electronic equipment adjustment method according to an exemplary embodiment.
Fig. 5 is the block diagram of a kind of electronic equipment debugging apparatus according to an exemplary embodiment.
Fig. 6 is the block diagram of a kind of electronic equipment debugging apparatus according to an exemplary embodiment.
Fig. 7 is the block diagram of a kind of electronic equipment debugging apparatus according to an exemplary embodiment.
Embodiment
Here exemplary embodiment will be illustrated in detail, its example is illustrated in the accompanying drawings.Following description is related to During attached drawing, unless otherwise indicated, the same numbers in different attached drawings represent the same or similar key element.Following exemplary embodiment Described in embodiment do not represent all embodiments consistent with the disclosure.On the contrary, they be only with it is such as appended The example of the consistent apparatus and method of some aspects be described in detail in claims, the disclosure.
UART interface is provided with the mainboard of electronic equipment and is widely used in the USBType-C interfaces of electronic equipment, But the interface that electronic equipment is not had more than needed in itself can directly export UART interface signal, thus electronic equipment carries out complete machine tune Need to tear machine processing open during examination, cause UART debugging efficiencies low.To solve the above-mentioned problems, the embodiment of the present disclosure provides a kind of electricity Sub- apparatus debugging method.
Fig. 1 is the flow chart of a kind of electronic equipment adjustment method according to an exemplary embodiment, the electronic equipment Including mainboard, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch are provided with mainboard, its Middle USB Type-C interfaces, UART interface are connected by debugging switch with USB Type-C interface pins respectively, as shown in Figure 1, This method comprises the following steps:
S11, when electronic equipment meets debugging trigger condition, control debugging switch connection UART interface and USB Type-C Interface pin.
USB Type-C interfaces are a kind of new interfaces, and it is excellent to have that small, transmission rate is high and power supply capacity is strong etc. Point.Electronic equipment for being provided with USB Type-C interfaces, to carry out UART debugging, Ke Yi in the case where not tearing machine open When electronic equipment meets debugging trigger condition, control debugging switch connection USB Type-C interface pins and UART interface, with reality Now drawn from USB Type-C interface pins by UART interface signal, convenient debugging.
In a kind of possible embodiment, electronic equipment can be mobile phone, can also be tablet computer, PDA Embedded devices such as (Personal Digital Assistant, personal digital assistants), the USB set on the electronic equipment The structure of the socket pins of Type-C interfaces is as shown in Fig. 2, including two groups of TX/RX pins for being used for data transfer, for compatibility The D+/D- pins of the other standards of USB and SBU1/SBU2 pins of auxiliary signal etc. are used for transmission under specific transmission pattern. In the related art, in the case where electronic equipment is in audio mode, SBU1 pins and SBU2 pins respectively with earphone interface pin AGND pins are connected MIC pins with analog power, so that audio signal exports;Under specific transmission mode, SBU1 draws Foot and SBU2 pins are then disconnected with earphone interface pin, are connected with other pins, are used for transmission auxiliary signal.Illustratively, it is special Fixed transmission mode can refer to UART debugging modes, and SBU1 pins and SBU2 pins connect with UART interface pin in this mode Connect, be used for transmission UART interface signal.What deserves to be explained is USB Type-C interface pins include but not limited to SBU1/SBU2 Pin can realize above multiplexing function, and in the case where not interference system works normally, USB Type-C interface pins all can be with As multiplexing pins.
When electronic equipment meets debugging trigger condition, electronic equipment then enters UART debugging modes, electronic equipment processing The level of the target pin of device will be configured as the first level state.Illustratively, target pin is electronics processors GPIO_ 1 (General Purpose Input Output, universal input/output) pin, wherein, GPIO_1 pins are on processor One of pin of I/O mouths with input/output function, debugging switch on or closed mode by GPIO_1 pins level State or the control of the state of electronic equipment, different level states can realize the selection of GPIO_1 pin functions, that is, control USB Type-C interface pins are connected with USB Type-C interfaces, or are connected with UART interface.For example, the first level state For high level, when electronic equipment meets debugging trigger condition, the level of the target pin of electronics processors is configured to High level, triggering debugging switch are in opening, can thus trigger debugging switch connection UART interface and USB Type- C interface pin, is transmitted to external equipment by the Log information that UART interface exports for electronic equipment and prepares.
When UART interface is connected with USB Type-C interface pins, specific connection mode can be to meet USB Type-C First default pin of mouth pin and the TXD pins of UART interface connect, and the second of USB Type-C interface pins is preset and is drawn Foot and the RXD pins of UART interface connect.Wherein, the first default pin can be SBU1 pins, and the second default pin can be SBU2 pins;Or first default pin can be SBU2 pins, the second default pin can be SBU1 pins;Or the One default pin and the second default pin can not influence electronic apparatus system to work normally and have the function of other of multiplexing Pin.
Above-mentioned satisfaction debugging trigger condition can refer to that electronic equipment receives the behaviour input by user for opening debugging switch Instruct and/or electronic equipment is currently at starting state.Illustratively, input by user open is received in electronic equipment to debug In the case of the operational order of switch, correspondingly the level state of GP configuring IO_1 pins, controls according to the level state and debugs Switch is turned on and off;Alternatively, since when electronic equipment is in starting state, UART Log information can be generated, for simplification UART Log information output procedures, can give tacit consent to control debugging switch connection UART interface when electronic equipment is in starting state With USB Type-C interface pins so that external equipment gets UART Log information, with electronic equipment more conveniently Carry out debugging interaction.
S12, USB Type-C interface pins connect external equipment when, by UART interface export Log information pass through USB Type-C interface pins are output to external equipment.
Detecting that external equipment is connected with USB Type-C interface pins, and UART interface connects with USB Type-C at this time When mouth pin has been turned on, the Log information that UART interface exports can be output to outside by USB Type-C interface pins and set It is standby.
Specifically, electronic equipment is connected by adapter 300 with external equipment, the adapter 300 can be patchcord or Person's pinboard, as shown in figure 3, including USB Type-C interface plugs 301, USB interface 302 and AccessPort connect concrete structure Mouth 303.Wherein, USB Type-C interface plugs 301 are used to be connected with the USB Type-C interface pins of electronic equipment, and USB connects The 302 expansion interface as the Type-C interfaces of electronic equipment of mouth, for being connected with external equipment;AccessPort interface 303 is used It is connected in external equipment, is carried out data transmission between external equipment, data includes:External equipment is sent to electronic equipment Debugging instruction and/or when USB Type-C interface pins and the UART interface of electronic equipment are connected, UART interface is to outside The Log information that equipment is sent.Illustratively, the external equipment being connected with adapter 300 can be host computer, such as PC (Personal Computer, personal computer), on computer operation be useful for the debugging acid of electronic equipment debugging, such as go here and there Mouth debugging assistant.In this case, the electronic equipment of USB Type-C interfaces and the USB Type-C of adapter 300 are provided with Interface plug 301 connects, and external equipment is connected with the AccessPort interface 303 of adapter 300, is determining connected serial ports class After type, the communication between electronic equipment and external equipment is established according to corresponding transmission standard, with realize electronic equipment with External equipment carries out data transmission.Wherein, transmission standard includes the parameters such as serial port, baud rate, verification mode and stop position, The debugging instruction and/or draw in the USB Type-C interfaces of electronic equipment that communication data is sent including external equipment to electronic equipment When foot and UART interface are connected, Log information that UART interface is sent to external equipment.
Using the above method, when electronic equipment meets debugging trigger condition, selection USB can be switched by debugging Type-C interface pins are connected with USB Type-C interfaces or UART interface, and in the case where meeting to debug trigger condition, By UART interface export Log information external equipment is output to by USB Type-C interfaces, even if electronic device exterior without UART debugging interfaces, also carry out UART debugging without going through the mode of machine of tearing open and the manual fly line of combination, are ensureing that electronic equipment is complete In the case of good, the efficiency of electronic equipment UART debugging is improved.
Fig. 4 is the flow chart of a kind of electronic equipment adjustment method according to an exemplary embodiment, electronic equipment bag Mainboard is included, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, USB are provided with mainboard Type-C interfaces, UART interface are connected by debugging switch with USB Type-C interface pins respectively, as shown in figure 4, this method Comprise the following steps:
S41, beginning.
Whether S42, detection electronic equipment meet to debug trigger condition.
If electronic equipment meets debugging trigger condition, step S43 is performed;
Otherwise, step S45 is performed.
S43, control debugging switch connection UART interface and USB Type-C interface pins.
S44, USB Type-C interface pins connect external equipment when, by UART interface export Log information pass through USB Type-C interface pins are output to external equipment.
S45, when being unsatisfactory for debugging trigger condition, control debugging switch connection USB Type-C interfaces and USB Type-C Interface pin.
In a kind of possible embodiment, detect electronic equipment be unsatisfactory for debugging trigger condition, i.e., do not receive In the case that the operational order for opening debugging switch and/or electronic equipment input by user are not at starting state, electronics is configured The level of the target pin of device handler is second electrical level state, and triggering debugging switch is closed, to trigger debugging Switch connection USB Type-C interfaces and USB Type-C interface pins.
Specific connection mode can be, by the MIC of the first of USB Type-C interfaces the default pin and earphone interface pin Pin connects, and by the second default pin, AGND pins are connected with analog power.Illustratively, second electrical level state can be low electricity It is flat, then when the level state of GPIO_1 pins is low level, control triggering debugging switch connection USB Type-C interfaces and USB Type-C interface pins, such as the MIC pins by the first of USB Type-C interface pins the default pin and earphone interface pin Connection, by the second default pin, AGND pins are connected with analog power.Wherein, the first default pin can be SBU1 pins, Second default pin can be SBU2 pins;Or first default pin can be SBU2 pins, the second default pin can be SBU1 pins;Or first default pin and the second default pin can be do not influence electronic apparatus system normal work and There are other pins of multiplexing.To sum up, when being unsatisfactory for debugging trigger condition, USB Type-C interface pins recover acquiescence Connection mode, i.e., be connected with audio interface pin.
What deserves to be explained is first level can be according to the start of electronic equipment with second electrical level in embodiment disclosed above Level is adjusted correspondingly.Since UART Log information can be generated in start, in order to more convenient opened UART Log information during machine, control debugging switch connection UART interface and USB Type-C interfaces when can be started shooting with default configuration Pin.Thus, if electronic equipment start level is high level, the first level is high level, and second electrical level is low level;It is if electric Sub- device power-up level is low level, then the first level is high level, and second electrical level is low level.
Using the above method, can be set by the level of the target pin for the processor for configuring electronic equipment or according to electronics Standby state, control debugging are switched on or closed, and realize the multiplexing function of USB Type-C interface pins, and meeting to debug In the case of trigger condition, the Log information that UART interface exports is output to external equipment by USB Type-C interfaces, not only Pin resource efficiently is utilized, also improves the debugging efficiency of electronic equipment UART debugging.
Fig. 5 is the block diagram of a kind of electronic equipment debugging apparatus 500 according to an exemplary embodiment, electronic equipment bag Mainboard is included, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, USB are provided with mainboard Type-C interfaces, UART interface are connected by debugging switch with USB Type-C interface pins respectively, electronic equipment debugging apparatus 500 can be implemented in combination with by software, hardware or both as some or all of of electronic equipment.With reference to Fig. 5, the device 500 can include:
Link block 510, is configured as when electronic equipment meets debugging trigger condition, control debugging switch connection UART Interface and USB Type-C interface pins;
Output module 520, is configured as, when USB Type-C interface pins connect external equipment, UART interface being exported Log information external equipment is output to by USB Type-C interface pins.
Alternatively, link block 510 is additionally configured to, when being unsatisfactory for debugging trigger condition, control debugging switch connection USB Type-C interfaces and USB Type-C interface pins.
Using above device, when electronic equipment meets debugging trigger condition, selection USB can be switched by debugging Type-C interface pins are connected with USB Type-C interfaces or UART interface, and in the case where meeting to debug trigger condition, By UART interface export Log information external equipment is output to by USB Type-C interfaces, even if electronic device exterior without UART debugging interfaces, also carry out UART debugging without going through the mode of machine of tearing open and the manual fly line of combination, are ensureing that electronic equipment is complete In the case of good, the efficiency of electronic equipment UART debugging is improved.
Fig. 6 is the block diagram of a kind of electronic equipment debugging apparatus 500 according to an exemplary embodiment, electronic equipment bag Mainboard is included, USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, USB are provided with mainboard Type-C interfaces, UART interface are connected by debugging switch with USB Type-C interface pins respectively, electronic equipment debugging apparatus 500 can be implemented in combination with by software, hardware or both as some or all of of electronic equipment.With reference to Fig. 6, mould is connected Block 510 includes:
Submodule 511 is configured, is configured as, when detecting satisfaction debugging trigger condition, configuring electronics processors The level of target pin is the first level state, and switch connection UART interface and USB Type-C interface pins are debugged with triggering, Wherein, debugging switch is turned on and off by the level state control of target pin.
Using above device, by the level of the target pin for the processor for configuring electronic equipment debugging can be controlled to open What is closed is turned on and off, and realizes the multiplexing function of USB Type-C interface pins, and in the case where meeting to debug trigger condition, The Log information that UART interface exports is output to external equipment by USB Type-C interfaces, not only efficiently utilizes pin resource, Also improve the debugging efficiency of electronic equipment UART debugging.
The embodiment of the present disclosure also provides a kind of electronic equipment debugging apparatus, and electronic equipment includes mainboard, is provided with mainboard USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, USB Type-C interfaces, UART interface It is connected respectively by debugging switch with USB Type-C interface pins, which includes:Processor;It can be held for storing processor The memory of row instruction;Wherein, processor is configured as:When electronic equipment meets debugging trigger condition, control debugging switch Connect UART interface and USB Type-C interface pins;When USB Type-C interface pins connect external equipment, UART is connect The Log information of mouth output is output to external equipment by USB Type-C interface pins.In this way, electronic equipment passes through USB Type-C interface pins are connected with UART interface pin, and UART debugging can be carried out without tearing open in the case of machine, accurately captures UART The Log information of interface output, the raisings of UART debugging efficiencies contribute to the smooth of electronic equipment case study and after-sale service Carry out.
On the device in above-described embodiment, wherein modules perform the concrete mode of operation in related this method Embodiment in be described in detail, explanation will be not set forth in detail herein.
The disclosure also provides a kind of computer-readable recording medium, is stored thereon with computer program instructions, which refers to The step of method for the electronic equipment debugging that the disclosure provides, is realized in order when being executed by processor.
Fig. 7 is the block diagram of a kind of electronic equipment debugging apparatus 700 according to an exemplary embodiment.For example, device 700 can be smart mobile phone, tablet device, personal digital assistant etc..
With reference to Fig. 7, device 700 can include following one or more assemblies:Processing component 701, memory 702, electric power Component 703, multimedia component 704, audio component 705, the interface 706 of input/output (I/O), sensor component 707, and Communication component 708.
The integrated operation of the usual control device 700 of processing component 701, such as operates phase with display, touch operation and record Associated operation.Processing component 701 can carry out execute instruction including one or more processors 709, to complete above-mentioned electronics The all or part of step of apparatus debugging method.In addition, processing component 701 can include one or more modules, easy to handle Interaction between component 701 and other assemblies.For example, processing component 701 can include multi-media module, to facilitate multimedia group Interaction between part 704 and processing component 701.
Memory 702 is configured as storing various types of data to support the operation in device 700.These data are shown Example includes the instruction of any application program or method for being operated on device 700, and contact data, telephone book data, disappears Breath, picture, video etc..Memory 702 can be by any kind of volatibility or non-volatile memory device or their group Close and realize, as static RAM (SRAM), electrically erasable programmable read-only memory (EEPROM) are erasable to compile Journey read-only storage (EPROM), programmable read only memory (PROM), read-only storage (ROM), magnetic memory, flash Device, disk or CD.
Electric power assembly 703 provides electric power for the various assemblies of device 700.Electric power assembly 703 can include power management system System, one or more power supplys, and other components associated with generating, managing and distributing electric power for device 700.
Multimedia component 704 is included in the screen of one output interface of offer between device 700 and user.In some realities Apply in example, screen can include liquid crystal display (LCD) and touch panel (TP).If screen includes touch panel, screen can To be implemented as touch-screen, to receive input signal from the user.Touch panel include one or more touch sensors with Gesture on sensing touch, slip and touch panel.Touch sensor can not only sense the boundary of a touch or slide action, and And also detection and touch or the relevant duration and pressure of slide.In certain embodiments, multimedia component 704 includes One front camera and/or rear camera.It is preceding during such as screening-mode or video mode when device 700 is in operator scheme The multi-medium data of outside can be received by putting camera and/or rear camera.Each front camera and rear camera can To be a fixed optical lens system or there is focusing and optical zoom capabilities.
Audio component 705 is configured as output and/or input audio signal.For example, audio component 705 includes a Mike Wind (MIC), when device 700 is in operator scheme, during such as call model, logging mode and speech recognition mode, microphone by with It is set to reception external audio signal.The received audio signal can be further stored in memory 702 or via communication set Part 708 is sent.In certain embodiments, audio component 705 further includes a loudspeaker, for exports audio signal.
I/O interfaces 706 provide interface between processing component 701 and peripheral interface module, and above-mentioned peripheral interface module can To be keyboard, click wheel, button etc..These buttons may include but be not limited to:Home button, volume button, start button and lock Determine button.
Sensor component 707 includes one or more sensors, and the state for providing various aspects for device 700 is commented Estimate.For example, sensor component 707 can detect opening/closed mode of device 700, the relative positioning of component, such as component For the display and keypad of device 700, sensor component 707 can be with the position of 700 1 components of detection device 700 or device Put change, the existence or non-existence that user contacts with device 700,700 orientation of device or acceleration/deceleration and the temperature of device 700 Change.Sensor component 707 can include proximity sensor, be configured to detect without any physical contact near The presence of object.Sensor component 707 can also include optical sensor, such as CMOS or ccd image sensor, for should in imaging With middle use.In certain embodiments, which can also include acceleration transducer, gyro sensor, magnetic Sensor, pressure sensor or temperature sensor.
Communication component 708 is configured to facilitate the communication of wired or wireless way between device 700 and other equipment.Device 700 can access the wireless network based on communication standard, such as Wi-Fi (Wireless-Fidelity, Wireless Fidelity), 2G or 3G, Or combinations thereof.In one exemplary embodiment, communication component 708 receives via broadcast channel and comes from external broadcasting management The broadcast singal or broadcast related information of system.In one exemplary embodiment, communication component 708 further includes near-field communication (NFC) module, to promote junction service.For example, radio frequency identification (RFID) technology, Infrared Data Association can be based in NFC module (IrDA) technology, ultra wide band (UWB) technology, bluetooth (BT) technology and other technologies are realized.
In the exemplary embodiment, device 700 can be believed by one or more application application-specific integrated circuit (ASIC), numeral Number processor (DSP), digital signal processing appts (DSPD), programmable logic device (PLD), field programmable gate array (FPGA), controller, microcontroller, microprocessor or other electronic components are realized, for performing above-mentioned electronic equipment debugging side Method.
In the exemplary embodiment, a kind of non-transitorycomputer readable storage medium including instructing, example are additionally provided Such as include the memory 702 of instruction, above-metioned instruction can be performed by the processor of device 700 to complete above-mentioned electronic equipment debugging side Method.For example, non-transitorycomputer readable storage medium can be ROM, random access memory (RAM), CD-ROM, tape, Floppy disk and optical data storage devices etc..
Those skilled in the art will readily occur to other embodiment party of the disclosure after considering specification and putting into practice the disclosure Case.This application is intended to cover any variations, uses, or adaptations of the disclosure, these modifications, purposes or adaptability Change follows the general principle of the disclosure and including the undocumented common knowledge in the art of the disclosure or usual skill Art means.Description and embodiments are considered only as exemplary, and the true scope and spirit of the disclosure are by following claim Point out.
It should be appreciated that the present disclosure is not limited to the precise structures that have been described above and shown in the drawings, and And various modifications and changes may be made without departing from the scope thereof.The scope of the present disclosure is only limited by appended claim.

Claims (10)

1. a kind of electronic equipment adjustment method, it is characterised in that the electronic equipment includes mainboard, is provided with the mainboard USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, the USB Type-C interfaces, UART Interface is connected by debugging switch with the USB Type-C interface pins respectively, the described method includes:
The electronic equipment meet debugging trigger condition when, control it is described debugging switch connection described in UART interface with it is described USB Type-C interface pins;
When the USBType-C interface pins connect external equipment, the Log information that the UART interface exports is passed through described USBType-C interface pins are output to the external equipment.
2. according to the method described in claim 1, it is characterized in that, the method further includes:
Be unsatisfactory for it is described debugging trigger condition when, control it is described debugging switch connection described in USB Type-C interfaces with it is described USB Type-C interface pins.
3. method according to claim 1 or 2, it is characterised in that the debugging trigger condition includes:It is defeated to receive user The operational order and/or the electronic equipment of the unlatching debugging switch entered are in starting state.
4. method according to claim 1 or 2, it is characterised in that described when detecting satisfaction debugging trigger condition, control UART interface and the USB Type-C interface pins described in the debugging switch connection are made, including:
Detecting that the level for configuring the target pin of the electronics processors is the when meeting the debugging trigger condition One level state, to trigger UART interface and the USB Type-C interface pins described in the debugging switch connection, wherein, institute Debugging switch is stated to be turned on and off by the level state control of the target pin.
A kind of 5. adapter, it is characterised in that including:
USB Type-C interface plugs, USB interface and AccessPort interface;
Wherein, the USB Type-C interface plugs are used to be connected with the USB Type-C interface pins of electronic equipment, the USB Interface is used to be connected with external equipment;
The AccessPort interface is used to be connected with external equipment, is carried out data transmission between the external equipment, described Data include:
The debugging instruction and/or connect in the USB Type-C of the electronic equipment that the external equipment is sent to the electronic equipment When mouthful pin is connected with UART interface, Log information that the UART interface is sent to the external equipment.
6. a kind of electronic equipment debugging apparatus, it is characterised in that the electronic equipment includes mainboard, is provided with the mainboard USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, the USB Type-C interfaces, UART Interface is connected by debugging switch with the USB Type-C interface pins respectively, and described device includes:
Link block, is configured as, when the electronic equipment meets debugging trigger condition, controlling the debugging switch connection institute State UART interface and the USB Type-C interface pins;
Output module, is configured as when the USB Type-C interface pins connect external equipment, and the UART interface is defeated The Log information gone out is output to the external equipment by the USB Type-C interface pins.
7. device according to claim 6, it is characterised in that the link block is additionally configured to, described in being unsatisfactory for When debugging trigger condition, USB Type-C interfaces described in the debugging switch connection are controlled to draw with the USB Type-C interfaces Foot.
8. the device according to claim 6 or 7, it is characterised in that the link block includes:
Configure submodule, be configured as detect meet it is described debugging trigger condition when, configure the electronics processors The level of target pin be the first level state, to trigger UART interface and the USB described in the debugging switch connection Type-C interface pins, wherein, the debugging switch is turned on and off by the level state control of the target pin.
9. a kind of electronic equipment debugging apparatus, it is characterised in that the electronic equipment includes mainboard, is provided with the mainboard USB Type-C interfaces, UART interface, USB Type-C interface pins and debugging switch, the USB Type-C interfaces, UART Interface is connected by debugging switch with the USB Type-C interface pins respectively, including:
Processor;
For storing the memory of processor-executable instruction;
Wherein, the processor is configured as:
The electronic equipment meet debugging trigger condition when, control it is described debugging switch connection described in UART interface with it is described USB Type-C interface pins;
When the USB Type-C interface pins connect external equipment, the Log information that the UART interface exports is passed through into institute State USB Type-C interface pins and be output to the external equipment.
10. a kind of computer-readable recording medium, is stored thereon with computer program instructions, it is characterised in that the programmed instruction The step of any one of claims 1 to 4 the method is realized when being executed by processor.
CN201711322651.2A 2017-12-12 2017-12-12 Electronic equipment adjustment method, adapter, device and storage medium Pending CN108038034A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201711322651.2A CN108038034A (en) 2017-12-12 2017-12-12 Electronic equipment adjustment method, adapter, device and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201711322651.2A CN108038034A (en) 2017-12-12 2017-12-12 Electronic equipment adjustment method, adapter, device and storage medium

Publications (1)

Publication Number Publication Date
CN108038034A true CN108038034A (en) 2018-05-15

Family

ID=62102547

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201711322651.2A Pending CN108038034A (en) 2017-12-12 2017-12-12 Electronic equipment adjustment method, adapter, device and storage medium

Country Status (1)

Country Link
CN (1) CN108038034A (en)

Cited By (8)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144933A (en) * 2018-08-15 2019-01-04 北京小米移动软件有限公司 USB Type-C interface circuit and electronic equipment
CN109558324A (en) * 2018-11-30 2019-04-02 无锡睿勤科技有限公司 A kind of detection method and equipment
CN109684216A (en) * 2018-12-25 2019-04-26 郑州云海信息技术有限公司 A kind of commissioning device and electronic equipment
CN109766289A (en) * 2018-12-05 2019-05-17 合肥联宝信息技术有限公司 The method of the USB Type C equipment of a kind of electronic equipment identification access
CN110764579A (en) * 2019-10-31 2020-02-07 联想(北京)有限公司 Display device and electronic device
CN110955621A (en) * 2019-12-19 2020-04-03 安徽皖兴通信息技术有限公司 Device and method for multiplexing idle ports of panel
CN111400226A (en) * 2020-03-02 2020-07-10 上海闻泰信息技术有限公司 Mobile terminal device and log acquisition system
CN112256501A (en) * 2020-09-18 2021-01-22 深圳市畅响科技有限公司 Expansion equipment interface detection circuit, interface expansion device and expansion dock

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102750252A (en) * 2012-05-29 2012-10-24 惠州Tcl移动通信有限公司 Circuit capable of reusing universal serial bus (USB)/ universal asynchronous receiver/ transmitter (UART) interfaces and electronic device using same
US20130262928A1 (en) * 2012-04-02 2013-10-03 Compal Electronics, Inc. Debugging device and method for performing a debugging process to a target system
TW201627862A (en) * 2015-01-26 2016-08-01 鴻海精密工業股份有限公司 Debug circuit, debug request circuit and debug system
CN105868140A (en) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 A mobile apparatus
CN106201929A (en) * 2016-07-22 2016-12-07 恒宝股份有限公司 A kind of USB interface multiplex circuit and using method
CN106874154A (en) * 2017-01-22 2017-06-20 珠海市魅族科技有限公司 Mobile terminal device and UART debugging systems
CN107248644A (en) * 2017-08-16 2017-10-13 深圳遨乐科技有限公司 A kind of novel modularized adapter

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US20130262928A1 (en) * 2012-04-02 2013-10-03 Compal Electronics, Inc. Debugging device and method for performing a debugging process to a target system
CN102750252A (en) * 2012-05-29 2012-10-24 惠州Tcl移动通信有限公司 Circuit capable of reusing universal serial bus (USB)/ universal asynchronous receiver/ transmitter (UART) interfaces and electronic device using same
TW201627862A (en) * 2015-01-26 2016-08-01 鴻海精密工業股份有限公司 Debug circuit, debug request circuit and debug system
CN105868140A (en) * 2016-03-25 2016-08-17 乐视控股(北京)有限公司 A mobile apparatus
CN106201929A (en) * 2016-07-22 2016-12-07 恒宝股份有限公司 A kind of USB interface multiplex circuit and using method
CN106874154A (en) * 2017-01-22 2017-06-20 珠海市魅族科技有限公司 Mobile terminal device and UART debugging systems
CN107248644A (en) * 2017-08-16 2017-10-13 深圳遨乐科技有限公司 A kind of novel modularized adapter

Cited By (10)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109144933A (en) * 2018-08-15 2019-01-04 北京小米移动软件有限公司 USB Type-C interface circuit and electronic equipment
CN109558324A (en) * 2018-11-30 2019-04-02 无锡睿勤科技有限公司 A kind of detection method and equipment
CN109766289A (en) * 2018-12-05 2019-05-17 合肥联宝信息技术有限公司 The method of the USB Type C equipment of a kind of electronic equipment identification access
CN109766289B (en) * 2018-12-05 2022-03-25 合肥联宝信息技术有限公司 Method for electronic equipment to identify accessed USB Type C equipment
CN109684216A (en) * 2018-12-25 2019-04-26 郑州云海信息技术有限公司 A kind of commissioning device and electronic equipment
CN110764579A (en) * 2019-10-31 2020-02-07 联想(北京)有限公司 Display device and electronic device
CN110764579B (en) * 2019-10-31 2021-07-16 联想(北京)有限公司 Display device and electronic device
CN110955621A (en) * 2019-12-19 2020-04-03 安徽皖兴通信息技术有限公司 Device and method for multiplexing idle ports of panel
CN111400226A (en) * 2020-03-02 2020-07-10 上海闻泰信息技术有限公司 Mobile terminal device and log acquisition system
CN112256501A (en) * 2020-09-18 2021-01-22 深圳市畅响科技有限公司 Expansion equipment interface detection circuit, interface expansion device and expansion dock

Similar Documents

Publication Publication Date Title
CN108038034A (en) Electronic equipment adjustment method, adapter, device and storage medium
CN104318741B (en) Bluetooth equipment control method and device
CN105098888A (en) Charging method and device
CN105160239A (en) Application program access restriction method and apparatus
CN105068958A (en) Switching control method and device
CN105511749A (en) Method and device for equipment control
CN105117033A (en) Connection method and device of external equipment
CN103916468B (en) Method for upgrading system, terminal, server and upgrade-system
CN105487805A (en) Object operating method and device
CN105160320A (en) Fingerprint identification method and apparatus, and mobile terminal
CN105068467A (en) Method and device for controlling intelligent equipment
CN104881120A (en) Method and device for connecting external device
CN104216672A (en) Display control method and display control device
CN105549960A (en) Camera control method and apparatus
CN105183309B (en) Method for handover control and device
CN106532367A (en) Power consumption warning method and device of smart socket
CN107622189A (en) Optimize the method and apparatus of unlocked by fingerprint
CN105187671A (en) Recording method and device
CN105975038A (en) Prompt method and device of charging port detection result
CN104967174B (en) Charge control method and device
CN105389225A (en) Touch screen reporting point processing method and apparatus
CN107562500A (en) Debugging apparatus, method and apparatus
CN107666660A (en) Intercom collocation method and device
CN107329520A (en) USB interface connection method, equipment and the system of mobile terminal
CN104281431B (en) The method and device that audio plays

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20180515