fix warning and add speed errorout when precompile
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
#include "usbd_core.h"
|
||||
#include "usb_ch32_usbfs_reg.h"
|
||||
|
||||
#ifdef CONFIG_USB_HS
|
||||
#error "usb fs do not support hs"
|
||||
#endif
|
||||
|
||||
#ifndef USBD_IRQHandler
|
||||
#define USBD_IRQHandler OTG_FS_IRQHandler //use actual usb irq name instead
|
||||
#endif
|
||||
|
||||
@@ -69,7 +69,7 @@ int usb_dc_init(void)
|
||||
USBHS_DEVICE->HOST_CTRL = USBHS_PHY_SUSPENDM;
|
||||
|
||||
USBHS_DEVICE->CONTROL = 0;
|
||||
#if CONFIG_USB_HS
|
||||
#ifdef CONFIG_USB_HS
|
||||
USBHS_DEVICE->CONTROL = USBHS_DMA_EN | USBHS_INT_BUSY_EN | USBHS_HIGH_SPEED;
|
||||
#else
|
||||
USBHS_DEVICE->CONTROL = USBHS_DMA_EN | USBHS_INT_BUSY_EN | USBHS_FULL_SPEED;
|
||||
|
||||
Reference in New Issue
Block a user