File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -60,7 +60,7 @@ USBWakeUp_IRQHandler(void) {
60
60
// USBFS
61
61
#if CFG_TUD_WCH_USBIP_USBFS
62
62
63
- #if defined(CH32V10x) || defined(CH32V20x)
63
+ #if defined(CH32V10x) || defined(CH32V20x) || defined(CH32L10x)
64
64
65
65
#if defined(CH32V10x)
66
66
#define USBHDWakeUp_IRQHandler USBWakeUp_IRQHandler
@@ -115,6 +115,9 @@ void TinyUSB_Port_InitDevice(uint8_t rhport) {
115
115
EXTEN->EXTEN_CTR &= ~EXTEN_USB_5V_SEL;
116
116
117
117
#define RCC_AHBPeriph_OTG_FS RCC_AHBPeriph_USBHD
118
+ #elif defined(CH32L10x)
119
+ #define RCC_AHBPeriph_OTG_FS RCC_HBPeriph_USBFS
120
+ #define RCC_AHBPeriphClockCmd RCC_HBPeriphClockCmd
118
121
#endif
119
122
120
123
uint8_t usb_div;
@@ -162,10 +165,6 @@ void TinyUSB_Port_InitDevice(uint8_t rhport) {
162
165
#endif
163
166
164
167
#if CFG_TUD_WCH_USBIP_USBFS
165
- #if defined(CH32L10x)
166
- #define RCC_AHBPeriph_OTG_FS RCC_HBPeriph_USBFS
167
- #define RCC_AHBPeriphClockCmd RCC_HBPeriphClockCmd
168
- #endif
169
168
RCC_AHBPeriphClockCmd (RCC_AHBPeriph_OTG_FS, ENABLE);
170
169
#endif
171
170
#endif
You can’t perform that action at this time.
0 commit comments