diff options
| author | sakumisu <[email protected]> | 2025-02-01 14:42:29 +0800 |
|---|---|---|
| committer | sakumisu <[email protected]> | 2025-02-01 14:45:02 +0800 |
| commit | e592a548e95b6ad802d4cfed7355e93bd49c2167 (patch) | |
| tree | 0ec068d966cf861cba1c2883b524a51dd8ddf48a /osal | |
| parent | afc9213cd19a29048379ba3abd1846027f83671e (diff) | |
feat(core/usbd_core): add ep0 setup handler into thread feature
Diffstat (limited to 'osal')
| -rw-r--r-- | osal/idf/usb_config.h | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/osal/idf/usb_config.h b/osal/idf/usb_config.h index f2cf940a..02e90a71 100644 --- a/osal/idf/usb_config.h +++ b/osal/idf/usb_config.h @@ -20,7 +20,7 @@ /* Enable print with color */ #define CONFIG_USB_PRINTF_COLOR_ENABLE -/* data align size when use dma */ +/* data align size when use dma or use dcache */ #ifndef CONFIG_USB_ALIGN_SIZE #define CONFIG_USB_ALIGN_SIZE 4 #endif @@ -29,7 +29,6 @@ #define USB_NOCACHE_RAM_SECTION /* ================= USB Device Stack Configuration ================ */ -// NOTE: Below configurations are removed to Kconfig, `idf.py menuconfig` to config them /* Ep0 in and out transfer buffer */ #ifndef CONFIG_USBDEV_REQUEST_BUFFER_LEN @@ -50,6 +49,17 @@ /* Enable test mode */ // #define CONFIG_USBDEV_TEST_MODE +/* move ep0 setup handler from isr to thread */ +// #define CONFIG_USBDEV_EP0_THREAD + +#ifndef CONFIG_USBDEV_EP0_PRIO +#define CONFIG_USBDEV_EP0_PRIO 4 +#endif + +#ifndef CONFIG_USBDEV_EP0_STACKSIZE +#define CONFIG_USBDEV_EP0_STACKSIZE 2048 +#endif + #ifndef CONFIG_USBDEV_MSC_MAX_LUN #define CONFIG_USBDEV_MSC_MAX_LUN 1 #endif @@ -70,6 +80,10 @@ #define CONFIG_USBDEV_MSC_VERSION_STRING "0.01" #endif +/* move msc read & write from isr to while(1), you should call usbd_msc_polling in while(1) */ +// #define CONFIG_USBDEV_MSC_POLLING + +/* move msc read & write from isr to thread */ // #define CONFIG_USBDEV_MSC_THREAD #ifndef CONFIG_USBDEV_MSC_PRIO |
