CN114116546A - Device unplugging reporting method and device, computer readable medium and electronic device - Google Patents
Device unplugging reporting method and device, computer readable medium and electronic device Download PDFInfo
- Publication number
- CN114116546A CN114116546A CN202111408090.4A CN202111408090A CN114116546A CN 114116546 A CN114116546 A CN 114116546A CN 202111408090 A CN202111408090 A CN 202111408090A CN 114116546 A CN114116546 A CN 114116546A
- Authority
- CN
- China
- Prior art keywords
- cid
- interface
- hardware
- timing
- type
- 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.)
- Granted
Links
- 238000000034 method Methods 0.000 title claims abstract description 52
- 238000003780 insertion Methods 0.000 claims abstract description 70
- 230000037431 insertion Effects 0.000 claims abstract description 70
- 230000006870 function Effects 0.000 claims description 35
- 238000001514 detection method Methods 0.000 claims description 29
- 230000004044 response Effects 0.000 claims description 14
- 230000002265 prevention Effects 0.000 claims description 6
- 238000012545 processing Methods 0.000 abstract description 16
- 230000005540 biological transmission Effects 0.000 abstract description 4
- 238000004891 communication Methods 0.000 description 12
- 230000008569 process Effects 0.000 description 12
- 238000007726 management method Methods 0.000 description 9
- 238000000605 extraction Methods 0.000 description 8
- 230000001960 triggered effect Effects 0.000 description 8
- 238000010586 diagram Methods 0.000 description 7
- 230000000875 corresponding effect Effects 0.000 description 4
- 238000010295 mobile communication Methods 0.000 description 4
- 230000003287 optical effect Effects 0.000 description 3
- 230000000737 periodic effect Effects 0.000 description 3
- 238000013459 approach Methods 0.000 description 2
- 238000004590 computer program Methods 0.000 description 2
- 238000005260 corrosion Methods 0.000 description 2
- 230000007797 corrosion Effects 0.000 description 2
- 239000000835 fiber Substances 0.000 description 2
- 230000000644 propagated effect Effects 0.000 description 2
- 239000000523 sample Substances 0.000 description 2
- 230000001133 acceleration Effects 0.000 description 1
- 230000006978 adaptation Effects 0.000 description 1
- 238000004458 analytical method Methods 0.000 description 1
- 238000013528 artificial neural network Methods 0.000 description 1
- 210000000988 bone and bone Anatomy 0.000 description 1
- 230000008859 change Effects 0.000 description 1
- 238000013500 data storage Methods 0.000 description 1
- 230000009977 dual effect Effects 0.000 description 1
- 238000005516 engineering process Methods 0.000 description 1
- 230000010354 integration Effects 0.000 description 1
- 238000012986 modification Methods 0.000 description 1
- 230000004048 modification Effects 0.000 description 1
- 239000013307 optical fiber Substances 0.000 description 1
- 238000002360 preparation method Methods 0.000 description 1
- 238000011084 recovery Methods 0.000 description 1
- 230000003252 repetitive effect Effects 0.000 description 1
- 239000004065 semiconductor Substances 0.000 description 1
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/10—Program control for peripheral devices
- G06F13/102—Program control for peripheral devices where the programme performs an interfacing function, e.g. device driver
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F13/00—Interconnection of, or transfer of information or other signals between, memories, input/output devices or central processing units
- G06F13/14—Handling requests for interconnection or transfer
- G06F13/20—Handling requests for interconnection or transfer for access to input/output bus
- G06F13/24—Handling requests for interconnection or transfer for access to input/output bus using interrupt
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/46—Multiprogramming arrangements
- G06F9/48—Program initiating; Program switching, e.g. by interrupt
- G06F9/4806—Task transfer initiation or dispatching
- G06F9/4812—Task transfer initiation or dispatching by interrupt, e.g. masked
Landscapes
- Engineering & Computer Science (AREA)
- Theoretical Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Engineering & Computer Science (AREA)
- General Physics & Mathematics (AREA)
- Software Systems (AREA)
- Telephone Function (AREA)
Abstract
The disclosure provides a device unplugging reporting method, and relates to the technical field of type-c transmission. The method comprises the following steps: responding to the input of a charger of the terminal equipment to detect CID insertion interruption, and starting timing; reading a CID hardware state mark and a CID software state mark when the timing duration reaches a preset duration; when the CID hardware state mark and the CID software state mark meet the reporting condition, stopping timing and reporting CID pull-out interruption; the reporting conditions comprise: the CID hardware status flag is a pull flag and the CID software status flag is a detect insert flag. According to the method, after the CID insertion interruption occurs for the preset time, whether reporting is needed or not can be determined through the CID hardware state mark and the CID software state mark, so that the AP can acquire the state whether the device connected with the type-c interface is pulled out or not in real time, and further other processing can be performed according to the actual state.
Description
Technical Field
The present disclosure relates to the field of type-c transmission technologies, and in particular, to a device unplug reporting method, a device unplug reporting apparatus, a computer readable medium, and an electronic device.
Background
The Type-C interface is a new transmission interface that has started to be produced in recent years, and the naming primitive is a USB (Universal Serial Bus) Type-C connector.
Since the device connected by the type-c interface relates to two roles, namely sink device or source device, in order to realize the switching of different modes during the connection or disconnection of the interface, the function of plug-in or plug-out detection needs to be integrated. However, in the related art, a device plug-in and plug-out of the type-c interface connection can be detected on a Digital Signal Processor (DSP), but only the device plug-in triggers a CID plug-in interrupt, so that only a plug-in event can be detected on an Application Processor (AP) for further processing the plug-in event; when unplugging, the CID unplugging interrupt cannot be triggered, so that an Application Processor (AP) cannot know whether the device is unplugged in real time, and therefore cannot perform other processing according to the actual state.
Disclosure of Invention
The present disclosure is directed to a device unplugging reporting method, a device unplugging reporting apparatus, a computer readable medium, and an electronic device, so that an AP can obtain a state of whether a device connected to a type-c interface is unplugged in real time, and further perform other processing according to an actual state.
According to a first aspect of the present disclosure, a device unplugging reporting method is provided, which is applied to a terminal device configured with a type-c interface, and includes: responding to the input of a charger of the terminal equipment to detect CID insertion interruption, and starting timing; reading a CID hardware state mark and a CID software state mark when the timing duration reaches a preset duration; when the CID hardware state mark and the CID software state mark meet the reporting condition, stopping timing and reporting CID pull-out interruption; the reporting conditions comprise: the CID hardware status flag is a pull flag and the CID software status flag is a detect insert flag.
According to a second aspect of the present disclosure, there is provided a device unplugging reporting apparatus, applied to a terminal device configured with a type-c interface, including: the timing control module is used for responding to the input detection CID insertion interruption of a charger of the terminal equipment and starting timing; the state reading module is used for reading the CID hardware state mark and the CID software state mark when the timing duration reaches the preset duration; the interrupt reporting module is used for stopping timing and reporting CID pull-out interrupt when the CID hardware state mark and the CID software state mark meet the reporting condition; the reporting conditions comprise: the CID hardware status flag is a pull flag and the CID software status flag is a detect insert flag.
According to a third aspect of the present disclosure, a computer-readable medium is provided, on which a computer program is stored, which computer program, when being executed by a processor, is adapted to carry out the above-mentioned method.
According to a fourth aspect of the present disclosure, there is provided an electronic apparatus, comprising: a processor; and memory storing one or more programs that, when executed by the one or more processors, cause the one or more processors to implement the above-described method.
The device unplugging reporting method provided by the embodiment of the disclosure starts timing in response to CID insertion interruption of the terminal device, and reads a CID hardware state flag and a CID software state flag when the timing duration reaches a preset duration. When the CID hardware state mark and the CID software state mark meet the reporting condition, stopping timing and reporting CID pull-out interruption; wherein, the reporting condition comprises: the CID hardware status flag is a pull flag and the CID software status flag is a detect insert flag. By means of timing, after the CID insertion interruption occurs for a preset time, whether reporting is needed or not can be determined through the CID hardware state mark and the CID software state mark, so that the AP can acquire the state whether the equipment connected with the type-c interface is pulled out or not in real time, and further other processing can be performed according to the actual state.
It is to be understood that both the foregoing general description and the following detailed description are exemplary and explanatory only and are not restrictive of the disclosure.
Drawings
The accompanying drawings, which are incorporated in and constitute a part of this specification, illustrate embodiments consistent with the present disclosure and together with the description, serve to explain the principles of the disclosure. It is to be understood that the drawings in the following description are merely exemplary of the disclosure, and that other drawings may be derived from those drawings by one of ordinary skill in the art without the exercise of inventive faculty. In the drawings:
FIG. 1 illustrates a schematic diagram of an exemplary system architecture to which embodiments of the present disclosure may be applied;
FIG. 2 shows a schematic diagram of an electronic device to which embodiments of the present disclosure may be applied;
FIG. 3 schematically illustrates a pin diagram of a Type-C interface;
FIG. 4 is a schematic diagram illustrating a CC pin of a Type-C interface when a mobile phone is connected to a USB flash disk;
fig. 5 is a flowchart schematically illustrating a method for reporting unplugging of a device in an exemplary embodiment of the present disclosure;
fig. 6 is a flowchart schematically illustrating another device unplugging reporting method in an exemplary embodiment of the present disclosure;
fig. 7 is a flowchart schematically illustrating another device unplugging reporting method in an exemplary embodiment of the present disclosure;
fig. 8 schematically illustrates a composition diagram of a device unplug reporting apparatus in an exemplary embodiment of the present disclosure.
Detailed Description
Example embodiments will now be described more fully with reference to the accompanying drawings. Example embodiments may, however, be embodied in many different forms and should not be construed as limited to the examples set forth herein; rather, these embodiments are provided so that this disclosure will be thorough and complete, and will fully convey the concept of example embodiments to those skilled in the art. The described features, structures, or characteristics may be combined in any suitable manner in one or more embodiments.
Furthermore, the drawings are merely schematic illustrations of the present disclosure and are not necessarily drawn to scale. The same reference numerals in the drawings denote the same or similar parts, and thus their repetitive description will be omitted. Some of the block diagrams shown in the figures are functional entities and do not necessarily correspond to physically or logically separate entities. These functional entities may be implemented in the form of software, or in one or more hardware modules or integrated circuits, or in different networks and/or processor devices and/or microcontroller devices.
Fig. 1 is a schematic diagram illustrating a system architecture of an exemplary application environment to which a device unplugging reporting method and apparatus according to an embodiment of the present disclosure may be applied.
As shown in fig. 1, the system architecture 100 may include one or more of terminal devices 101, 102, 103, a network 104, and a server 105. The network 104 serves as a medium for providing communication links between the terminal devices 101, 102, 103 and the server 105. Network 104 may include various connection types, such as wired, wireless communication links, or fiber optic cables, to name a few. The terminal devices 101, 102, 103 may be various terminal devices configured with a type-c interface, including but not limited to desktop computers, portable computers, smart phones, tablet computers, and the like. It should be understood that the number of terminal devices, networks, and servers in fig. 1 is merely illustrative. There may be any number of terminal devices, networks, and servers, as desired for implementation. For example, server 105 may be a server cluster comprised of multiple servers, or the like.
The device detection method provided by the embodiment of the present disclosure is generally executed by the terminal devices 101, 102, and 103, and accordingly, the device detection apparatus is generally disposed in the terminal devices 101, 102, and 103. However, it is easily understood by those skilled in the art that the device detection method provided in the embodiment of the present disclosure may also be executed by the server 105, and accordingly, the device detection apparatus may also be disposed in the server 105, which is not particularly limited in the exemplary embodiment. For example, in an exemplary embodiment, a type-c interface may be configured on the server 105, and further according to the device detection method provided by the embodiment of the present disclosure, device detection is performed based on the type-c interface.
The exemplary embodiment of the present disclosure provides an electronic device for implementing a device unplug report method, which may be the terminal device 101, 102, 103 or the server 105 in fig. 1. The electronic device at least comprises a processor and a memory, wherein the memory is used for storing executable instructions of the processor, and the processor is configured to execute the device unplugging reporting method by executing the executable instructions.
The following takes the mobile terminal 200 in fig. 2 as an example, and exemplifies the configuration of the electronic device. It will be appreciated by those skilled in the art that the configuration of figure 2 can also be applied to fixed type devices, in addition to components specifically intended for mobile purposes. In other embodiments, mobile terminal 200 may include more or fewer components than shown, or some components may be combined, some components may be split, or a different arrangement of components. The illustrated components may be implemented in hardware, software, or a combination of software and hardware. The interfacing relationship between the components is only schematically illustrated and does not constitute a structural limitation of the mobile terminal 200. In other embodiments, the mobile terminal 200 may also interface differently than shown in fig. 2, or a combination of multiple interfaces.
As shown in fig. 2, the mobile terminal 200 may specifically include: a processor 210, an internal memory 221, an external memory interface 222, a Universal Serial Bus (USB) interface 230, a charging management module 240, a power management module 241, a battery 242, an antenna 1, an antenna 2, a mobile communication module 250, a wireless communication module 260, an audio module 270, a speaker 271, a microphone 272, a microphone 273, an earphone interface 274, a sensor module 280, a display 290, a camera module 291, an indicator 292, a motor 293, a button 294, and a Subscriber Identity Module (SIM) card interface 295. Wherein the sensor module 280 may include a depth sensor 2801, a pressure sensor 2802, a gyroscope sensor 2803, and the like.
The digital signal processor is used for processing digital signals, and can process digital image signals and other digital signals. For example, when the mobile terminal 200 selects a frequency point, the digital signal processor is used to perform fourier transform or the like on the frequency point energy. In some embodiments of the present disclosure, the digital signal processor may be used to adjust the connection mode of the type-c interface based on the settings of the application processor.
A memory is provided in the processor 210. The memory may store instructions for implementing six modular functions: detection instructions, connection instructions, information management instructions, analysis instructions, data transmission instructions, and notification instructions, and execution is controlled by processor 210.
The charge management module 240 is configured to receive a charging input from a charger. The power management module 241 is used for connecting the battery 242, the charging management module 240 and the processor 210. The power management module 241 receives the input of the battery 242 and/or the charging management module 240, and supplies power to the processor 210, the internal memory 221, the display screen 290, the camera module 291, the wireless communication module 260, and the like. In some embodiments, the power management module 241 is provided with a voltage boosting circuit and an output circuit for boosting and outputting current when the mobile terminal 200 supplies power to an external device.
The wireless communication function of the mobile terminal 200 may be implemented by the antenna 1, the antenna 2, the mobile communication module 250, the wireless communication module 260, a modem processor, a baseband processor, and the like. Wherein, the antenna 1 and the antenna 2 are used for transmitting and receiving electromagnetic wave signals; the mobile communication module 250 may provide a solution including wireless communication of 2G/3G/4G/5G, etc. applied to the mobile terminal 200; the modem processor may include a modulator and a demodulator; the Wireless communication module 260 may provide a solution for Wireless communication including a Wireless Local Area Network (WLAN) (e.g., a Wireless Fidelity (Wi-Fi) network), Bluetooth (BT), and the like, applied to the mobile terminal 200. In some embodiments, antenna 1 of the mobile terminal 200 is coupled to the mobile communication module 250 and antenna 2 is coupled to the wireless communication module 260, such that the mobile terminal 200 may communicate with networks and other devices via wireless communication techniques.
Internal memory 221 may be used to store computer-executable program code, which includes instructions. The internal memory 221 may include a program storage area and a data storage area. The storage program area may store an operating system, an application program (such as a sound playing function, an image playing function, etc.) required by at least one function, and the like. The storage data area may store data (e.g., audio data, a phonebook, etc.) created during use of the mobile terminal 200, and the like. In addition, the internal memory 221 may include a high-speed random access memory, and may further include a nonvolatile memory, such as at least one magnetic disk Storage device, a Flash memory device, a Universal Flash Storage (UFS), and the like. The processor 210 executes various functional applications of the mobile terminal 200 and data processing by executing instructions stored in the internal memory 221 and/or instructions stored in a memory provided in the processor.
The depth sensor 2801 is used to acquire depth information of a scene. In some embodiments, a depth sensor may be provided to the camera module 291. The pressure sensor 2802 is used to sense a pressure signal and convert the pressure signal into an electrical signal. The gyro sensor 2803 may be used to determine a motion gesture of the mobile terminal 200.
In addition, other functional sensors, such as an air pressure sensor, a magnetic sensor, an acceleration sensor, a distance sensor, a proximity light sensor, a fingerprint sensor, a temperature sensor, a touch sensor, an ambient light sensor, a bone conduction sensor, etc., may be provided in the sensor module 280 according to actual needs.
Other devices for providing auxiliary functions may also be included in mobile terminal 200. For example, the keys 294 include a power-on key, a volume key, and the like, and a user can generate key signal inputs related to user settings and function control of the mobile terminal 200 through key inputs. Further examples include indicator 292, motor 293, SIM card interface 295, etc.
The naming primitive USB Type-C connector of the USB Type-C interface is a firm and easy-to-use interface, supports positive and negative insertion, and is convenient and quick; meanwhile, the interface supports ultra-high rate communication functions and power output, so the TYPEC protocol is widely used, for example, an adapter of an OTG device needs to use the protocol.
As shown in FIG. 3, the Type-C interface has 12 pairs of pins distributed symmetrically, so that the positive and negative insertion can be supported without distinguishing between the positive and negative as in the conventional interface. The more important pin is the CC pin, and the CC pin is used to detect which role the connected device is in, i.e., sink device or source device. For example, a mobile phone is connected to an OTG usb disk, the mobile phone may be set to a downlink port (DFP) mode for power supply, and the usb disk may be set to an uplink port UFP mode for receiving power supply from the mobile phone. At this time, the CC pin is as shown in fig. 4. The Rd of the USB flash disk is grounded, and at the moment, if the mobile phone is in a DFP mode, namely Rp and Rd are directly connected, external sink equipment can be detected, so that the OTG USB flash disk is detected. The common connection states of the Type-C interface are shown in Table 1 (from a downstream DFP perspective).
TABLE 1 common connection states of Type-C interfaces
CC1 | CC2 | Status of state | Position of |
Is suspended in the air | Is suspended in the air | Without any connection | - |
Rd | Is suspended in the air | UFP connected | Is not turned over |
Is suspended in the air | Rd | UFP connected | Has been turned over |
Is suspended in the air | Ra | Supply cable/UFP unconnected | Is not turned over |
Ra | Is suspended in the air | Supply cable/UFP unconnected | Has been turned over |
Rd | Ra | Supply cable/UFP connected | Is not turned over |
Ra | Rd | Supply cable/UFP connected | Has been turned over |
Rd | Rd | Debug accessory mode connected | - |
When detecting the insertion of the Type-C interface, two modes exist. The first approach generally requires the integration of a discrete insertion detection circuit at the AP side. As shown in fig. 3, the Type-C interface has 4 GND pins that are symmetric with respect to each other, and when performing insertion detection, it is necessary to use one GND pin connected to a comparator for insertion detection. When a device (whether a source device or a sink device) is connected through a Type-C interface, the output of the comparator will pull down one GPIO (General-purpose input/output), at this time, the software will trigger an interrupt (the GPIO level will trigger an interrupt from high to low or from low to high), and then the mode of the connection interface is set to be a DRP mode, and then device detection is started. However, the above method requires additional hardware circuits such as a comparator for insertion detection, which may increase the circuit board area required for the terminal device and the cost of the terminal device.
In another approach, an integrated insertion detection CID (charger input detection) scheme is typically used, and when a device is inserted, TYPEC _ MODE is set to DRP MODE, and when the device is removed, TYPEC _ MODE is reset to SINK MODE. However, in the CID scheme, when performing insertion detection, the DSP) can detect that the device connected to the type-c interface is inserted or removed, but only the device is inserted to trigger CID insertion interruption, so that only an insertion event can be detected on an Application Processor (AP) and then the insertion event is processed; when unplugging, the CID unplugging interrupt cannot be triggered, so that an Application Processor (AP) cannot know whether the device is unplugged in real time, and therefore cannot perform other processing according to the actual state.
Specifically, the principle of the CID scheme is the same as that of a discrete insertion detection circuit through GPIO detection, except that hardware detection logic is integrated into a chip, a hardware comparator is arranged inside the chip, when a USB wire is inserted, the output level of the comparator inside the chip becomes high and is mapped to a CID hardware state flag, the CID hardware state flag indicates insertion, the CID hardware state flag indicates extraction, the inserted USB wire certainly triggers CID insertion interruption, and the AP receives the interruption and then processes the interruption; and the CID hardware state mark is configured as a pull-out mark when the device is pulled out, but the CID pull-out interruption is not triggered to inform the AP to process, so that the AP cannot know whether the device is pulled out or not in real time.
Based on one or more of the above problems, the present exemplary embodiment provides a device unplugging reporting method. The device unplugging reporting method may be applied to the server 105 configured with the type-c interface, and may also be applied to one or more of the terminal devices 101, 102, and 103 configured with the type-c interface, which is not particularly limited in this exemplary embodiment. Referring to fig. 5, the method for reporting pulling-out of a device may include the following steps S510 to S530:
in step S510, in response to the charger input of the terminal device detecting the CID insertion interrupt, a timer is started.
In an exemplary embodiment, when a USB line is inserted, the output level of the comparator inside the chip becomes high and is mapped to the CID hardware status flag, so that the CID hardware status flag is the insertion flag. The AP starts timing in response to the CID insertion interrupt. When timing, forward timing can be adopted, namely, timing is started from 0; it is also possible to use reverse timing, i.e. counting down from the time it is desired to count.
In step S520, when the timed duration reaches the preset duration, the CID hardware status flag and the CID software status flag are read.
In an exemplary embodiment, at the time of timing, when the timing duration reaches a preset duration, the CID hardware status flag and the CID software status flag are read. The CID hardware state mark is a mark for marking a DSP state, specifically, a state mark performed by the DSP according to an electrical signal of the interface. The value of the status flag is typically stored in the CID register, so the flag may be the corresponding value in the CID register; the CID software state mark is a mark for marking an AP state, and specifically, is a state mark for marking whether an AP end-to-interface modified by a reported CID insertion interrupt or CID extraction interrupt is actually inserted by the AP end. The flag is generally denoted CID-status, and thus may be a value of CID-status. Further, the CID hardware status flag and the CID software status flag may identify the status by different flags, respectively. For example, the CID hardware status flag may indicate the status of unplugged and plugged-in by 0 and 1, respectively; as another example, the CID software status flag may indicate the detection of an insertion and the non-detection of an insertion by detect and no-detect, respectively. It should be noted that, the CID hardware status flag and the CID software status flag may adopt the same type of flag, for example, both adopt numbers; different types of markings may also be used, for example a number and a letter respectively.
Optionally, when forward timing is adopted, timing can be started from 0 until the timing duration reaches a preset duration; when the reverse timing is adopted, initial time can be set, the initial time is equal to the preset time length, then the countdown is carried out, and when the countdown is 0, the timed time length reaches the preset time length.
In step S530, when the CID hardware status flag and the CID software status flag satisfy the reporting condition, timing is stopped, and CID pulling interrupt is reported.
Wherein, the reporting condition comprises: the CID hardware status flag is a pull flag and the CID software status flag is a detect insert flag. When equipment such as a USB line is inserted into the type-c interface, the output level of a comparator in the chip becomes high and is mapped to the CID hardware state mark, so that the CID hardware state mark is an insertion mark; meanwhile, when a device such as a USB line is inserted, CID insertion interruption is triggered, and after the CID insertion interruption is received by the AP, the CID insertion interruption is processed. During processing, the CID software state mark is configured as an insertion mark; on this basis, when a device such as a USB cable is pulled out from the type-c interface, the CID hardware status flag is configured as a pull-out flag. At this time, although the device is unplugged, the CID software status flag remains the plug-in flag since the CID unplugging interrupt is not triggered. Therefore, the reporting condition can be set such that the CID hardware status flag is a pull-out flag, and the CID software status flag is a detection insertion flag.
By setting the timing, when the timing duration reaches the preset duration, the CID hardware state mark and the CID software state mark can be actively acquired, and whether CID extraction interruption needs to be reported or not is determined according to the CID hardware state mark and the CID software state mark, so that the AP can know whether the equipment is extracted or not in real time.
In an exemplary embodiment, when the CID hardware state flag and the CID software state flag do not satisfy the reporting condition, it indicates that the devices such as the USB cable and the like are not pulled out from the type-c interface, so that the timing can be reset, and the timing is restarted, so that after the timing duration reaches the preset duration again, the CID hardware state flag and the CID software state flag are read again, and then whether to report the CID pull-out interrupt is determined again according to the CID hardware state flag and the CID software state flag.
When the reporting condition is not met, resetting the timing duration and restarting the timing, and when the timing duration reaches the preset duration, re-reading the CID hardware state mark and the CID software state mark to realize the process of polling the CID hardware state mark and the CID software state mark for multiple times, and further determining whether the reporting condition is met or not and whether the CID pulling interrupt is reported or not according to the CID hardware state mark and the CID software state mark obtained every time.
In an exemplary embodiment, after detecting that the type-c interface pull-out interrupt trigger or the charging driving function ends and reporting the CID insertion interrupt, the CID hardware status flag and the status flag of the CC pin of the type-c interface may be read, and when the CID hardware status flag and the status of the CC pin satisfy the stop condition, the timing may be stopped. Specifically, for the type-c interface interrupt, the type-c interface interrupt is triggered later than the CID interrupt; meanwhile, in the case of only inserting a line, it is also possible that the type-c interface interrupt is not generated (for example, the USB line is inserted without any pull-up and pull-down, and the insertion is the same as the case of not inserting), and therefore, for the case of triggering the type-c interface insertion interrupt, it is possible to determine whether the state of pull-out occurs directly depending on the type-c interface pull-out interrupt. Therefore, when the CID hardware status flag and the status of the CC pin satisfy the stop condition, the polling process by timing may be stopped; the case of the end of the charging driving function is similar to the case of the type-c interface interruption, and the polling process by the timing can also be stopped directly by the CID hardware status flag and the state of the CC pin.
Wherein the stop condition may include: the CID hardware state mark is an insertion mark and the state mark of the CC foot is a pulling mark, or the CID hardware state mark is a pulling mark and the state mark of the CC foot is a pulling mark. It should be noted that, when the CID hardware status flag is an insertion flag and the status flag of the CC pin is a pull-out flag, it indicates insertion, and when there is a type-c interface interrupt for insertion interruption, there is certainly a corresponding pull-out interruption, so that it can be determined whether to report the CID pull-out interruption according to the pull-out interruption; when the CID hardware state mark is the pull-out mark and the state mark of the CC pin is the pull-out mark, the physical pull-out state can be determined, so that the CID pull-out interruption needing to be reported can be directly determined according to the physical pull-out state. In both cases, therefore, the timing can be stopped without polling relying on timing.
Further, after the timing is stopped, when the CID hardware status flag is a pulling flag, the CID pulling interrupt may be reported, so that the AP may know whether the device is pulled in real time.
It should be added that, no matter what kind of CID pulling interrupt reported above is received by the AP, in response to the CID pulling interrupt, the AP may configure the CID software status flag as undetected from the insertion flag.
In addition, when the connection mode of the type-c interface is in a dual role port (DPR), a periodic square wave is output on the CC pin of the type-c interface. Such periodic square wave output may cause system power consumption of the device in which the type-c interface is located; meanwhile, in the case that the type-c interface is electrified for a long time, interface corrosion, electric leakage and the like may occur. Therefore, no matter which of the above situations is reported, when the AP receives the CID pulling interrupt, in response to the CID pulling interrupt, the AP may send a control instruction to adjust the connection mode of the type-c interface to an uplink port mode (UFP), so as to avoid that the connection mode of the type-c interface is still in a DRP mode when no device is connected, thereby avoiding the problems of power consumption, leakage, corrosion, and the like caused by the periodic square wave output by the type-c interface.
In an exemplary embodiment, when the terminal device configured with the type-c interface includes the OTG function, it may also be determined whether the connection mode of the type-c interface needs to be adjusted according to an OTG switch corresponding to the OTG function. Optionally, no matter which of the CID pulling-out interrupts reported by the AP receives, in response to the CID pulling-out interrupt, the AP may read the state of the OTG switch, and then determine whether the connection mode of the type-c interface needs to be adjusted according to the state of the OTG switch. When the OTG switch is in a closed state, the connection mode of the type-c interface is adjusted to UFP; when the OTG switch is in an on state, the connection mode of the type-c interface is kept to be DPR.
In an exemplary embodiment, when the terminal device configured with the type-c interface comprises the anti-burning function, the CID hardware state flag can be read again, when the CID hardware state flag is the insertion flag, the connection mode of the type-c interface is acquired, and when the connection mode of the type-c interface is the non-dual-role port mode, the connection mode of the type-c interface is adjusted to the dual-role port mode; and when the CID hardware state mark is the pull-out mark, acquiring the state of the burning-prevention function, and when the burning-prevention function is started, closing the burning-prevention function.
Referring to fig. 6 to 7, a terminal device with an OTG function and a burn-out prevention function and configured with a type-c interface is taken as an example, and a preset time is 10s, so as to explain in detail a technical solution of an embodiment of the present disclosure:
referring to fig. 6, it is assumed that the CID hardware status flag includes 0 and 1, indicating the unplugged and plugged-in states, respectively; the CID software status flag includes d and nd indicating the status of detected insertion and undetected insertion, respectively; the status flags of the CC pin include 0 and 1, indicating the unplugged and plugged-in status, respectively.
Step S601, initializing 10S timing;
step S603, judging whether the CID software state mark is nd;
step S605, when the CID software state mark is nd, the timing is closed for 10S by default;
step S607, judging whether the terminal device triggers the charger to input the detection CID insertion interruption;
step S609, responding to the input detection CID insertion interruption of the charger of the terminal equipment, and starting 10S timing;
step S611, when the timing is finished, judging whether the CID hardware state mark is 1;
step S613, when the CID hardware status flag is 1, resetting the 10S timing, and restarting the timing;
step S615, when the CID hardware status flag is 0, reading and judging whether the CID software status flag is d; meanwhile, stopping timing for 10 s;
step S617, when the CID software state mark is d, the DSP reports CID pulling interruption to the AP; meanwhile, the CID software status flag is configured as nd;
step S619, after the DSP reports the CID extraction interruption to the AP or when the CID software state is marked as nd, the DSP judges whether the OTG switch of the terminal equipment is started or not;
step S621, when the OTG switch is in an on state, keeping the connection mode of the type-c interface as a dual-role port mode;
step S623, when the OTG switch is in a closed state, adjusting the connection mode of the type-c interface to an uplink port mode;
step S625, when the AP receives the CID pull-out interrupt, the AP reads the CID hardware state mark;
step S627, judging whether the CID hardware state flag is 1;
step S629, when the CID hardware state is marked as 1, reading the connection mode of the type-c interface;
step S631, judging whether the connection mode of the type-c interface is a DRP;
step S633, when the connection mode of the type-c interface is not the DRP, the connection mode of the type-c interface is a dual-role port mode;
step S635, when the CID hardware state mark is 0, judging whether the port burning prevention mode is started;
step S637, when the burning-prevention mode is started, closing the burning-prevention mode;
specifically, the user is prompted by the elastic frame after the burning-resistant mode is opened, the burning-resistant mode needs to be pulled out when being closed, and the burning-resistant mode can be closed through the burning-resistant recovery thread when being pulled out.
Referring to fig. 7, in step S701, a connection line is inserted into a type-c interface;
step S703 of triggering CID insertion interruption;
step S705, judging whether the AP is ready;
step S707, when the AP is not ready, after waiting for the AP to be ready, processing the CID insertion interruption;
step S709, when the AP is ready, reading and judging whether the CID hardware state flag is 1;
step S711, when the CID hardware mark is 1, starting 10S timing;
step S713, the CID software flag is set to d;
step S715, reporting CID insertion interruption to the AP, and setting the connection mode of the type-c interface as DRP.
When various connection lines are inserted, a CID insertion interrupt is triggered first, and in a function of processing the CID insertion interrupt, it is determined whether or not the AP is ready. This is because the DSP sends a message to the AP via the GLINK, and the AP is not ready to further process the message. If the AP is not ready, the CID insertion interrupt function cannot continue to process, and the AP needs to wait for the preparation and the processing. Under the condition that the AP is prepared, reading the state of the CID, wherein the read state of the CID is equal to 1 to indicate insertion, and at the moment, the 10s timing needs to be reset and the timing needs to be restarted no matter the memory before timing does not exist, and the CID software state mark is set as d; meanwhile, the AP is sent a message to inform that the insertion/extraction state of the AP is changed, the AP is required to actively read and perform corresponding actions, and finally, the connection mode of the type-c interface is set as DRP
Step 717, judging whether to trigger the type-c interface insertion interruption;
step S719, when the charging driver function probe function is finished and the CID hardware state is marked as 1, setting the CID software state as d, and reporting CID insertion interruption to the AP;
step S721, after triggering the type-c interface insertion interruption or reporting the CID insertion event to the AP, reading the CID hardware state mark and the state mark of the CC pin of the type-c interface;
step S723, judging whether the CID hardware state mark and the state mark of the CC pin meet the stop condition;
step S725, when the CID hardware state mark and the state mark of the CC pin meet the stop condition, stopping timing for 10S;
step S727, judging whether the CID hardware state flag is 0 when the timing is stopped for 10S or the timing is finished for 10S;
step S729, when the CID hardware status flag is 0, reading and judging whether the CID software status flag is d;
step S731, when the CID software label is d, reporting CID pulling interruption, and configuring the CID software label as nd;
step S733, judging whether the OTG switch is turned on or not when the CID hardware state is marked as 0;
step S735, when the OTG switch is in the close state, the connection mode of the type-c interface is adjusted to the uplink port mode;
in step 737, when the CID hardware state is marked as 1 or the OTG switch is in the on state, the connection mode of the type-c interface is maintained as the dual-role port mode.
It should be noted that the triggering of type-c interrupt is later than the triggering of CID interrupt, and when only the line is plugged in, there is a possibility that type-c interrupt will not occur, for example, the USB line is a USB line without any pull-up and pull-down, in which case the detection of pull-out can only depend on polling after 10s timing is over; if there is type-c interruption, then the type-c interruption can be used to judge whether to be pulled out or not in time.
Specifically, when detecting type-c interruption, reading a CID hardware state mark and a CC pin state mark of a type-c interface, if the CID hardware state mark is 1 and the state mark of the CC pin is 0, indicating insertion, and turning off a 10s timer for opening the CID insertion interruption at the moment, wherein the type-c extraction interruption is determined to exist because the type-c insertion interruption is determined to exist, and whether physical extraction is performed or not is processed in the type-c extraction interruption; meanwhile, when the CID hardware status is marked as 0 and the CC pin status is marked as 0, it indicates that the physical device is actually unplugged, and the timing needs to be stopped for 10 s.
Then, when the hardware status of the CID is marked as 1, the connection mode of the type-c interface needs to be kept as the DRP; when the CID hardware status flag is 0, it needs to be judged whether the current OTG switch is turned on, and if not, it needs to set the connection mode of the type-c interface as UFP, and at the same time, it judges whether the current CID software status flag is the detected connection flag, if so, it needs to report the status change to AP, and set the CID software status flag as nd, indicating that the device has been pulled out.
In addition, when the probe function of the AP running out, the prepared message of the AP is sent to the DSP through the GLINK, which is performed before the mobile phone is turned on, that is, the initialization of the power-on system is performed once. The CID hardware status flag is also read, which when it is 1 indicates that the device is inserted, the connection mode of the type-c interface is DRP, and the CID software status flag is d, and the AP is notified that the device is inserted. Then, when the type-c interrupt is triggered, whether to stop timing or to report can be determined by the CID hardware status flag and the CC pin status flag of the type-c interface.
In summary, in the present exemplary embodiment, a solution is devised to solve the problem that the plug-in detection is performed based on the CID and the unplugging thereof does not trigger the software interrupt. The scheme can avoid the problem that the CID does not trigger the software extraction interruption, and ensures the function and the power consumption within a controllable range.
It is noted that the above-mentioned figures are merely schematic illustrations of processes involved in methods according to exemplary embodiments of the present disclosure, and are not intended to be limiting. It will be readily understood that the processes shown in the above figures are not intended to indicate or limit the chronological order of the processes. In addition, it is also readily understood that these processes may be performed synchronously or asynchronously, e.g., in multiple modules.
Further, referring to fig. 8, in this exemplary embodiment, an apparatus 800 for reporting a device unplugging status is further provided, which includes a timing control module 810, a status reading module 820 and an interrupt reporting module 830. Wherein:
the timing control module 810 may be configured to start timing in response to a charger input of the terminal device detecting a CID insertion interrupt.
The status reading module 820 can be configured to read the CID hardware status flag and the CID software status flag when the timed duration reaches a preset duration.
The interrupt reporting module 830 may be configured to stop timing and report a CID pull-out interrupt when the CID hardware status flag and the CID software status flag satisfy a reporting condition;
the reporting conditions comprise: the CID hardware status flag is a pull flag and the CID software status flag is a detect insert flag.
In an exemplary embodiment, the timing control module 810 may be configured to reset the timing duration of the timing and restart the timing when the CID hardware status flag and the CID software status flag do not satisfy the reporting condition, so as to re-read the CID hardware status flag and the CID software status flag when the timing duration reaches the preset duration.
In an exemplary embodiment, the timing control module 810 may be configured to read a CID hardware status flag and a status flag of a CC pin of the type-c interface after detecting that the type-c interface is unplugged from the interrupt trigger or the charging driving function is ended and reporting a CID insertion interrupt; and when the CID hardware state mark and the CC pin state mark meet the stop condition, stopping timing.
In an exemplary embodiment, after stopping the timing, the interrupt reporting module 830 may be configured to report the CID unplugged interrupt when the CID hardware status flag is unplugged flag.
In an exemplary embodiment, the status reading module 820 may be configured to configure the CID software status flag to not detect the insertion flag in response to a CID unplugging interrupt.
In an exemplary embodiment, the status reading module 820 may be configured to adjust a connection mode of the type-c interface to an uplink port mode in response to the CID unplugging interrupt.
In an exemplary embodiment, the status reading module 820 may be configured to read the status of the OTG switch in response to a CID pull-out interrupt; when the OTG switch is in a closed state, adjusting the connection mode of the type-c interface into an uplink port mode; when the OTG switch is in an opening state, the connection mode of the type-c interface is kept to be a dual-role port mode.
In an exemplary embodiment, the status reading module 820 may be configured to read a CID hardware status flag in response to a CID unplugging interrupt; when the CID hardware state mark is an insertion mark, acquiring a connection mode of a type-c interface, and adjusting the connection mode of the type-c interface to be a dual-role port mode when the connection mode of the type-c interface is a non-dual-role port mode; and when the CID hardware state mark is the pull-out mark, acquiring the state of the burning-prevention function, and when the burning-prevention function is started, closing the burning-prevention function.
The specific details of each module in the above apparatus have been described in detail in the method section, and details that are not disclosed may refer to the method section, and thus are not described again.
As will be appreciated by one skilled in the art, aspects of the present disclosure may be embodied as a system, method or program product. Accordingly, various aspects of the present disclosure may be embodied in the form of: an entirely hardware embodiment, an entirely software embodiment (including firmware, microcode, etc.) or an embodiment combining hardware and software aspects that may all generally be referred to herein as a "circuit," module "or" system.
Exemplary embodiments of the present disclosure also provide a computer-readable storage medium having stored thereon a program product capable of implementing the above-described method of the present specification. In some possible embodiments, various aspects of the disclosure may also be implemented in the form of a program product including program code for causing a terminal device to perform the steps according to various exemplary embodiments of the disclosure described in the above-mentioned "exemplary methods" section of this specification, when the program product is run on the terminal device, for example, any one or more of the steps in fig. 5 to 7 may be performed.
It should be noted that the computer readable media shown in the present disclosure may be computer readable signal media or computer readable storage media or any combination of the two. A computer readable storage medium may be, for example, but not limited to, an electronic, magnetic, optical, electromagnetic, infrared, or semiconductor system, apparatus, or device, or any combination of the foregoing. More specific examples of the computer readable storage medium may include, but are not limited to: an electrical connection having one or more wires, a portable computer diskette, a hard disk, a Random Access Memory (RAM), a read-only memory (ROM), an erasable programmable read-only memory (EPROM or flash memory), an optical fiber, a portable compact disc read-only memory (CD-ROM), an optical storage device, a magnetic storage device, or any suitable combination of the foregoing.
In the present disclosure, a computer readable storage medium may be any tangible medium that can contain, or store a program for use by or in connection with an instruction execution system, apparatus, or device. In contrast, in the present disclosure, a computer readable signal medium may comprise a propagated data signal with computer readable program code embodied therein, either in baseband or as part of a carrier wave. Such a propagated data signal may take many forms, including, but not limited to, electro-magnetic, optical, or any suitable combination thereof. A computer readable signal medium may also be any computer readable medium that is not a computer readable storage medium and that can communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. Program code embodied on a computer readable medium may be transmitted using any appropriate medium, including but not limited to: wireless, wire, fiber optic cable, RF, etc., or any suitable combination of the foregoing.
Furthermore, program code for carrying out operations of the present disclosure may be written in any combination of one or more programming languages, including an object oriented programming language such as Java, C + + or the like and conventional procedural programming languages, such as the "C" programming language or similar programming languages. The program code may execute entirely on the user's computing device, partly on the user's device, as a stand-alone software package, partly on the user's computing device and partly on a remote computing device, or entirely on the remote computing device or server. In the case of a remote computing device, the remote computing device may be connected to the user computing device through any kind of network, including a Local Area Network (LAN) or a Wide Area Network (WAN), or may be connected to an external computing device (e.g., through the internet using an internet service provider).
Other embodiments of the disclosure will be apparent to those skilled in the art from consideration of the specification and practice of the disclosure disclosed herein. This application is intended to cover any variations, uses, or adaptations of the disclosure following, in general, the principles of the disclosure and including such departures from the present disclosure as come within known or customary practice within the art to which the disclosure pertains. It is intended that the specification and examples be considered as exemplary only, with a true scope and spirit of the disclosure being indicated by the following claims.
It will be understood that the present disclosure is not limited to the precise arrangements described above and shown in the drawings and that various modifications and changes may be made without departing from the scope thereof. The scope of the present disclosure is to be limited only by the terms of the appended claims.
Claims (10)
1. A device unplugging reporting method is applied to a terminal device configured with a type-c interface, and is characterized by comprising the following steps:
responding to the input detection CID insertion interruption of the charger of the terminal equipment, and starting timing;
reading a CID hardware state mark and a CID software state mark when the timed duration reaches a preset duration;
when the CID hardware state mark and the CID software state mark meet the reporting condition, stopping timing and reporting CID pull-out interruption;
the reporting condition comprises: the CID hardware status flag is a pull flag, and the CID software status flag is a detect insert flag.
2. The method of claim 1, further comprising:
and when the CID hardware state mark and the CID software state mark do not meet the reporting condition, resetting the timing duration of the timing and restarting the timing, so that when the timing duration reaches the preset duration, the CID hardware state mark and the CID software state mark are read again.
3. The method of claim 1, further comprising:
after detecting that the type-c interface is pulled out and interrupted or the charging driving function is ended and reporting CID insertion interruption, reading a CID hardware state mark and a state mark of a CC pin of the type-c interface;
and stopping the timing when the CID hardware state mark and the state mark of the CC foot meet a stop condition.
4. The method of claim 3, wherein after stopping the timing, the method further comprises:
and reporting the CID pull-out interruption when the CID hardware status mark is a pull-out mark.
5. The method according to any one of claims 1 or 4, further comprising:
configuring a CID software status flag to not detect an insertion flag in response to the CID unplug interrupt.
6. The method according to any one of claims 1 or 4, further comprising:
and responding to the CID pull-out interruption, and adjusting the connection mode of the type-c interface into an uplink port mode.
7. The method according to any one of claims 1 or 4, wherein the terminal device comprises an OTG function, the method further comprising:
reading the state of the OTG switch in response to the CID pull-out interrupt;
when the OTG switch is in a closed state, adjusting the connection mode of the type-c interface into an uplink port mode;
and when the OTG switch is in an opening state, keeping the connection mode of the type-c interface to be a dual-role port mode.
8. The method according to any one of claims 1 or 4, wherein the terminal device comprises a burn-in prevention function; the method further comprises the following steps:
reading the CID hardware status flag in response to the CID pull interrupt;
when the CID hardware state mark is an insertion mark, acquiring a connection mode of the type-c interface, and when the connection mode of the type-c interface is a non-dual-role port mode, adjusting the connection mode of the type-c interface to be a dual-role port mode;
and when the CID hardware state mark is a pull-out mark, acquiring the state of the burn-in prevention function, and when the burn-in prevention function is started, closing the burn-in prevention function.
9. The utility model provides a device pulls out and reports device, is applied to the terminal equipment who disposes type-c interface, its characterized in that includes:
the timing control module is used for responding to the input detection CID insertion interruption of the charger of the terminal equipment and starting timing;
the state reading module is used for reading the CID hardware state mark and the CID software state mark when the timing duration reaches a preset duration;
an interrupt reporting module, configured to stop the timing and report a CID pull-out interrupt when the CID hardware status flag and the CID software status flag meet a reporting condition;
the reporting condition comprises: the CID hardware status flag is a pull flag, and the CID software status flag is a detect insert flag.
10. An electronic device, comprising:
a processor; and
a memory for storing executable instructions of the processor;
wherein the processor is configured to perform the method of any of claims 1-8 via execution of the executable instructions.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111408090.4A CN114116546B (en) | 2021-11-19 | 2021-11-19 | Equipment pull-out reporting method and device, computer readable medium and electronic equipment |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111408090.4A CN114116546B (en) | 2021-11-19 | 2021-11-19 | Equipment pull-out reporting method and device, computer readable medium and electronic equipment |
Publications (2)
Publication Number | Publication Date |
---|---|
CN114116546A true CN114116546A (en) | 2022-03-01 |
CN114116546B CN114116546B (en) | 2024-07-23 |
Family
ID=80372428
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111408090.4A Active CN114116546B (en) | 2021-11-19 | 2021-11-19 | Equipment pull-out reporting method and device, computer readable medium and electronic equipment |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN114116546B (en) |
Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102223439A (en) * | 2011-04-29 | 2011-10-19 | 中兴通讯股份有限公司 | Electronic equipment with USB interface and USB communication starting method thereof |
CN104360191A (en) * | 2014-11-14 | 2015-02-18 | 惠州Tcl移动通信有限公司 | Device and method for detecting plug-in and pull-out of charger |
CN106356934A (en) * | 2016-09-26 | 2017-01-25 | 努比亚技术有限公司 | Charging control method and mobile terminal |
CN106537286A (en) * | 2015-05-25 | 2017-03-22 | 华为技术有限公司 | OTG peripheral device, power supply method, terminal and system |
CN107480084A (en) * | 2017-07-26 | 2017-12-15 | 深圳天珑无线科技有限公司 | Type C mobile terminals charge and data transmission method, device and storage medium |
CN107666307A (en) * | 2017-08-31 | 2018-02-06 | 普联技术有限公司 | A kind of USB insertion detection circuits and USB insert detection device |
US20180173664A1 (en) * | 2016-12-20 | 2018-06-21 | Dell Products L.P. | Systems and methods for configuration of hot-inserted device prior to operating system control of device |
US10078611B1 (en) * | 2017-06-19 | 2018-09-18 | Qualcomm Incorporated | Smart handling of input/output interrupts |
CN108595352A (en) * | 2018-05-14 | 2018-09-28 | 维沃移动通信有限公司 | A kind of guard method of mobile terminal and device |
US20200142706A1 (en) * | 2018-11-06 | 2020-05-07 | International Business Machines Corporation | Saving and restoring machine state between multiple executions of an instruction |
CN111949107A (en) * | 2019-05-15 | 2020-11-17 | 北京小米移动软件有限公司 | Method and device for controlling electronic equipment comprising USB Type-C interface and electronic equipment |
CN112579500A (en) * | 2020-12-08 | 2021-03-30 | 深圳市道通科技股份有限公司 | Method and device for prompting anti-misplug USB interface and electronic equipment |
CN113030794A (en) * | 2021-03-02 | 2021-06-25 | Oppo广东移动通信有限公司 | Device detection method and device, computer readable medium and electronic device |
-
2021
- 2021-11-19 CN CN202111408090.4A patent/CN114116546B/en active Active
Patent Citations (13)
Publication number | Priority date | Publication date | Assignee | Title |
---|---|---|---|---|
CN102223439A (en) * | 2011-04-29 | 2011-10-19 | 中兴通讯股份有限公司 | Electronic equipment with USB interface and USB communication starting method thereof |
CN104360191A (en) * | 2014-11-14 | 2015-02-18 | 惠州Tcl移动通信有限公司 | Device and method for detecting plug-in and pull-out of charger |
CN106537286A (en) * | 2015-05-25 | 2017-03-22 | 华为技术有限公司 | OTG peripheral device, power supply method, terminal and system |
CN106356934A (en) * | 2016-09-26 | 2017-01-25 | 努比亚技术有限公司 | Charging control method and mobile terminal |
US20180173664A1 (en) * | 2016-12-20 | 2018-06-21 | Dell Products L.P. | Systems and methods for configuration of hot-inserted device prior to operating system control of device |
US10078611B1 (en) * | 2017-06-19 | 2018-09-18 | Qualcomm Incorporated | Smart handling of input/output interrupts |
CN107480084A (en) * | 2017-07-26 | 2017-12-15 | 深圳天珑无线科技有限公司 | Type C mobile terminals charge and data transmission method, device and storage medium |
CN107666307A (en) * | 2017-08-31 | 2018-02-06 | 普联技术有限公司 | A kind of USB insertion detection circuits and USB insert detection device |
CN108595352A (en) * | 2018-05-14 | 2018-09-28 | 维沃移动通信有限公司 | A kind of guard method of mobile terminal and device |
US20200142706A1 (en) * | 2018-11-06 | 2020-05-07 | International Business Machines Corporation | Saving and restoring machine state between multiple executions of an instruction |
CN111949107A (en) * | 2019-05-15 | 2020-11-17 | 北京小米移动软件有限公司 | Method and device for controlling electronic equipment comprising USB Type-C interface and electronic equipment |
CN112579500A (en) * | 2020-12-08 | 2021-03-30 | 深圳市道通科技股份有限公司 | Method and device for prompting anti-misplug USB interface and electronic equipment |
CN113030794A (en) * | 2021-03-02 | 2021-06-25 | Oppo广东移动通信有限公司 | Device detection method and device, computer readable medium and electronic device |
Also Published As
Publication number | Publication date |
---|---|
CN114116546B (en) | 2024-07-23 |
Similar Documents
Publication | Publication Date | Title |
---|---|---|
CN110829523B (en) | Electronic equipment and reverse charging method | |
CN112736599B (en) | Method and apparatus for providing an interface | |
US8762746B1 (en) | Power management in electronic devices | |
CN108228509B (en) | USB interface switching device and electronic equipment | |
US20150058642A1 (en) | Electronic device and method for controlling the same | |
CN111239617B (en) | Control method and device for charge and discharge test, storage medium and system | |
WO2017161750A1 (en) | Mobile apparatus | |
CN109298266B (en) | Test system, test method, test apparatus, and storage medium | |
KR101477056B1 (en) | Method and apparatus for checking device connecting with potable device | |
WO2016190573A1 (en) | Electronic device and power managing method thereof | |
CN105302750A (en) | Interface function configuration method and electronic equipment | |
US20240248125A1 (en) | Method for Detecting Impedance of Charging Cable, Electronic Device, and Power Supply Device | |
WO2017206161A1 (en) | Interface detection method and apparatus | |
CN104679543A (en) | Electronic device and operating method thereof | |
CN113030794B (en) | Device detection method and device, computer readable medium and electronic device | |
WO2015093731A1 (en) | Electronic device and operating method thereof | |
CN114116546B (en) | Equipment pull-out reporting method and device, computer readable medium and electronic equipment | |
WO2022166698A1 (en) | Charging control method and apparatus, electronic device, and charger | |
CN114299534A (en) | Method and device for detecting circuit schematic diagram, terminal equipment and storage medium | |
KR20190075280A (en) | Host controller, secure element and serial peripheral interface | |
CN110442539B (en) | Mobile phone OTG switching method and device | |
CN114069801A (en) | Quick charging connection circuit, quick charging connection device and charging control method | |
CN112214433B (en) | Terminal device, control method thereof, auxiliary device, and storage medium | |
CN109151160B (en) | Communication method, communication device, mobile terminal and storage medium | |
CN215934727U (en) | Circuit for controlling mode switching and terminal equipment |
Legal Events
Date | Code | Title | Description |
---|---|---|---|
PB01 | Publication | ||
PB01 | Publication | ||
SE01 | Entry into force of request for substantive examination | ||
SE01 | Entry into force of request for substantive examination | ||
GR01 | Patent grant | ||
GR01 | Patent grant |