Method, device and electronic device for detecting disconnection of USB device

An electronic device and device technology, applied in the computer field, can solve problems such as inability to detect USB device disconnection, out-of-sync status of the underlying software and upper-layer software, and chaotic rearview mirror device mode.

Inactive Publication Date: 2019-03-05
BEIJING SPREADTRUM HI TECH COMM TECH CO LTD
View PDF6 Cites 0 Cited by
  • Summary
  • Abstract
  • Description
  • Claims
  • Application Information

AI Technical Summary

Problems solved by technology

For example, in the process of developing a smart rearview mirror device, the hardware design keeps the USB device in a state of constant power supply, so that the inversion level usually used to detect the insertion and removal of the USB device is gone, and hardware interrupts cannot be generated, resulting in The state of the underlying software and the upper-level software are not synchronized, and the device (device) mode and host (host) mode of the rearview mirror device are confused.
That is, in the absence of level inversion, the disconnection of the USB device cannot be detected

Method used

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
View more

Image

Smart Image Click on the blue labels to locate them in the text.
Viewing Examples
Smart Image
  • Method, device and electronic device for detecting disconnection of USB device
  • Method, device and electronic device for detecting disconnection of USB device
  • Method, device and electronic device for detecting disconnection of USB device

Examples

Experimental program
Comparison scheme
Effect test

Embodiment Construction

[0027] In order to make the purpose, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below in conjunction with the drawings in the embodiments of the present invention. Obviously, the described embodiments It is only some embodiments of the present invention, but not all embodiments. Based on the embodiments of the present invention, all other embodiments obtained by persons of ordinary skill in the art without making creative efforts belong to the protection scope of the present invention.

[0028] An embodiment of the present invention provides a method for detecting disconnection of a USB device, such as figure 1 As shown, the method includes:

[0029] S11. After connecting with the USB device, acquire the frame number of each frame unit transmitted between the USB device.

[0030] Wherein, the frame unit may be a frame with ...

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

PUM

No PUM Login to view more

Abstract

The invention provides a method, a device and an electronic device for detecting the disconnection of a USB device. The method comprises the following steps: after connecting with a USB device, acquiring a frame number of each frame unit transmitted with the USB device; comparing the frame number of the current frame unit with the frame number of the previous frame unit; if the frame number of thecurrent frame unit is the same as the frame number of the previous frame unit, it is determined that the USB device is disconnected. The invention can detect the disconnection of the USB device in time when the hardware interrupt signal cannot be detected.

Description

technical field [0001] The invention relates to the technical field of computers, in particular to a method, device and electronic equipment for detecting disconnection of a USB device. Background technique [0002] USB (Universal Serial Bus, Universal Serial Bus) devices are a type of hot-swappable devices. Usually, the insertion and removal of such devices is interrupted by inversion of the hardware level. Electronic devices detect the disconnection of USB devices. When it is turned on, the CPU of the electronic device detects the interrupt and distributes the interrupt, and then the specific software implements the specific functions of this type of device. [0003] However, in the application of actual products, some hardware designs will not generate interrupts. For example, in the process of developing a smart rearview mirror device, the hardware design keeps the USB device in a state of constant power supply, so that the inversion level usually used to detect the ins...

Claims

the structure of the environmentally friendly knitted fabric provided by the present invention; figure 2 Flow chart of the yarn wrapping machine for environmentally friendly knitted fabrics and storage devices; image 3 Is the parameter map of the yarn covering machine
Login to view more

Application Information

Patent Timeline
no application Login to view more
Patent Type & Authority Applications(China)
IPC IPC(8): G06F13/40
CPCG06F13/4081G06F2213/0042
Inventor 张田园
Owner BEIJING SPREADTRUM HI TECH COMM TECH CO LTD
Who we serve
  • R&D Engineer
  • R&D Manager
  • IP Professional
Why Eureka
  • Industry Leading Data Capabilities
  • Powerful AI technology
  • Patent DNA Extraction
Social media
Try Eureka
PatSnap group products