USB device monitoring method, device, equipment and storage medium
By registering monitoring events and callback functions in the application layer, monitoring the insertion, unplugging, detection and abnormal events of USB devices, it solves the problem that embedded systems cannot monitor USB devices in time, and realizes real-time monitoring and error handling of USB devices.
CN113934589BActive Publication Date: 2025-03-18GUANGZHOU ZHIYUAN ELECTRONICS CO LTD
2 Cites 0 Cited by
Patent Information
- Application Number
- CN202111033590.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2021-09-03
- Publication Date
- 2025-03-18
- Estimated Expiration
- 2041-09-03
AI Technical Summary
Technical Problem
Existing embedded systems cannot obtain USB device plug-in status changes, operating status and error information in time, and cannot effectively monitor and handle USB device hot-swap and operation errors.
Method used
Register monitoring events and corresponding callback functions in the application layer, monitor the insertion, unplug, detection and exception events of USB devices through the event matching module, call the corresponding callback function to notify the application layer and execute the handler.
Benefits of technology
Real-time monitoring of USB devices is realized, and timely responds to hot-swap and error handling of devices is promptly solved, solving the problem that embedded systems cannot monitor USB devices.
✦ Generated by Eureka AI based on patent content.
Abstract
The embodiment of the present invention discloses a USB device monitoring method, apparatus, device and storage medium. By registering a monitoring event and a callback function corresponding to the monitoring event in the application layer, a preset processing program is set in the callback function; the USB device is monitored according to the monitoring event, and it is determined whether there is a monitoring event matching the USB device. If so, the callback function corresponding to the monitoring event matching the USB device is called, so that the callback function notifies the application layer that the monitoring event is triggered, and the application layer executes the processing program in the callback function. The embodiment of the present invention monitors the USB device according to the monitoring event. When the USB device matches the monitoring event, the callback function of the monitoring event is called to notify the application layer, and the application layer executes the corresponding processing program on the USB device in time, thereby realizing the function of monitoring the USB device in the embedded system, and solving the technical problem that the current embedded system cannot monitor the USB device.
Need to check novelty before this filing date? Find Prior Art