mirror of
https://github.com/hathach/tinyusb.git
synced 2025-10-29 19:49:07 +00:00
Merge pull request #3319 from peppapighs/dwc2-usbsuspm
dcd/dwc2: fix suspend interrupt indefinitely disabled on AT32F405
This commit is contained in:
commit
a6efc7d722
@ -1054,6 +1054,8 @@ void dcd_int_handler(uint8_t rhport) {
|
||||
if (gintsts & GINTSTS_ENUMDNE) {
|
||||
// ENUMDNE is the end of reset where speed of the link is detected
|
||||
dwc2->gintsts = GINTSTS_ENUMDNE;
|
||||
// There may be a pending suspend event, so we clear it first
|
||||
dwc2->gintsts = GINTSTS_USBSUSP;
|
||||
dwc2->gintmsk |= GINTMSK_USBSUSPM;
|
||||
handle_enum_done(rhport);
|
||||
}
|
||||
|
||||
@ -84,7 +84,8 @@
|
||||
}
|
||||
}
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_enable(uint8_t rhport) { NVIC_EnableIRQ(_dwc2_controller[rhport].irqnum);
|
||||
TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_enable(uint8_t rhport) {
|
||||
NVIC_EnableIRQ(_dwc2_controller[rhport].irqnum);
|
||||
}
|
||||
|
||||
TU_ATTR_ALWAYS_INLINE static inline void dwc2_dcd_int_disable(uint8_t rhport) {
|
||||
@ -118,4 +119,4 @@
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* DWC2_GD32_H_ */
|
||||
#endif /* DWC2_AT32_H_ */
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user