summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorZhihong Chen <[email protected]>2024-02-23 16:21:17 +0800
committersakumisu <[email protected]>2024-02-23 16:55:58 +0800
commitb4e952b371f0cc6108e3c6bdc70c858c5b7e5fc1 (patch)
tree312196cb658dde2ef67f3ea03d836ace0c9b5df4
parent756987050fe1dd82eadebea3a8e890767252df36 (diff)
port: HPMicro: call suspend/connect/disconnect event
- call suspend/connect/disconnect event Signed-off-by: Zhihong Chen <[email protected]>
-rw-r--r--port/hpm/usb_dc_hpm.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/port/hpm/usb_dc_hpm.c b/port/hpm/usb_dc_hpm.c
index ae7fe055..43b91579 100644
--- a/port/hpm/usb_dc_hpm.c
+++ b/port/hpm/usb_dc_hpm.c
@@ -261,6 +261,7 @@ void USBD_IRQHandler(uint8_t busid)
if (int_status & intr_suspend) {
if (usb_device_get_suspend_status(handle)) {
+ usbd_event_suspend_handler(busid);
/* Note: Host may delay more than 3 ms before and/or after bus reset
* before doing enumeration. */
if (usb_device_get_address(handle)) {
@@ -270,9 +271,9 @@ void USBD_IRQHandler(uint8_t busid)
if (int_status & intr_port_change) {
if (!usb_device_get_port_ccs(handle)) {
+ usbd_event_disconnect_handler(busid);
} else {
- if (usb_device_get_port_reset_status(handle) == 0) {
- }
+ usbd_event_connect_handler(busid);
}
}