diff --git a/demo/es32/usb_device/ES32F369x/Inc/usb_config.h b/demo/es32/usb_device/ES32F369x/Inc/usb_config.h index 59dd164b..39c77df6 100644 --- a/demo/es32/usb_device/ES32F369x/Inc/usb_config.h +++ b/demo/es32/usb_device/ES32F369x/Inc/usb_config.h @@ -1,6 +1,17 @@ #ifndef _USB_CONFIG_H #define _USB_CONFIG_H +/* USB common Configuration */ +#ifndef CONFIG_USB_DBG_LEVEL +#define CONFIG_USB_DBG_LEVEL USB_DBG_INFO +#endif + +#ifndef CONFIG_USB_PRINTF +#define CONFIG_USB_PRINTF printf +#endif + +#define CONFIG_USB_PRINTF_COLOR_ENABLE + /* USB DEVICE Configuration */ /* core */ #ifndef CONFIG_USBDEV_REQUEST_BUFFER_LEN @@ -15,6 +26,9 @@ #define CONFIG_USBDEV_TEST_MODE 0 #endif +/* cdc class */ +// #define CONFIG_USBDEV_CDC_ACM_UART + /* msc class */ #ifndef CONFIG_USBDEV_MSC_MANUFACTURER_STRING #define CONFIG_USBDEV_MSC_MANUFACTURER_STRING "" @@ -28,6 +42,18 @@ #define CONFIG_USBDEV_MSC_VERSION_STRING "0.01" #endif +// #define CONFIG_USBDEV_MSC_THREAD + +#ifdef CONFIG_USBDEV_MSC_THREAD +#ifndef CONFIG_USBDEV_MSC_STACKSIZE +#define CONFIG_USBDEV_MSC_STACKSIZE 2048 +#endif + +#ifndef CONFIG_USBDEV_MSC_PRIO +#define CONFIG_USBDEV_MSC_PRIO 4 +#endif +#endif + /* audio class */ #ifndef CONFIG_USBDEV_AUDIO_VERSION #define CONFIG_USBDEV_AUDIO_VERSION 0x0100 diff --git a/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvoptx b/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvoptx index 39376be1..036e76d6 100644 --- a/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvoptx +++ b/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvoptx @@ -125,7 +125,7 @@ 0 CMSIS_AGDI - -X"essemi CMSIS-DAP" -U0001A000000A -O495 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0es32f36xx.FLM -FS00 -FL080000 -FP0($$Device:ES32F3696LT$Flash\es32f36xx.FLM) + -X"essemi CMSIS-DAP" -U0001A000000A -O367 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0es32f36xx.FLM -FS00 -FL080000 -FP0($$Device:ES32F3696LT$Flash\es32f36xx.FLM) 0 @@ -163,40 +163,7 @@ -T0 - - - 0 - 0 - 319 - 1 -
0
- 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\..\..\port\musb\usb_dc_musb.c - - -
- - 1 - 0 - 320 - 1 -
0
- 0 - 0 - 0 - 0 - 0 - 0 - ..\..\..\..\..\port\musb\usb_dc_musb.c - - -
-
+ 1 @@ -355,18 +322,6 @@ 0 0 0 - ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_iap.c - ald_iap.c - 0 - 0 - - - 2 - 7 - 1 - 0 - 0 - 0 ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_pmu.c ald_pmu.c 0 @@ -374,7 +329,7 @@ 2 - 8 + 7 1 0 0 @@ -386,7 +341,7 @@ 2 - 9 + 8 1 0 0 @@ -398,19 +353,19 @@ 2 - 10 + 9 1 0 0 0 - ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_usb.c - ald_usb.c + ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_iap.c + ald_iap.c 0 0 2 - 11 + 10 1 0 0 @@ -430,7 +385,7 @@ 0 3 - 12 + 11 1 0 0 @@ -442,7 +397,7 @@ 3 - 13 + 12 1 0 0 @@ -454,7 +409,7 @@ 3 - 14 + 13 1 0 0 @@ -474,7 +429,7 @@ 0 4 - 15 + 14 1 0 0 @@ -486,7 +441,7 @@ 4 - 16 + 15 1 0 0 @@ -498,7 +453,7 @@ 4 - 17 + 16 1 0 0 diff --git a/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvprojx b/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvprojx index 2697826d..855a6e75 100644 --- a/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvprojx +++ b/demo/es32/usb_device/ES32F369x/MDK-ARM/example.uvprojx @@ -338,9 +338,9 @@ 0 - USE_ASSERT,ES32F36xx,USBD_CDC_HS + ES32F36xx - ..\..\..\Drivers\CMSIS\Include;..\..\..\Drivers\CMSIS\Device\EastSoft\ES32F36xx\Include;..\..\..\Drivers\ALD\ES32F36xx\Include;..\Inc;..\..\..\..\..\common;..\..\..\..\..\core;..\..\..\..\..\class\cdc + ..\..\..\Drivers\CMSIS\Include;..\..\..\Drivers\CMSIS\Device\EastSoft\ES32F36xx\Include;..\..\..\Drivers\ALD\ES32F36xx\Include;..\Inc;..\..\..\..\..\common;..\..\..\..\..\core;..\..\..\..\..\class\cdc;..\..\..\..\..\class\video;..\..\..\..\..\demo @@ -414,11 +414,6 @@ 1 ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_gpio.c - - ald_iap.c - 1 - ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_iap.c - ald_pmu.c 1 @@ -435,9 +430,9 @@ ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_uart.c - ald_usb.c + ald_iap.c 1 - ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_usb.c + ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_iap.c utils.c diff --git a/demo/es32/usb_host/ES32F369x/Inc/usb_config.h b/demo/es32/usb_host/ES32F369x/Inc/usb_config.h index 86c786cc..39c77df6 100644 --- a/demo/es32/usb_host/ES32F369x/Inc/usb_config.h +++ b/demo/es32/usb_host/ES32F369x/Inc/usb_config.h @@ -1,7 +1,67 @@ #ifndef _USB_CONFIG_H #define _USB_CONFIG_H +/* USB common Configuration */ +#ifndef CONFIG_USB_DBG_LEVEL +#define CONFIG_USB_DBG_LEVEL USB_DBG_INFO +#endif + +#ifndef CONFIG_USB_PRINTF +#define CONFIG_USB_PRINTF printf +#endif + +#define CONFIG_USB_PRINTF_COLOR_ENABLE + /* USB DEVICE Configuration */ +/* core */ +#ifndef CONFIG_USBDEV_REQUEST_BUFFER_LEN +#define CONFIG_USBDEV_REQUEST_BUFFER_LEN 256 +#endif + +#ifndef CONFIG_USBDEV_DESC_CHECK +#define CONFIG_USBDEV_DESC_CHECK 0 +#endif + +#ifndef CONFIG_USBDEV_TEST_MODE +#define CONFIG_USBDEV_TEST_MODE 0 +#endif + +/* cdc class */ +// #define CONFIG_USBDEV_CDC_ACM_UART + +/* msc class */ +#ifndef CONFIG_USBDEV_MSC_MANUFACTURER_STRING +#define CONFIG_USBDEV_MSC_MANUFACTURER_STRING "" +#endif + +#ifndef CONFIG_USBDEV_MSC_PRODUCT_STRING +#define CONFIG_USBDEV_MSC_PRODUCT_STRING "" +#endif + +#ifndef CONFIG_USBDEV_MSC_VERSION_STRING +#define CONFIG_USBDEV_MSC_VERSION_STRING "0.01" +#endif + +// #define CONFIG_USBDEV_MSC_THREAD + +#ifdef CONFIG_USBDEV_MSC_THREAD +#ifndef CONFIG_USBDEV_MSC_STACKSIZE +#define CONFIG_USBDEV_MSC_STACKSIZE 2048 +#endif + +#ifndef CONFIG_USBDEV_MSC_PRIO +#define CONFIG_USBDEV_MSC_PRIO 4 +#endif +#endif + +/* audio class */ +#ifndef CONFIG_USBDEV_AUDIO_VERSION +#define CONFIG_USBDEV_AUDIO_VERSION 0x0100 +#endif + +#ifndef CONFIG_USBDEV_AUDIO_MAX_CHANNEL +#define CONFIG_USBDEV_AUDIO_MAX_CHANNEL 2 +#endif /* USB HOST Configuration */ #ifndef CONFIG_USBHOST_RHPORTS @@ -69,4 +129,4 @@ #define CONFIG_USB_ECHI_HCOR_RESERVED_DISABLE // #define CONFIG_USB_EHCI_CONFIGFLAG -#endif \ No newline at end of file +#endif diff --git a/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvoptx b/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvoptx index ce16373c..078e74ae 100644 --- a/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvoptx +++ b/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvoptx @@ -125,7 +125,7 @@ 0 CMSIS_AGDI - -X"essemi CMSIS-DAP" -U0001A000000A -O495 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0es32f36xx.FLM -FS00 -FL080000 -FP0($$Device:ES32F3696LT$Flash\es32f36xx.FLM) + -X"essemi CMSIS-DAP" -U0001A000000A -O367 -S0 -C0 -P00000000 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO65554 -TC10000000 -TT10000000 -TP20 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0es32f36xx.FLM -FS00 -FL080000 -FP0($$Device:ES32F3696LT$Flash\es32f36xx.FLM) 0 @@ -387,18 +387,6 @@ 0 0 0 - ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_usb.c - ald_usb.c - 0 - 0 - - - 2 - 11 - 1 - 0 - 0 - 0 ..\..\..\Drivers\ALD\ES32F36xx\Source\utils.c utils.c 0 @@ -414,7 +402,7 @@ 0 3 - 12 + 11 1 0 0 @@ -426,7 +414,7 @@ 3 - 13 + 12 1 0 0 @@ -438,7 +426,7 @@ 3 - 14 + 13 1 0 0 @@ -458,7 +446,7 @@ 0 4 - 15 + 14 1 0 0 @@ -470,7 +458,7 @@ 4 - 16 + 15 1 0 0 @@ -482,7 +470,7 @@ 4 - 17 + 16 1 0 0 @@ -494,7 +482,7 @@ 4 - 18 + 17 1 0 0 @@ -506,7 +494,7 @@ 4 - 19 + 18 1 0 0 @@ -518,7 +506,7 @@ 4 - 20 + 19 1 0 0 @@ -530,7 +518,7 @@ 4 - 21 + 20 1 0 0 @@ -542,7 +530,7 @@ 4 - 22 + 21 1 0 0 @@ -554,7 +542,7 @@ 4 - 23 + 22 1 0 0 @@ -574,7 +562,7 @@ 0 5 - 24 + 23 1 0 0 @@ -586,7 +574,7 @@ 5 - 25 + 24 1 0 0 @@ -598,7 +586,7 @@ 5 - 26 + 25 1 0 0 @@ -610,7 +598,7 @@ 5 - 27 + 26 1 0 0 @@ -622,7 +610,7 @@ 5 - 28 + 27 1 0 0 @@ -634,7 +622,7 @@ 5 - 29 + 28 1 0 0 @@ -646,7 +634,7 @@ 5 - 30 + 29 1 0 0 @@ -658,7 +646,7 @@ 5 - 31 + 30 1 0 0 diff --git a/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvprojx b/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvprojx index 66e15565..a27aadde 100644 --- a/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvprojx +++ b/demo/es32/usb_host/ES32F369x/MDK-ARM/example.uvprojx @@ -338,7 +338,7 @@ 0 - USE_ASSERT,ES32F36xx, + ES32F36xx, ..\..\..\Drivers\CMSIS\Include;..\..\..\Drivers\CMSIS\Device\EastSoft\ES32F36xx\Include;..\..\..\Drivers\ALD\ES32F36xx\Include;..\Inc;..\..\..\..\..\common;..\..\..\..\..\core;..\..\..\..\..\class\cdc;..\..\..\..\..\class\hid;..\..\..\..\..\class\msc;..\..\..\..\..\class\hub;..\..\..\..\..\class\wireless;..\..\..\..\..\osal;..\..\..\..\..\third_party\FreeRTOS-10.4\include;..\..\..\..\..\third_party\FreeRTOS-10.4\portable\GCC\ARM_CM3 @@ -434,11 +434,6 @@ 1 ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_uart.c - - ald_usb.c - 1 - ..\..\..\Drivers\ALD\ES32F36xx\Source\ald_usb.c - utils.c 1