From c60242b098c88d61372e1093702c250bbb89903a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?ECN=E9=82=B1=E9=B5=AC=E5=81=89?= Date: Wed, 8 Jan 2025 15:26:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=AD=A3=E6=A0=BC=E5=BC=8F=E4=BB=A5?= =?UTF-8?q?=E5=8F=8A=E7=BC=96=E8=AF=91=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- bsp/ht32/ht32f12366/board/Kconfig | 12 +- bsp/ht32/ht32f12366/project.uvoptx | 128 ++--- bsp/ht32/ht32f12366/project.uvprojx | 182 +++---- bsp/ht32/ht32f12366/rtconfig.py | 2 +- bsp/ht32/ht32f52352/board/Kconfig | 10 +- bsp/ht32/ht32f52352/project.uvoptx | 118 ++--- bsp/ht32/ht32f52352/project.uvprojx | 118 ++--- bsp/ht32/ht32f52352/rtconfig.py | 2 +- .../.ci/attachconfig/ci.attachconfig.yml | 18 + bsp/ht32/ht32f53252/applications/test.c | 2 +- bsp/ht32/ht32f53252/board/Kconfig | 10 +- bsp/ht32/ht32f53252/project.uvoptx | 120 ++--- bsp/ht32/ht32f53252/project.uvprojx | 116 ++--- bsp/ht32/ht32f53252/rtconfig.py | 2 +- .../usbd_library/example/ht32_usbd_class.c | 426 ---------------- .../usbd_library/example/ht32_usbd_class.h | 87 ---- .../example/ht32_usbd_descriptor.c | 368 -------------- .../example/ht32_usbd_descriptor.h | 59 --- .../example/ht32fxxxxx_usbdconf.h | 453 ------------------ 19 files changed, 429 insertions(+), 1804 deletions(-) create mode 100644 bsp/ht32/ht32f53252/.ci/attachconfig/ci.attachconfig.yml delete mode 100644 bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.c delete mode 100644 bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.h delete mode 100644 bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.c delete mode 100644 bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.h delete mode 100644 bsp/ht32/libraries/usbd_library/example/ht32fxxxxx_usbdconf.h diff --git a/bsp/ht32/ht32f12366/board/Kconfig b/bsp/ht32/ht32f12366/board/Kconfig index b758ac7502c..ab2b3193534 100644 --- a/bsp/ht32/ht32f12366/board/Kconfig +++ b/bsp/ht32/ht32f12366/board/Kconfig @@ -111,7 +111,7 @@ menu "Onboard Peripheral Drivers" if RT_USING_CONSOLE config RT_CONSOLE_DEVICE_NAME string "the device name for console" - default "usart1" + default "usart0" endif endmenu @@ -130,7 +130,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_UART config BSP_USING_USART0 bool "Enable USART0" - default n + default y config BSP_USING_USART0_NAME depends on BSP_USING_USART0 string "usart0 bus name" @@ -168,7 +168,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_SPI config BSP_USING_SPI0 bool "Enable SPI0 Bus" - default n + default y config BSP_USING_SPI0_NAME depends on BSP_USING_SPI0 string "spi0 bus name" @@ -189,12 +189,12 @@ menu "On-chip Peripheral Drivers" if BSP_USING_I2C menuconfig BSP_USING_I2C_HW bool "Enable I2C Bus(hardware)" - default n + default y select RT_USING_I2C if BSP_USING_I2C_HW if BSP_USING_I2C_HW config BSP_USING_I2C0_HW bool "Enable Hardware I2C0 Bus" - default n + default y config BSP_USING_I2C0_HW_NAME depends on BSP_USING_I2C0_HW string "hardware i2c0 name" @@ -282,7 +282,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_ADC config BSP_USING_ADC0 bool "Enable ADC0" - default n + default y config BSP_USING_ADC0_NAME depends on BSP_USING_ADC0 string "adc0 device name" diff --git a/bsp/ht32/ht32f12366/project.uvoptx b/bsp/ht32/ht32f12366/project.uvoptx index 7c85a71b4fd..2fa4862d7fa 100644 --- a/bsp/ht32/ht32f12366/project.uvoptx +++ b/bsp/ht32/ht32f12366/project.uvoptx @@ -573,8 +573,8 @@ 0 0 0 - ..\..\..\components\finsh\msh_parse.c - msh_parse.c + ..\..\..\components\finsh\shell.c + shell.c 0 0 @@ -585,8 +585,8 @@ 0 0 0 - ..\..\..\components\finsh\shell.c - shell.c + ..\..\..\components\finsh\msh_parse.c + msh_parse.c 0 0 @@ -805,8 +805,8 @@ 0 0 0 - ..\..\..\src\klibc\rt_vsnprintf_tiny.c - rt_vsnprintf_tiny.c + ..\..\..\src\klibc\kstdio.c + kstdio.c 0 0 @@ -817,8 +817,8 @@ 0 0 0 - ..\..\..\src\klibc\kerrno.c - kerrno.c + ..\..\..\src\klibc\rt_vsnprintf_tiny.c + rt_vsnprintf_tiny.c 0 0 @@ -841,8 +841,8 @@ 0 0 0 - ..\..\..\src\klibc\kstdio.c - kstdio.c + ..\..\..\src\klibc\kerrno.c + kerrno.c 0 0 @@ -929,8 +929,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ckcu.c - ht32f1xxxx_ckcu.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_bftm.c + ht32f1xxxx_bftm.c 0 0 @@ -941,8 +941,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usart.c - ht32f1xxxx_usart.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_gpio.c + ht32f1xxxx_gpio.c 0 0 @@ -953,8 +953,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_tm.c - ht32f1xxxx_tm.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usart.c + ht32f1xxxx_usart.c 0 0 @@ -965,8 +965,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_exti.c - ht32f1xxxx_exti.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ebi.c + ht32f1xxxx_ebi.c 0 0 @@ -977,8 +977,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_spi.c - ht32f1xxxx_spi.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_cmp.c + ht32f1xxxx_cmp.c 0 0 @@ -989,8 +989,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32_cm3_misc.c - ht32_cm3_misc.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_exti.c + ht32f1xxxx_exti.c 0 0 @@ -1001,8 +1001,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usbd.c - ht32f1xxxx_usbd.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_mctm.c + ht32f1xxxx_mctm.c 0 0 @@ -1013,8 +1013,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_wdt.c - ht32f1xxxx_wdt.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f2xxxx_csif.c + ht32f2xxxx_csif.c 0 0 @@ -1025,8 +1025,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rtc.c - ht32f1xxxx_rtc.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_sdio.c + ht32f1xxxx_sdio.c 0 0 @@ -1037,8 +1037,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2c.c - ht32f1xxxx_i2c.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pwrcu.c + ht32f1xxxx_pwrcu.c 0 0 @@ -1049,8 +1049,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f2xxxx_csif.c - ht32f2xxxx_csif.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rstcu.c + ht32f1xxxx_rstcu.c 0 0 @@ -1061,8 +1061,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_sdio.c - ht32f1xxxx_sdio.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pdma.c + ht32f1xxxx_pdma.c 0 0 @@ -1073,8 +1073,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pwrcu.c - ht32f1xxxx_pwrcu.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rtc.c + ht32f1xxxx_rtc.c 0 0 @@ -1085,8 +1085,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_aes.c - ht32f1xxxx_aes.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_sci.c + ht32f1xxxx_sci.c 0 0 @@ -1097,8 +1097,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_flash.c - ht32f1xxxx_flash.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\Device\Holtek\HT32F1xxxx\Source\system_ht32f1xxxx_02.c + system_ht32f1xxxx_02.c 0 0 @@ -1109,8 +1109,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_sci.c - ht32f1xxxx_sci.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usbd.c + ht32f1xxxx_usbd.c 0 0 @@ -1121,8 +1121,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ebi.c - ht32f1xxxx_ebi.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2s.c + ht32f1xxxx_i2s.c 0 0 @@ -1133,8 +1133,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\Device\Holtek\HT32F1xxxx\Source\system_ht32f1xxxx_02.c - system_ht32f1xxxx_02.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_aes.c + ht32f1xxxx_aes.c 0 0 @@ -1145,8 +1145,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_cmp.c - ht32f1xxxx_cmp.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_crc.c + ht32f1xxxx_crc.c 0 0 @@ -1157,8 +1157,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_bftm.c - ht32f1xxxx_bftm.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_tm.c + ht32f1xxxx_tm.c 0 0 @@ -1169,8 +1169,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_crc.c - ht32f1xxxx_crc.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_flash.c + ht32f1xxxx_flash.c 0 0 @@ -1181,8 +1181,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_mctm.c - ht32f1xxxx_mctm.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_spi.c + ht32f1xxxx_spi.c 0 0 @@ -1193,8 +1193,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2s.c - ht32f1xxxx_i2s.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2c.c + ht32f1xxxx_i2c.c 0 0 @@ -1205,8 +1205,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rstcu.c - ht32f1xxxx_rstcu.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_adc.c + ht32f1xxxx_adc.c 0 0 @@ -1217,8 +1217,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_adc.c - ht32f1xxxx_adc.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ckcu.c + ht32f1xxxx_ckcu.c 0 0 @@ -1229,8 +1229,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_gpio.c - ht32f1xxxx_gpio.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_wdt.c + ht32f1xxxx_wdt.c 0 0 @@ -1241,8 +1241,8 @@ 0 0 0 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pdma.c - ht32f1xxxx_pdma.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32_cm3_misc.c + ht32_cm3_misc.c 0 0 diff --git a/bsp/ht32/ht32f12366/project.uvprojx b/bsp/ht32/ht32f12366/project.uvprojx index 83667aa646a..e75d39643ba 100644 --- a/bsp/ht32/ht32f12366/project.uvprojx +++ b/bsp/ht32/ht32f12366/project.uvprojx @@ -333,9 +333,9 @@ 0 --gnu - RT_USING_ARMLIBC, __RTTHREAD__, RT_USING_LIBC, USE_HT32F12366_SK, USE_HT32F12365_66, USE_MEM_HT32F12366, __STDC_LIMIT_MACROS, USE_HT32_DRIVER, __CLK_TCK=RT_TICK_PER_SECOND + __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND, USE_HT32_DRIVER, RT_USING_LIBC, __RTTHREAD__, USE_HT32F12366_SK, USE_HT32F12365_66, USE_MEM_HT32F12366, RT_USING_ARMLIBC - ..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\epoll;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\inc;..\libraries\HT32_STD_1xxxx_FWLib\library\CMSIS\Include;..\..\..\components\drivers\smp_call;..\..\..\include;board\inc;..\..\..\libcpu\arm\common;..\..\..\components\drivers\phy;..\..\..\components\libc\posix\ipc;..\..\..\components\drivers\include;..\libraries\ht32_drivers;applications;..\..\..\libcpu\arm\cortex-m3;.;..\..\..\components\libc\posix\io\poll;..\..\..\components\finsh;..\..\..\components\libc\compilers\common\extension;..\libraries\HT32_STD_1xxxx_FWLib\library\Device\Holtek\HT32F1xxxx\Include;..\..\..\components\libc\compilers\common\include;..\libraries\usbd_library\inc;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\drivers\include;..\..\..\components\drivers\include + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\inc;..\libraries\usbd_library\inc;..\..\..\components\drivers\include;applications;..\..\..\components\drivers\smp_call;..\libraries\ht32_drivers;..\..\..\libcpu\arm\common;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\phy;..\..\..\components\libc\posix\ipc;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\libc\posix\io\epoll;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension;board\inc;..\libraries\HT32_STD_1xxxx_FWLib\library\CMSIS\Include;..\..\..\components\libc\posix\io\poll;..\..\..\include;..\..\..\components\drivers\include;..\..\..\libcpu\arm\cortex-m3;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\components\finsh;..\libraries\HT32_STD_1xxxx_FWLib\library\Device\Holtek\HT32F1xxxx\Include;..\..\..\components\drivers\include;.;..\..\..\components\drivers\include @@ -488,7 +488,7 @@ __RT_IPC_SOURCE__ - + @@ -543,7 +543,7 @@ __RT_IPC_SOURCE__ - + @@ -598,7 +598,7 @@ __RT_IPC_SOURCE__ - + @@ -653,7 +653,7 @@ __RT_IPC_SOURCE__ - + @@ -708,7 +708,7 @@ __RT_IPC_SOURCE__ - + @@ -763,7 +763,7 @@ __RT_IPC_SOURCE__ - + @@ -818,7 +818,7 @@ __RT_IPC_SOURCE__ - + @@ -873,7 +873,7 @@ __RT_IPC_SOURCE__ - + @@ -928,7 +928,7 @@ __RT_IPC_SOURCE__ - + @@ -983,7 +983,7 @@ __RT_IPC_SOURCE__ - + @@ -1038,7 +1038,7 @@ __RT_IPC_SOURCE__ - + @@ -1093,7 +1093,7 @@ __RT_IPC_SOURCE__ - + @@ -1150,14 +1150,14 @@ ..\..\..\components\finsh\cmd.c - msh_parse.c + shell.c 1 - ..\..\..\components\finsh\msh_parse.c + ..\..\..\components\finsh\shell.c - shell.c + msh_parse.c 1 - ..\..\..\components\finsh\shell.c + ..\..\..\components\finsh\msh_parse.c @@ -1213,7 +1213,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1268,7 +1268,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1323,7 +1323,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1378,7 +1378,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1433,7 +1433,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1488,7 +1488,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1543,7 +1543,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1598,7 +1598,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1653,7 +1653,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1708,7 +1708,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1763,7 +1763,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1818,7 +1818,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1873,7 +1873,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1928,7 +1928,7 @@ __RT_KERNEL_SOURCE__ - + @@ -1983,7 +1983,7 @@ __RT_KERNEL_SOURCE__ - + @@ -2038,7 +2038,7 @@ __RT_KERNEL_SOURCE__ - + @@ -2050,14 +2050,14 @@ klibc - rt_vsnprintf_tiny.c + kstdio.c 1 - ..\..\..\src\klibc\rt_vsnprintf_tiny.c + ..\..\..\src\klibc\kstdio.c - kerrno.c + rt_vsnprintf_tiny.c 1 - ..\..\..\src\klibc\kerrno.c + ..\..\..\src\klibc\rt_vsnprintf_tiny.c kstring.c @@ -2065,9 +2065,9 @@ ..\..\..\src\klibc\kstring.c - kstdio.c + kerrno.c 1 - ..\..\..\src\klibc\kstdio.c + ..\..\..\src\klibc\kerrno.c @@ -2105,54 +2105,39 @@ Libraries - ht32f1xxxx_ckcu.c - 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ckcu.c - - - ht32f1xxxx_usart.c - 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usart.c - - - ht32f1xxxx_tm.c - 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_tm.c - - - ht32f1xxxx_exti.c + ht32f1xxxx_bftm.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_exti.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_bftm.c - ht32f1xxxx_spi.c + ht32f1xxxx_gpio.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_spi.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_gpio.c - ht32_cm3_misc.c + ht32f1xxxx_usart.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32_cm3_misc.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usart.c - ht32f1xxxx_usbd.c + ht32f1xxxx_ebi.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usbd.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ebi.c - ht32f1xxxx_wdt.c + ht32f1xxxx_cmp.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_wdt.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_cmp.c - ht32f1xxxx_rtc.c + ht32f1xxxx_exti.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rtc.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_exti.c - ht32f1xxxx_i2c.c + ht32f1xxxx_mctm.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2c.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_mctm.c ht32f2xxxx_csif.c @@ -2170,24 +2155,24 @@ ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pwrcu.c - ht32f1xxxx_aes.c + ht32f1xxxx_rstcu.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_aes.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rstcu.c - ht32f1xxxx_flash.c + ht32f1xxxx_pdma.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_flash.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pdma.c - ht32f1xxxx_sci.c + ht32f1xxxx_rtc.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_sci.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rtc.c - ht32f1xxxx_ebi.c + ht32f1xxxx_sci.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ebi.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_sci.c system_ht32f1xxxx_02.c @@ -2195,14 +2180,19 @@ ..\libraries\HT32_STD_1xxxx_FWLib\library\Device\Holtek\HT32F1xxxx\Source\system_ht32f1xxxx_02.c - ht32f1xxxx_cmp.c + ht32f1xxxx_usbd.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_cmp.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_usbd.c - ht32f1xxxx_bftm.c + ht32f1xxxx_i2s.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_bftm.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2s.c + + + ht32f1xxxx_aes.c + 1 + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_aes.c ht32f1xxxx_crc.c @@ -2210,19 +2200,24 @@ ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_crc.c - ht32f1xxxx_mctm.c + ht32f1xxxx_tm.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_mctm.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_tm.c - ht32f1xxxx_i2s.c + ht32f1xxxx_flash.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2s.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_flash.c - ht32f1xxxx_rstcu.c + ht32f1xxxx_spi.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_rstcu.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_spi.c + + + ht32f1xxxx_i2c.c + 1 + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_i2c.c ht32f1xxxx_adc.c @@ -2230,14 +2225,19 @@ ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_adc.c - ht32f1xxxx_gpio.c + ht32f1xxxx_ckcu.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_gpio.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_ckcu.c - ht32f1xxxx_pdma.c + ht32f1xxxx_wdt.c 1 - ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_pdma.c + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32f1xxxx_wdt.c + + + ht32_cm3_misc.c + 1 + ..\libraries\HT32_STD_1xxxx_FWLib\library\HT32F1xxxx_Driver\src\ht32_cm3_misc.c diff --git a/bsp/ht32/ht32f12366/rtconfig.py b/bsp/ht32/ht32f12366/rtconfig.py index 1c3077b6cf4..33ae6cc4fa9 100644 --- a/bsp/ht32/ht32f12366/rtconfig.py +++ b/bsp/ht32/ht32f12366/rtconfig.py @@ -48,7 +48,7 @@ CFLAGS = DEVICE + ' -Dgcc' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds' - + CFLAGS += ' -D USE_HT32F12365_66' CPATH = '' LPATH = '' diff --git a/bsp/ht32/ht32f52352/board/Kconfig b/bsp/ht32/ht32f52352/board/Kconfig index 8ba20cd72d2..f77f0663f69 100644 --- a/bsp/ht32/ht32f52352/board/Kconfig +++ b/bsp/ht32/ht32f52352/board/Kconfig @@ -138,7 +138,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_USART1 bool "Enable USART1" - default n + default y config BSP_USING_USART1_NAME depends on BSP_USING_USART1 string "usart1 bus name" @@ -168,7 +168,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_SPI config BSP_USING_SPI0 bool "Enable SPI0 Bus" - default n + default y config BSP_USING_SPI0_NAME depends on BSP_USING_SPI0 string "spi0 bus name" @@ -189,12 +189,12 @@ menu "On-chip Peripheral Drivers" if BSP_USING_I2C menuconfig BSP_USING_I2C_HW bool "Enable I2C Bus(hardware)" - default n + default y select RT_USING_I2C if BSP_USING_I2C_HW if BSP_USING_I2C_HW config BSP_USING_I2C0_HW bool "Enable Hardware I2C0 Bus" - default n + default y config BSP_USING_I2C0_HW_NAME depends on BSP_USING_I2C0_HW string "hardware i2c0 name" @@ -282,7 +282,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_ADC config BSP_USING_ADC0 bool "Enable ADC0" - default n + default y config BSP_USING_ADC0_NAME depends on BSP_USING_ADC0 string "adc0 device name" diff --git a/bsp/ht32/ht32f52352/project.uvoptx b/bsp/ht32/ht32f52352/project.uvoptx index f296b8ffa26..2bfae457fcf 100644 --- a/bsp/ht32/ht32f52352/project.uvoptx +++ b/bsp/ht32/ht32f52352/project.uvoptx @@ -73,7 +73,7 @@ 0 - 0 + 1 0 1 @@ -549,8 +549,8 @@ 0 0 0 - ..\..\..\components\finsh\shell.c - shell.c + ..\..\..\components\finsh\cmd.c + cmd.c 0 0 @@ -573,8 +573,8 @@ 0 0 0 - ..\..\..\components\finsh\cmd.c - cmd.c + ..\..\..\components\finsh\msh_parse.c + msh_parse.c 0 0 @@ -585,8 +585,8 @@ 0 0 0 - ..\..\..\components\finsh\msh_parse.c - msh_parse.c + ..\..\..\components\finsh\shell.c + shell.c 0 0 @@ -817,8 +817,8 @@ 0 0 0 - ..\..\..\src\klibc\kerrno.c - kerrno.c + ..\..\..\src\klibc\kstring.c + kstring.c 0 0 @@ -829,8 +829,8 @@ 0 0 0 - ..\..\..\src\klibc\rt_vsnprintf_tiny.c - rt_vsnprintf_tiny.c + ..\..\..\src\klibc\kerrno.c + kerrno.c 0 0 @@ -841,8 +841,8 @@ 0 0 0 - ..\..\..\src\klibc\kstring.c - kstring.c + ..\..\..\src\klibc\rt_vsnprintf_tiny.c + rt_vsnprintf_tiny.c 0 0 @@ -917,8 +917,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_sci.c - ht32f5xxxx_sci.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c + ht32f5xxxx_i2c.c 0 0 @@ -929,8 +929,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c - ht32f5xxxx_crc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usbd.c + ht32f5xxxx_usbd.c 0 0 @@ -941,8 +941,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c - ht32f5xxxx_usart.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c + ht32f5xxxx_ebi.c 0 0 @@ -953,8 +953,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c - ht32f5xxxx_ebi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c + ht32f5xxxx_flash.c 0 0 @@ -965,8 +965,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c - ht32f5xxxx_wdt.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2s.c + ht32f5xxxx_i2s.c 0 0 @@ -977,8 +977,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c - ht32f5xxxx_flash.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c + ht32f5xxxx_gpio.c 0 0 @@ -989,8 +989,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_01.c - system_ht32f5xxxx_01.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c + ht32f5xxxx_exti.c 0 0 @@ -1001,8 +1001,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c - ht32f5xxxx_cmp.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c + ht32f5xxxx_pdma.c 0 0 @@ -1013,8 +1013,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usbd.c - ht32f5xxxx_usbd.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c + ht32f5xxxx_mctm.c 0 0 @@ -1025,8 +1025,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c - ht32f5xxxx_rtc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c + ht32f5xxxx_cmp.c 0 0 @@ -1037,8 +1037,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c - ht32_cm0plus_misc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c + ht32f5xxxx_ckcu.c 0 0 @@ -1049,8 +1049,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c - ht32f5xxxx_spi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c + ht32f5xxxx_usart.c 0 0 @@ -1061,8 +1061,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c - ht32f5xxxx_rstcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c + ht32_cm0plus_misc.c 0 0 @@ -1073,8 +1073,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c - ht32f5xxxx_i2c.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c + ht32f5xxxx_rstcu.c 0 0 @@ -1085,8 +1085,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c - ht32f5xxxx_pwrcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c + ht32f5xxxx_tm.c 0 0 @@ -1097,8 +1097,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c - ht32f5xxxx_gpio.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_01.c + system_ht32f5xxxx_01.c 0 0 @@ -1109,8 +1109,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c - ht32f5xxxx_mctm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c + ht32f5xxxx_crc.c 0 0 @@ -1121,8 +1121,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c - ht32f5xxxx_exti.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c + ht32f5xxxx_adc.c 0 0 @@ -1133,8 +1133,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c - ht32f5xxxx_ckcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c + ht32f5xxxx_pwrcu.c 0 0 @@ -1145,8 +1145,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c - ht32f5xxxx_pdma.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_sci.c + ht32f5xxxx_sci.c 0 0 @@ -1157,8 +1157,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c - ht32f5xxxx_adc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c + ht32f5xxxx_rtc.c 0 0 @@ -1169,8 +1169,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2s.c - ht32f5xxxx_i2s.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c + ht32f5xxxx_wdt.c 0 0 @@ -1193,8 +1193,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c - ht32f5xxxx_tm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c + ht32f5xxxx_spi.c 0 0 diff --git a/bsp/ht32/ht32f52352/project.uvprojx b/bsp/ht32/ht32f52352/project.uvprojx index f15d410b1a1..2efbf44b5c0 100644 --- a/bsp/ht32/ht32f52352/project.uvprojx +++ b/bsp/ht32/ht32f52352/project.uvprojx @@ -333,9 +333,9 @@ 0 --gnu - __STDC_LIMIT_MACROS, USE_HT32F52352_SK, USE_HT32F52342_52, USE_MEM_HT32F52352, RT_USING_LIBC, RT_USING_ARMLIBC, __RTTHREAD__, __CLK_TCK=RT_TICK_PER_SECOND, USE_HT32_DRIVER + USE_HT32_DRIVER, USE_HT32F52352_SK, USE_HT32F52342_52, USE_MEM_HT32F52352, RT_USING_LIBC, __STDC_LIMIT_MACROS, RT_USING_ARMLIBC, __CLK_TCK=RT_TICK_PER_SECOND, __RTTHREAD__ - ..\..\..\libcpu\arm\common;..\..\..\include;board\inc;..\libraries\HT32_STD_5xxxx_FWLib\library\CMSIS\Include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;..\..\..\libcpu\arm\cortex-m0;..\..\..\components\libc\compilers\common\extension;..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\inc;..\..\..\components\finsh;..\..\..\components\libc\posix\io\eventfd;.;..\..\..\components\drivers\phy;..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Include;..\..\..\components\libc\compilers\common\include;..\..\..\components\libc\posix\io\poll;..\..\..\components\libc\posix\io\epoll;applications;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\libraries\ht32_drivers;..\..\..\components\drivers\smp_call;..\libraries\usbd_library\inc;..\..\..\components\libc\compilers\common\extension\fcntl\octal + ..\..\..\components\drivers\smp_call;..\..\..\components\finsh;..\libraries\HT32_STD_5xxxx_FWLib\library\CMSIS\Include;..\..\..\libcpu\arm\cortex-m0;..\..\..\components\drivers\phy;..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\inc;..\..\..\components\drivers\include;..\libraries\usbd_library\inc;..\..\..\components\libc\posix\io\poll;..\..\..\components\drivers\include;.;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Include;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\epoll;..\..\..\include;board\inc;..\..\..\libcpu\arm\common;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\libc\compilers\common\extension;..\libraries\ht32_drivers;applications;..\..\..\components\libc\compilers\common\include;..\..\..\components\libc\compilers\common\extension\fcntl\octal @@ -1140,9 +1140,9 @@ Finsh - shell.c + cmd.c 1 - ..\..\..\components\finsh\shell.c + ..\..\..\components\finsh\cmd.c msh.c @@ -1150,14 +1150,14 @@ ..\..\..\components\finsh\msh.c - cmd.c + msh_parse.c 1 - ..\..\..\components\finsh\cmd.c + ..\..\..\components\finsh\msh_parse.c - msh_parse.c + shell.c 1 - ..\..\..\components\finsh\msh_parse.c + ..\..\..\components\finsh\shell.c @@ -2054,6 +2054,11 @@ 1 ..\..\..\src\klibc\kstdio.c + + kstring.c + 1 + ..\..\..\src\klibc\kstring.c + kerrno.c 1 @@ -2064,11 +2069,6 @@ 1 ..\..\..\src\klibc\rt_vsnprintf_tiny.c - - kstring.c - 1 - ..\..\..\src\klibc\kstring.c - @@ -2100,114 +2100,114 @@ Libraries - ht32f5xxxx_sci.c + ht32f5xxxx_i2c.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_sci.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c - ht32f5xxxx_crc.c + ht32f5xxxx_usbd.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usbd.c - ht32f5xxxx_usart.c + ht32f5xxxx_ebi.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c - ht32f5xxxx_ebi.c + ht32f5xxxx_flash.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c - ht32f5xxxx_wdt.c + ht32f5xxxx_i2s.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2s.c - ht32f5xxxx_flash.c + ht32f5xxxx_gpio.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c - system_ht32f5xxxx_01.c + ht32f5xxxx_exti.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_01.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c - ht32f5xxxx_cmp.c + ht32f5xxxx_pdma.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c - ht32f5xxxx_usbd.c + ht32f5xxxx_mctm.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usbd.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c - ht32f5xxxx_rtc.c + ht32f5xxxx_cmp.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c - ht32_cm0plus_misc.c + ht32f5xxxx_ckcu.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c - ht32f5xxxx_spi.c + ht32f5xxxx_usart.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c - ht32f5xxxx_rstcu.c + ht32_cm0plus_misc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c - ht32f5xxxx_i2c.c + ht32f5xxxx_rstcu.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c - ht32f5xxxx_pwrcu.c + ht32f5xxxx_tm.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c - ht32f5xxxx_gpio.c + system_ht32f5xxxx_01.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_01.c - ht32f5xxxx_mctm.c + ht32f5xxxx_crc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c - ht32f5xxxx_exti.c + ht32f5xxxx_adc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c - ht32f5xxxx_ckcu.c + ht32f5xxxx_pwrcu.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c - ht32f5xxxx_pdma.c + ht32f5xxxx_sci.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_sci.c - ht32f5xxxx_adc.c + ht32f5xxxx_rtc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c - ht32f5xxxx_i2s.c + ht32f5xxxx_wdt.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2s.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c ht32f5xxxx_bftm.c @@ -2215,9 +2215,9 @@ ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_bftm.c - ht32f5xxxx_tm.c + ht32f5xxxx_spi.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c diff --git a/bsp/ht32/ht32f52352/rtconfig.py b/bsp/ht32/ht32f52352/rtconfig.py index 964fa9313e6..0525f0267ae 100644 --- a/bsp/ht32/ht32f52352/rtconfig.py +++ b/bsp/ht32/ht32f52352/rtconfig.py @@ -48,7 +48,7 @@ CFLAGS = DEVICE + ' -Dgcc' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds' - + CFLAGS += ' -D USE_HT32F52342_52' CPATH = '' LPATH = '' diff --git a/bsp/ht32/ht32f53252/.ci/attachconfig/ci.attachconfig.yml b/bsp/ht32/ht32f53252/.ci/attachconfig/ci.attachconfig.yml new file mode 100644 index 00000000000..817cf4e3d02 --- /dev/null +++ b/bsp/ht32/ht32f53252/.ci/attachconfig/ci.attachconfig.yml @@ -0,0 +1,18 @@ +devices.strict: + depend_scons_arg: + - '--strict' +devices.gpio: + depends: + - devices.strict + kconfig: + - CONFIG_BSP_USING_GPIO=y +devices.uart: + kconfig: + - CONFIG_BSP_USING_UART=y + - CONFIG_BSP_USING_USART1=y +# ------ SEGGER CI ------ +segger: + kconfig: + - CONFIG_BSP_USING_GPIO=y + - CONFIG_BSP_USING_UART=y + - CONFIG_BSP_USING_USART1=y \ No newline at end of file diff --git a/bsp/ht32/ht32f53252/applications/test.c b/bsp/ht32/ht32f53252/applications/test.c index 1676e06a9a7..894f7a18983 100644 --- a/bsp/ht32/ht32f53252/applications/test.c +++ b/bsp/ht32/ht32f53252/applications/test.c @@ -910,7 +910,7 @@ int can_test(int argc, char *argv[]) if (!can_dev) { rt_kprintf("find %s failed!\n", can_name); - return RT_ERROR; + return -RT_ERROR; } rt_sem_init(&rx_sem, "rx_sem", 0, RT_IPC_FLAG_FIFO); diff --git a/bsp/ht32/ht32f53252/board/Kconfig b/bsp/ht32/ht32f53252/board/Kconfig index 8ba20cd72d2..f77f0663f69 100644 --- a/bsp/ht32/ht32f53252/board/Kconfig +++ b/bsp/ht32/ht32f53252/board/Kconfig @@ -138,7 +138,7 @@ menu "On-chip Peripheral Drivers" config BSP_USING_USART1 bool "Enable USART1" - default n + default y config BSP_USING_USART1_NAME depends on BSP_USING_USART1 string "usart1 bus name" @@ -168,7 +168,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_SPI config BSP_USING_SPI0 bool "Enable SPI0 Bus" - default n + default y config BSP_USING_SPI0_NAME depends on BSP_USING_SPI0 string "spi0 bus name" @@ -189,12 +189,12 @@ menu "On-chip Peripheral Drivers" if BSP_USING_I2C menuconfig BSP_USING_I2C_HW bool "Enable I2C Bus(hardware)" - default n + default y select RT_USING_I2C if BSP_USING_I2C_HW if BSP_USING_I2C_HW config BSP_USING_I2C0_HW bool "Enable Hardware I2C0 Bus" - default n + default y config BSP_USING_I2C0_HW_NAME depends on BSP_USING_I2C0_HW string "hardware i2c0 name" @@ -282,7 +282,7 @@ menu "On-chip Peripheral Drivers" if BSP_USING_ADC config BSP_USING_ADC0 bool "Enable ADC0" - default n + default y config BSP_USING_ADC0_NAME depends on BSP_USING_ADC0 string "adc0 device name" diff --git a/bsp/ht32/ht32f53252/project.uvoptx b/bsp/ht32/ht32f53252/project.uvoptx index c92da80da39..ac60a189877 100644 --- a/bsp/ht32/ht32f53252/project.uvoptx +++ b/bsp/ht32/ht32f53252/project.uvoptx @@ -549,8 +549,8 @@ 0 0 0 - ..\..\..\components\finsh\msh_parse.c - msh_parse.c + ..\..\..\components\finsh\shell.c + shell.c 0 0 @@ -573,8 +573,8 @@ 0 0 0 - ..\..\..\components\finsh\cmd.c - cmd.c + ..\..\..\components\finsh\msh_parse.c + msh_parse.c 0 0 @@ -585,8 +585,8 @@ 0 0 0 - ..\..\..\components\finsh\shell.c - shell.c + ..\..\..\components\finsh\cmd.c + cmd.c 0 0 @@ -805,8 +805,8 @@ 0 0 0 - ..\..\..\src\klibc\kstring.c - kstring.c + ..\..\..\src\klibc\kstdio.c + kstdio.c 0 0 @@ -817,8 +817,8 @@ 0 0 0 - ..\..\..\src\klibc\kstdio.c - kstdio.c + ..\..\..\src\klibc\kerrno.c + kerrno.c 0 0 @@ -829,8 +829,8 @@ 0 0 0 - ..\..\..\src\klibc\kerrno.c - kerrno.c + ..\..\..\src\klibc\kstring.c + kstring.c 0 0 @@ -905,8 +905,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c - ht32f5xxxx_i2c.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c + ht32f5xxxx_cmp.c 0 0 @@ -917,8 +917,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c - ht32f5xxxx_rstcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c + ht32f5xxxx_flash.c 0 0 @@ -929,8 +929,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c - ht32f5xxxx_exti.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c + ht32f5xxxx_adc.c 0 0 @@ -941,8 +941,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c - ht32f5xxxx_tm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c + ht32f5xxxx_wdt.c 0 0 @@ -953,8 +953,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_15.c - system_ht32f5xxxx_15.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c + ht32_cm0plus_misc.c 0 0 @@ -965,8 +965,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c - ht32_cm0plus_misc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_bftm.c + ht32f5xxxx_bftm.c 0 0 @@ -977,8 +977,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ledc.c - ht32f5xxxx_ledc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c + ht32f5xxxx_i2c.c 0 0 @@ -989,8 +989,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_can.c - ht32f5xxxx_can.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c + ht32f5xxxx_tm.c 0 0 @@ -1001,8 +1001,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c - ht32f5xxxx_pwrcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_div.c + ht32f5xxxx_div.c 0 0 @@ -1013,8 +1013,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c - ht32f5xxxx_rtc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c + ht32f5xxxx_rstcu.c 0 0 @@ -1025,8 +1025,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c - ht32f5xxxx_gpio.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c + ht32f5xxxx_spi.c 0 0 @@ -1037,8 +1037,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c - ht32f5xxxx_spi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c + ht32f5xxxx_ebi.c 0 0 @@ -1049,8 +1049,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c - ht32f5xxxx_crc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_15.c + system_ht32f5xxxx_15.c 0 0 @@ -1061,8 +1061,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_bftm.c - ht32f5xxxx_bftm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c + ht32f5xxxx_ckcu.c 0 0 @@ -1073,8 +1073,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c - ht32f5xxxx_cmp.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c + ht32f5xxxx_mctm.c 0 0 @@ -1085,8 +1085,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c - ht32f5xxxx_ckcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c + ht32f5xxxx_crc.c 0 0 @@ -1097,8 +1097,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c - ht32f5xxxx_pdma.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_can.c + ht32f5xxxx_can.c 0 0 @@ -1109,8 +1109,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c - ht32f5xxxx_wdt.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c + ht32f5xxxx_rtc.c 0 0 @@ -1121,8 +1121,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c - ht32f5xxxx_mctm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c + ht32f5xxxx_usart.c 0 0 @@ -1133,8 +1133,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c - ht32f5xxxx_usart.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c + ht32f5xxxx_pwrcu.c 0 0 @@ -1145,8 +1145,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c - ht32f5xxxx_adc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ledc.c + ht32f5xxxx_ledc.c 0 0 @@ -1157,8 +1157,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_div.c - ht32f5xxxx_div.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c + ht32f5xxxx_pdma.c 0 0 @@ -1169,8 +1169,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c - ht32f5xxxx_flash.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c + ht32f5xxxx_exti.c 0 0 @@ -1181,8 +1181,8 @@ 0 0 0 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c - ht32f5xxxx_ebi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c + ht32f5xxxx_gpio.c 0 0 diff --git a/bsp/ht32/ht32f53252/project.uvprojx b/bsp/ht32/ht32f53252/project.uvprojx index d9c073cd30e..bf310a93635 100644 --- a/bsp/ht32/ht32f53252/project.uvprojx +++ b/bsp/ht32/ht32f53252/project.uvprojx @@ -333,9 +333,9 @@ 0 --gnu - RT_USING_ARMLIBC, __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND, RT_USING_LIBC, __RTTHREAD__, USE_HT32_DRIVER, USE_HT32F53252_SK, USE_HT32F53242_52, USE_MEM_HT32F53252 + __RTTHREAD__, USE_HT32F53252_SK, USE_HT32F53242_52, USE_MEM_HT32F53252, RT_USING_LIBC, USE_HT32_DRIVER, RT_USING_ARMLIBC, __STDC_LIMIT_MACROS, __CLK_TCK=RT_TICK_PER_SECOND - .;board\inc;..\..\..\components\drivers\smp_call;..\..\..\components\libc\posix\io\epoll;..\..\..\components\drivers\include;..\libraries\usbd_library\inc;applications;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\poll;..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\inc;..\..\..\include;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Include;..\..\..\libcpu\arm\cortex-m0;..\..\..\components\libc\posix\ipc;..\..\..\components\libc\compilers\common\extension;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\eventfd;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\include;..\libraries\HT32_STD_5xxxx_FWLib\library\CMSIS\Include;..\..\..\components\finsh;..\..\..\components\drivers\phy;..\..\..\components\drivers\include;..\..\..\libcpu\arm\common;..\libraries\ht32_drivers + board\inc;..\..\..\components\drivers\phy;..\..\..\include;..\libraries\HT32_STD_5xxxx_FWLib\library\CMSIS\Include;.;..\..\..\components\drivers\include;..\..\..\components\libc\compilers\common\extension;..\libraries\usbd_library\inc;applications;..\..\..\components\libc\compilers\common\include;..\..\..\components\drivers\include;..\..\..\components\drivers\include;..\..\..\libcpu\arm\common;..\..\..\components\drivers\include;..\..\..\components\libc\posix\ipc;..\..\..\components\libc\compilers\common\extension\fcntl\octal;..\..\..\components\libc\posix\io\poll;..\..\..\libcpu\arm\cortex-m0;..\..\..\components\libc\posix\io\epoll;..\..\..\components\finsh;..\libraries\ht32_drivers;..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\inc;..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Include;..\..\..\components\drivers\smp_call;..\..\..\components\drivers\include;..\..\..\components\libc\posix\io\eventfd @@ -1140,9 +1140,9 @@ Finsh - msh_parse.c + shell.c 1 - ..\..\..\components\finsh\msh_parse.c + ..\..\..\components\finsh\shell.c msh.c @@ -1150,14 +1150,14 @@ ..\..\..\components\finsh\msh.c - cmd.c + msh_parse.c 1 - ..\..\..\components\finsh\cmd.c + ..\..\..\components\finsh\msh_parse.c - shell.c + cmd.c 1 - ..\..\..\components\finsh\shell.c + ..\..\..\components\finsh\cmd.c @@ -2049,11 +2049,6 @@ klibc - - kstring.c - 1 - ..\..\..\src\klibc\kstring.c - kstdio.c 1 @@ -2064,6 +2059,11 @@ 1 ..\..\..\src\klibc\kerrno.c + + kstring.c + 1 + ..\..\..\src\klibc\kstring.c + @@ -2095,29 +2095,24 @@ Libraries - ht32f5xxxx_i2c.c - 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c - - - ht32f5xxxx_rstcu.c + ht32f5xxxx_cmp.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c - ht32f5xxxx_exti.c + ht32f5xxxx_flash.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c - ht32f5xxxx_tm.c + ht32f5xxxx_adc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c - system_ht32f5xxxx_15.c + ht32f5xxxx_wdt.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_15.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c ht32_cm0plus_misc.c @@ -2125,29 +2120,29 @@ ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32_cm0plus_misc.c - ht32f5xxxx_ledc.c + ht32f5xxxx_bftm.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ledc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_bftm.c - ht32f5xxxx_can.c + ht32f5xxxx_i2c.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_can.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_i2c.c - ht32f5xxxx_pwrcu.c + ht32f5xxxx_tm.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_tm.c - ht32f5xxxx_rtc.c + ht32f5xxxx_div.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_div.c - ht32f5xxxx_gpio.c + ht32f5xxxx_rstcu.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rstcu.c ht32f5xxxx_spi.c @@ -2155,39 +2150,39 @@ ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_spi.c - ht32f5xxxx_crc.c + ht32f5xxxx_ebi.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c - ht32f5xxxx_bftm.c + system_ht32f5xxxx_15.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_bftm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\Device\Holtek\HT32F5xxxx\Source\system_ht32f5xxxx_15.c - ht32f5xxxx_cmp.c + ht32f5xxxx_ckcu.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_cmp.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c - ht32f5xxxx_ckcu.c + ht32f5xxxx_mctm.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ckcu.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c - ht32f5xxxx_pdma.c + ht32f5xxxx_crc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_crc.c - ht32f5xxxx_wdt.c + ht32f5xxxx_can.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_wdt.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_can.c - ht32f5xxxx_mctm.c + ht32f5xxxx_rtc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_mctm.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_rtc.c ht32f5xxxx_usart.c @@ -2195,24 +2190,29 @@ ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_usart.c - ht32f5xxxx_adc.c + ht32f5xxxx_pwrcu.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_adc.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pwrcu.c - ht32f5xxxx_div.c + ht32f5xxxx_ledc.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_div.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ledc.c - ht32f5xxxx_flash.c + ht32f5xxxx_pdma.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_flash.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_pdma.c - ht32f5xxxx_ebi.c + ht32f5xxxx_exti.c 1 - ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_ebi.c + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_exti.c + + + ht32f5xxxx_gpio.c + 1 + ..\libraries\HT32_STD_5xxxx_FWLib\library\HT32F5xxxx_Driver\src\ht32f5xxxx_gpio.c diff --git a/bsp/ht32/ht32f53252/rtconfig.py b/bsp/ht32/ht32f53252/rtconfig.py index 964fa9313e6..6f853dccc25 100644 --- a/bsp/ht32/ht32f53252/rtconfig.py +++ b/bsp/ht32/ht32f53252/rtconfig.py @@ -48,7 +48,7 @@ CFLAGS = DEVICE + ' -Dgcc' AFLAGS = ' -c' + DEVICE + ' -x assembler-with-cpp -Wa,-mimplicit-it=thumb ' LFLAGS = DEVICE + ' -Wl,--gc-sections,-Map=rt-thread.map,-cref,-u,Reset_Handler -T board/linker_scripts/link.lds' - + CFLAGS += ' -D USE_HT32F53242_52' CPATH = '' LPATH = '' diff --git a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.c b/bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.c deleted file mode 100644 index a90caeb9861..00000000000 --- a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.c +++ /dev/null @@ -1,426 +0,0 @@ -/*********************************************************************************************************//** - * @file example/ht32_usbd_class.c - * @version $Rev:: 11 $ - * @date $Date:: 2017-05-15 #$ - * @brief The USB Device Class. - ************************************************************************************************************* - * @attention - * - * Firmware Disclaimer Information - * - * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the - * proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and - * other intellectual property laws. - * - * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties - * other than HOLTEK and the customer. - * - * 3. The program technical documentation, including the code, is provided "as is" and for customer reference - * only. After delivery by HOLTEK, the customer shall use the program technical documentation, including - * the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including - * the warranties of merchantability, satisfactory quality and fitness for a particular purpose. - * - *

Copyright (C) Holtek Semiconductor Inc. All rights reserved

- ************************************************************************************************************/ - -/* Includes ------------------------------------------------------------------------------------------------*/ -#include "ht32.h" -#include "ht32_usbd_core.h" -#include "ht32_usbd_class.h" - -/** @addtogroup HT32_USBD_Library HT32 USB Device Library - * @{ - */ - -/** @defgroup USBDClass USB Device Class - * @brief USB Device Class - * @{ - */ - -/* Exported constants --------------------------------------------------------------------------------------*/ -/** @defgroup USBDClass_Private_Define USB Device Class private definitions - * @{ - */ -#define CLASS_REQ_01_CMD1 (u16)(0x1 << 8) -#define CLASS_REQ_02_CMD2 (u16)(0x2 << 8) -/** - * @} - */ - -/* Private function prototypes -----------------------------------------------------------------------------*/ -static void USBDClass_MainRoutine(u32 uPara); -static void USBDClass_ClassProcess(void); -static void USBDClass_EPT1Process(void); -static void USBDClass_EPT2Process(void); - -static void USBDClass_Reset(u32 uPara); -static void USBDClass_StartOfFrame(u32 uPara); - -static void USBDClass_Standard_GetDescriptor(USBDCore_Device_TypeDef *pDev); -static void USBDClass_Standard_SetInterface(USBDCore_Device_TypeDef *pDev); -static void USBDClass_Standard_GetInterface(USBDCore_Device_TypeDef *pDev); - -static void USBDClass_Request(USBDCore_Device_TypeDef *pDev); - -static void USBDClass_CMD1(USBDCore_Device_TypeDef *pDev); -static void USBDClass_CMD2(USBDCore_Device_TypeDef *pDev); - -static void USBDClass_Endpoint1(USBD_EPTn_Enum EPTn); -static void USBDClass_Endpoint2(USBD_EPTn_Enum EPTn); -static void USBDClass_Endpoint3(USBD_EPTn_Enum EPTn); -static void USBDClass_Endpoint4(USBD_EPTn_Enum EPTn); -static void USBDClass_Endpoint5(USBD_EPTn_Enum EPTn); -static void USBDClass_Endpoint6(USBD_EPTn_Enum EPTn); -static void USBDClass_Endpoint7(USBD_EPTn_Enum EPTn); - -/* Global Function -----------------------------------------------------------------------------------------*/ -/** @defgroup USBDClass_Exported_Functions USB Device Class exported functions - * @{ - */ -/*********************************************************************************************************//** - * @brief USB Class initialization. - * @param pClass: pointer of USBDCore_Class_TypeDef - * @retval None - ***********************************************************************************************************/ -void USBDClass_Init(USBDCore_Class_TypeDef *pClass) -{ - pClass->CallBack_MainRoutine.func = USBDClass_MainRoutine; - //pClass->CallBack_MainRoutine.uPara = (u32)NULL; - - pClass->CallBack_Reset.func = USBDClass_Reset; - pClass->CallBack_Reset.uPara = (u32)NULL; - - pClass->CallBack_StartOfFrame.func = USBDClass_StartOfFrame; - pClass->CallBack_StartOfFrame.uPara = (u32)NULL; - - pClass->CallBack_ClassGetDescriptor = USBDClass_Standard_GetDescriptor; - pClass->CallBack_ClassSetInterface = USBDClass_Standard_SetInterface; - pClass->CallBack_ClassGetInterface = USBDClass_Standard_GetInterface; - - pClass->CallBack_ClassRequest = USBDClass_Request; - pClass->CallBack_EPTn[1] = USBDClass_Endpoint1; - pClass->CallBack_EPTn[2] = USBDClass_Endpoint2; - pClass->CallBack_EPTn[3] = USBDClass_Endpoint3; - pClass->CallBack_EPTn[4] = USBDClass_Endpoint4; - pClass->CallBack_EPTn[5] = USBDClass_Endpoint5; - pClass->CallBack_EPTn[6] = USBDClass_Endpoint6; - pClass->CallBack_EPTn[7] = USBDClass_Endpoint7; - - #ifdef RETARGET_IS_USB - pClass->CallBack_EPTn[RETARGET_RX_EPT] = SERIAL_USBDClass_RXHandler; - #endif - - return; -} -/** - * @} - */ - -/* Private functions ---------------------------------------------------------------------------------------*/ -/** @defgroup USBDClass_Private_Functions USB Device Class private functions - * @{ - */ -/*********************************************************************************************************//** - * @brief USB Class main routine. - * @param uPara: Parameter for Class main routine - * @retval None - ***********************************************************************************************************/ -static void USBDClass_MainRoutine(u32 uPara) -{ - USBDClass_ClassProcess(); - USBDClass_EPT1INProcess(); - USBDClass_EPT2OUTProcess(); - - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Process for application. - * @retval None - ***********************************************************************************************************/ -static void USBDClass_ClassProcess(void) -{ - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint 1 Process for application. - * @retval None - ***********************************************************************************************************/ -static void USBDClass_EPT1Process(void) -{ - if (gIsEP1 == TRUE) - { - gIsEP1 = FALSE; - } - - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint 2 Process for application. - * @retval None - ***********************************************************************************************************/ -static void USBDClass_EPT2Process(void) -{ - if (gIsEP2 == TRUE) - { - gIsEP2 = FALSE; - } - - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Reset. - * @param uPara: Parameter for Class Reset. - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Reset(u32 uPara) -{ - -} - -/*********************************************************************************************************//** - * @brief USB Class Start of Frame. - * @param uPara: Parameter for Class Start of Frame. - * @retval None - ***********************************************************************************************************/ -static void USBDClass_StartOfFrame(u32 uPara) -{ - -} - -/*********************************************************************************************************//** - * @brief USB Device Class Request - * @param pDev: pointer of USB Device - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Request(USBDCore_Device_TypeDef *pDev) -{ - u16 uUSBCmd = *((u16 *)(&(pDev->Request))); - -#ifdef RETARGET_IS_USB - SERIAL_USBDClass_Request(pDev); -#endif - - switch (uUSBCmd) - { - /*------------------------------------------------------------------------------------------------------*/ - /* | bRequest | Data transfer direction | Type | Recipient | Data */ - /*------------------------------------------------------------------------------------------------------*/ - - /*------------------------------------------------------------------------------------------------------*/ - /* | 01_CMD1 | 80_Device-to-Host | 20_Class Request | 1_Interface | 01A1h */ - /*------------------------------------------------------------------------------------------------------*/ - case (CLASS_REQ_01_CMDID0 | REQ_DIR_01_D2H | REQ_TYPE_01_CLS | REQ_REC_01_INF): - { - __DBG_USBPrintf("%06ld CMD0\t[%02d][%02d]\r\n", __DBG_USBCount, pDev->Request.wValueH, pDev->Request.wLength ); - USBDClass_RequestCMD1(pDev); - break; - } - /*------------------------------------------------------------------------------------------------------*/ - /* | 02_CMD2 | 00_Host-to-Device | 20_Class Request | 1_Interface | 0221h */ - /*------------------------------------------------------------------------------------------------------*/ - case (CLASS_REQ_02_GET_IDLE | REQ_DIR_00_H2D | REQ_TYPE_01_CLS | REQ_REC_01_INF): - { - __DBG_USBPrintf("%06ld CMD1\t[%02d][%02d]\r\n", __DBG_USBCount, pDev->Request.wValueH, pDev->Request.wLength ); - USBDClass_RequestCMD2(pDev); - break; - } - } - - return; -} - -/*********************************************************************************************************//** - * @brief USB Device Class Standard Request - GET_DESCRIPTOR - * @param pDev: pointer of USB Device - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Standard_GetDescriptor(USBDCore_Device_TypeDef *pDev) -{ - u32 type = pDev->Request.wValueH; - - switch (type) - { - case DESC_TYPE_01_XXX - { - pDev->Transfer.pData = (uc8 *)(__BUFFER_POINTER__); - pDev->Transfer.sByteLength = DESC_LEN_XXX; - pDev->Transfer.Action = USB_ACTION_DATAIN; - break; - } - case DESC_TYPE_02_XXX: - { - pDev->Transfer.pData = (uc8 *)(__BUFFER_POINTER__); - pDev->Transfer.sByteLength = DESC_LEN_XXX; - pDev->Transfer.Action = USB_ACTION_DATAIN; - break; - } - } /* switch (type) */ - - return; -} - -/*********************************************************************************************************//** - * @brief USB Device Class Standard Request - SET_INTERFACE - * @param pDev: pointer of USB Device - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Standard_SetInterface(USBDCore_Device_TypeDef *pDev) -{ - -} - -/*********************************************************************************************************//** - * @brief USB Device Class Standard Request - GET_INTERFACE - * @param pDev: pointer of USB Device - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Standard_GetInterface(USBDCore_Device_TypeDef *pDev) -{ - -} - - - -/*********************************************************************************************************//** - * @brief USB Device Class Request - CMD1 - * @param pDev: pointer of USB Device - * @retval None - ***********************************************************************************************************/ -static void USBDClass_CMD1(USBDCore_Device_TypeDef *pDev) -{ - /* Add your own Class request function here.... - For example.... - - u32 uReportID = pDev->Request.wValueL; - u32 uInterface = pDev->Request.wIndex; - - pDev->Transfer.pData = (uc8 *)&(__IDLE_DURATION_BUFFER[uReportID]); - pDev->Transfer.sByteLength = 1; - pDev->Transfer.Action= USB_ACTION_DATAIN; - - */ - return; -} - -/*********************************************************************************************************//** - * @brief USB Device Class Request - CMD2 - * @param pDev: pointer of USB Device - * @retval None - ***********************************************************************************************************/ -static void USBDClass_CMD2(USBDCore_Device_TypeDef *pDev) -{ - /* Add your own Class request function here.... - For example.... - - u32 uReportID = pDev->Request.wValueL; - u32 uInterface = pDev->Request.wIndex; - - pDev->Transfer.pData = (uc8 *)&(__IDLE_DURATION_BUFFER[uReportID]); - pDev->Transfer.sByteLength = 1; - pDev->Transfer.Action= USB_ACTION_DATAIN; - - */ - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint1(USBD_EPTn_Enum EPTn) -{ - gIsEP1 = TRUE; - - __DBG_USBPrintf("%06ld EP1\t[%02d]", ++__DBG_USBCount, (int)USBDCore_EPTGetBufferLen(EPTn)); - - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint2(USBD_EPTn_Enum EPTn) -{ - gIsEP2 = TRUE; - __DBG_USBPrintf("%06ld EP2\t[%02d]", ++__DBG_USBCount, (int)USBDCore_EPTGetBufferLen(EPTn)); - - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint3(USBD_EPTn_Enum EPTn) -{ - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint4(USBD_EPTn_Enum EPTn) -{ - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint5(USBD_EPTn_Enum EPTn) -{ - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint6(USBD_EPTn_Enum EPTn) -{ - return; -} - -/*********************************************************************************************************//** - * @brief USB Class Endpoint handler - * @param EPTn: USB Endpoint number - * @arg USBD_EPT0 ~ USBD_EPT7 - * @retval None - ***********************************************************************************************************/ -static void USBDClass_Endpoint7(USBD_EPTn_Enum EPTn) -{ - return; -} -/** - * @} - */ - - -/** - * @} - */ - -/** - * @} - */ diff --git a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.h b/bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.h deleted file mode 100644 index c674de9ce6c..00000000000 --- a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_class.h +++ /dev/null @@ -1,87 +0,0 @@ -/*********************************************************************************************************//** - * @file example/ht32_usbd_class.h - * @version $Rev:: 5 $ - * @date $Date:: 2017-05-11 #$ - * @brief The header file of USB Device Class. - ************************************************************************************************************* - * @attention - * - * Firmware Disclaimer Information - * - * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the - * proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and - * other intellectual property laws. - * - * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties - * other than HOLTEK and the customer. - * - * 3. The program technical documentation, including the code, is provided "as is" and for customer reference - * only. After delivery by HOLTEK, the customer shall use the program technical documentation, including - * the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including - * the warranties of merchantability, satisfactory quality and fitness for a particular purpose. - * - *

Copyright (C) Holtek Semiconductor Inc. All rights reserved

- ************************************************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------------------------------------*/ -#ifndef __HT32_USBD_CLASS_H -#define __HT32_USBD_CLASS_H - -/* Includes ------------------------------------------------------------------------------------------------*/ - -/** @addtogroup HT32_USBD_Library HT32 USB Device Library - * @{ - */ - -/** @defgroup USBDClass USB Device Class - * @brief USB Device Class - * @{ - */ - - -/* Exported constants --------------------------------------------------------------------------------------*/ -/** @defgroup USBDClass_Private_Define USB Device Class private definitions - * @{ - */ -/* For ht32_usbd_descriptor.c */ -#define CLASS_INF_CLASS (DESC_CLASS_03_XXX) -#define CLASS_INF_SUBCLASS (HID_SUBCLASS_00_NONE) -#define CLASS_INF_PTCO (HID_PROTOCOL_00_NONE) - -/* HID related definition */ -#define DESC_LEN_XXX ((u32)(9)) -#define DESC_LEN_XXX ((u16)(47)) - -#define DESC_TYPE_01_XXX (0x01) -#define DESC_TYPE_02_XXX (0x02) - -#define HID_SUBCLASS_00_NONE (0x00) -#define HID_SUBCLASS_01_BOOT (0x01) - -#define HID_PROTOCOL_00_NONE (0x00) -/** - * @} - */ - - -/* Exported functions --------------------------------------------------------------------------------------*/ -/** @defgroup USBDClass_Exported_Functions USB Device Class exported functions - * @{ - */ -void USBDClass_Init(USBDCore_Class_TypeDef *pClass); -/** - * @} - */ - - -/** - * @} - */ - -/** - * @} - */ - -#endif /* __HT32_USBD_CLASS_H ------------------------------------------------------------------------------*/ diff --git a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.c b/bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.c deleted file mode 100644 index a4432bf192f..00000000000 --- a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.c +++ /dev/null @@ -1,368 +0,0 @@ -/*********************************************************************************************************//** - * @file example/ht32_usbd_descriptor.c - * @version $Rev:: 5 $ - * @date $Date:: 2017-05-11 #$ - * @brief The USB Descriptor. - ************************************************************************************************************* - * @attention - * - * Firmware Disclaimer Information - * - * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the - * proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and - * other intellectual property laws. - * - * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties - * other than HOLTEK and the customer. - * - * 3. The program technical documentation, including the code, is provided "as is" and for customer reference - * only. After delivery by HOLTEK, the customer shall use the program technical documentation, including - * the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including - * the warranties of merchantability, satisfactory quality and fitness for a particular purpose. - * - *

Copyright (C) Holtek Semiconductor Inc. All rights reserved

- ************************************************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> - -/* Includes ------------------------------------------------------------------------------------------------*/ -#include "ht32.h" -#include "ht32_usbd_core.h" -#include "ht32_usbd_class.h" -#include "ht32_usbd_descriptor.h" - -/** @addtogroup HT32_USBD_Library HT32 USB Device Library - * @{ - */ - -/** @defgroup USBDDescriptor USB Descriptor - * @brief USB descriptor - * @{ - */ - - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Device descriptor setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// USB Device descriptor setting -// USB Specification Release number (bcdUSB) -// <0x0200=> USB 2.0 -// <0x0110=> USB 1.1 -// <0x0100=> USB 1.0 -// USB Class code (assigned by the USB-IF) -// <0x00=> Use class information in the Interface Descriptors (0x00) -// <0x02=> Communications and CDC Control (CDC, 0x02) -// <0xDC=> Diagnostic Device (0xDC) -// <0xEF=> Miscellaneous (0xEF) -// <0xFF=> Vendor Specific (0xFF) -// USB Subclass code (assigned by the USB-IF) <0x0-0xFF:1> -// USB Protocol code (assigned by the USB-IF) <0x0-0xFF:1> -// USB Vendor ID <0x0-0xFFFF:1> -// USB Product ID <0x0-0xFFFF:1> -// USB Device Version <0x0-0xFFFF:1> -// USB String descriptor - Manufacturer -// USB String descriptor - Product -// USB String descriptor - Device serial number -// USB Number of possible configurations <0-255:1> -#define DESC_BCDUSB (0x0110) -#define DESC_BDEVCLASS (0x00) -#define DESC_BDEVSUBCLASS (0x00) -#define DESC_BDEVPROTOCOL (0x00) -#define DESC_IDVENDOR (0x04D9) -#define DESC_IDPRODUCT (0x8008) -#define DESC_BCDDEVICE (0x0100) -#define DESC_IMANUFACTURE (1) -#define DESC_IPRODUCT (1) -#define DESC_ISERIALNUM (1) -#define DESC_INUMCONFN (1) -// - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Device Descriptor definition. DO NOT MODIFY. */ -/*----------------------------------------------------------------------------------------------------------*/ -#if (DESC_BDEVCLASS == 0x0 & DESC_BDEVSUBCLASS != 0x0) -#error "DESC_BDEVSUBCLASS must be reset to zero when the DESC_BDEVCLASS is equal to zero." -#endif -#define DESC_WMAXPACKETSIZE0 (_EP0LEN) -#define DESC_STR_MAN (1 * DESC_IMANUFACTURE) -#define DESC_STR_PRD (2 * DESC_IPRODUCT) -#define DESC_STR_SER (3 * DESC_ISERIALNUM) -#define DESC_NUM_STRING (1 + 3) - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Device descriptor */ -/*----------------------------------------------------------------------------------------------------------*/ -__ALIGN4 static uc8 guUSB_DeviceDesc[] = -{ - /*--------------------------------------------------------------------------------------------------------*/ - /* Device descriptor */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_LEN_DEV, // bLength 1 Size of this descriptor in bytes - DESC_TYPE_01_DEV, // bDescriptorType 1 DEVICE Descriptor Type - DESC_H2B(DESC_BCDUSB), // bcdUSB 2 USB Specification Release Number - DESC_BDEVCLASS, // bDeviceClass 1 Class code (assigned by the USB-IF) - DESC_BDEVSUBCLASS, // bDeviceSubClass 1 Subclass code (assigned by the USB-IF) - DESC_BDEVPROTOCOL, // bDeviceProtocol 1 Protocol code (assigned by the USB-IF) - DESC_WMAXPACKETSIZE0, // wMaxPacketSize0 1 Maximum packet size for endpoint zero - DESC_H2B(DESC_IDVENDOR), // idVendor 2 Vendor ID (assigned by USB-IF) - DESC_H2B(DESC_IDPRODUCT), // idProduct 2 Product ID (assigned by manufacturer) - DESC_H2B(DESC_BCDDEVICE), // bcdDevice 2 Device release number - DESC_STR_MAN, // iManufacturer 1 Index of string descriptor (Manufacturer) - DESC_STR_PRD, // iProduct 1 Index of string descriptor (Product) - DESC_STR_SER, // iSerialNumber 1 Index of string descriptor (Serial Number) - DESC_INUMCONFN, // iNumConfigurations 1 Number of possible configuration -}; - - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Configuration descriptor setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// USB Configuration descriptor setting -// Self-powered -// Bit 6 of bmAttributes -// Remote Wakeup -// Bit 5 of bmAttributes -// USB Device maximum power (mA) < 2-512:2> -#define DESC_BMATTR_SELF_POWER (0) -#define DESC_BMATTR_REMOTE_WAKEUP (1) -#define DESC_BMAXPOWER (100) -// - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Configuration Descriptor definition. DO NOT MODIFY. */ -/*----------------------------------------------------------------------------------------------------------*/ -#define DESC_BMATTRIBUTES (0x80 | (DESC_BMATTR_SELF_POWER << 6) | (DESC_BMATTR_REMOTE_WAKEUP << 5)) -#define DESC_TOTAL_LEN DESC_H2B((DESC_LEN_CONFN_T + RETARGET_DLEN)) - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Configuration Descriptor */ -/*----------------------------------------------------------------------------------------------------------*/ -__ALIGN4 static uc8 guUSB_ConfnDesc[] = -{ - /*--------------------------------------------------------------------------------------------------------*/ - /* Configuration descriptor */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_LEN_CONFN, // bLength 1 Size of this descriptor in bytes - DESC_TYPE_02_CONFN, // bDescriptorType 1 CONFIGURATION Descriptor Type - DESC_TOTAL_LEN, // wTotalLength 2 Total length of data returned for this configuration - 0x01 + RETARGET_INF, // bNumberInterface 1 Number of interfaces supported by this configuration - 0x01, // bConfigurationValue 1 Value to use as an argument to the SetConfiguration() - 0x00, // iConfiguration 1 Index of string descriptor describing this configuration - DESC_BMATTRIBUTES, // bmAttributes 1 Configuration characteristics - // D6: Self-powered, D5: RemoteWakeup - DESC_POWER(DESC_BMAXPOWER), // bMaxPower 1 Maximum power consumption of the USB device (2 mA units) - - /*--------------------------------------------------------------------------------------------------------*/ - /* Interface descriptor */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_LEN_INF, // bLength 1 Size of this descriptor in bytes - DESC_TYPE_04_INF, // bDescriptorType 1 INTERFACE Descriptor Type - 0x00, // bInterfaceNumber 1 Number of this interface (Zero-based 0) - 0x00, // bAlternateSetting 1 Value used to select this alternate setting - 2, // bNumEndpoints 1 Number of endpoints used by this interface - CLASS_INF_CLASS, // bInterfaceClass 1 Class code (assigned by USB-IF) - CLASS_INF_SUBCLASS, // bInterfaceSubClass 1 Subclass code (assigned by USB-IF) - CLASS_INF_PTCO, // bInterfaceProtocol 1 Protocol code (assigned by USB) - 0x00, // iInterface 1 Index of string descriptor describing this interface - - /*--------------------------------------------------------------------------------------------------------*/ - /* XXX descriptor */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_LEN_XXX, // bLength 1 Size of this descriptor in bytes - DESC_TYPE_01_XXX, // bDescriptorType 1 XXX Descriptor type - DESC_H2B(0x0110), // bcdXXX 2 XXX Specification Release Number - 0x21, // bCountryCode 1 Country code of the localized hardware - 0x01, // bNumDescriptors 1 Number of class descriptors (at least 1) - DESC_TYPE_02_XXX, // bDescriptorType 1 REPORT Descriptor Type - DESC_H2B(DESC_LEN_XXXX), // bDescriptorLength 2 Total size of the Report descriptor - - /*--------------------------------------------------------------------------------------------------------*/ - /* Endpoint */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_LEN_EPT, // bLength 1 Size of this descriptor in bytes - DESC_TYPE_05_EPT, // bDescriptorType 1 ENDPOINT Descriptor Type - 0x81, // bEndpointAddress 1 The address of the endpoint - // Bit 3..0: The endpoint number - // Bit 6..4: Reserved - // Bit 7 : Direction (0 = Out/1 = In) - 0x03, // bmAttribute 1 Endpoint Attribute - // Bit 1..0: Transfer type - // 00 = Control - // 01 = Isochronous - // 10 = Bulk - // 11 = Interrupt - // All other reserved - DESC_H2B(_EP1LEN), // wMaxPacketSize 2 Maximum packet size - 0x01, // bInterval 1 Interval for polling endpoint - - /*--------------------------------------------------------------------------------------------------------*/ - /* Endpoint */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_LEN_EPT, // bLength 1 Size of this descriptor in bytes - DESC_TYPE_05_EPT, // bDescriptorType 1 ENDPOINT Descriptor Type - 0x02, // bEndpointAddress 1 The address of the endpoint - // Bit 3..0: The endpoint number - // Bit 6..4: Reserved - // Bit 7 : Direction (0 = Out/1 = In) - 0x03, // bmAttribute 1 Endpoint Attribute - // Bit 1..0: Transfer type - // 00 = Control - // 01 = Isochronous - // 10 = Bulk - // 11 = Interrupt - // All other reserved - DESC_H2B(_EP2LEN), // wMaxPacketSize 2 Maximum packet size - 0x01, // bInterval 1 Interval for polling endpoint - - #ifdef RETARGET_IS_USB - #include "ht32_retarget_desc.h" - #endif - -}; - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB String Descriptor */ -/*----------------------------------------------------------------------------------------------------------*/ -__ALIGN4 static uc8 guUSB_StringDescLANGID[] = -{ - /*--------------------------------------------------------------------------------------------------------*/ - /* LANGID (Index = 0) */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_STRLEN(1), // bLength 1 Size of this descriptor in bytes - DESC_TYPE_03_STR, // bDescriptorType 1 STRING Descriptor Type - DESC_H2B(0x0409), // wLANGID[0] 2 LANGID code zero -}; - -#if (DESC_IMANUFACTURE == 1) -__ALIGN4 static uc8 guUSB_StringDescManufacture[] = -{ - /*--------------------------------------------------------------------------------------------------------*/ - /* Manufacture (Index = 1) */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_STRLEN(6), // bLength 1 Size of this descriptor in bytes - DESC_TYPE_03_STR, // bDescriptorType 1 STRING Descriptor Type - DESC_CHAR('H'), // bString N UNICODE encoded string - DESC_CHAR('O'), - DESC_CHAR('L'), - DESC_CHAR('T'), - DESC_CHAR('E'), - DESC_CHAR('K'), -}; -#endif - -#if (DESC_IPRODUCT == 1) -__ALIGN4 static uc8 guUSB_StringDescProduct[] = -{ - /*--------------------------------------------------------------------------------------------------------*/ - /* Product (Index = 2) */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_STRLEN(12), // bLength 1 Size of this descriptor in bytes - DESC_TYPE_03_STR, // bDescriptorType 1 STRING Descriptor Type - DESC_CHAR('U'), // bString N UNICODE encoded string - DESC_CHAR('S'), - DESC_CHAR('B'), - DESC_CHAR('-'), - DESC_CHAR('X'), - DESC_CHAR('X'), - DESC_CHAR('X'), - DESC_CHAR(' '), - DESC_CHAR('D'), - DESC_CHAR('E'), - DESC_CHAR('M'), - DESC_CHAR('O'), -}; -#endif - - -#if (DESC_ISERIALNUM == 1) -__ALIGN4 static u8 guUSB_StringDescSerialNum[] = -{ - /*--------------------------------------------------------------------------------------------------------*/ - /* Serial Number (Index = 3) */ - /*--------------------------------------------------------------------------------------------------------*/ - /* Field Size Description */ - /*----------------------------------------------------------------------------*/ - DESC_STRLEN(12), // bLength 1 Size of this descriptor in bytes - DESC_TYPE_03_STR, // bDescriptorType 1 STRING Descriptor Type - DESC_CHAR('S'), // bString N UNICODE encoded string - DESC_CHAR('N'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), - DESC_CHAR('0'), -}; -#endif - -uc8 *gpStringDesc[DESC_NUM_STRING] = -{ - - guUSB_StringDescLANGID, - - #if (DESC_IMANUFACTURE == 1) - guUSB_StringDescManufacture, - #else - NULL, - #endif - - #if (DESC_IPRODUCT == 1) - guUSB_StringDescProduct, - #else - NULL, - #endif - - #if (DESC_ISERIALNUM == 1) - guUSB_StringDescSerialNum - #else - NULL, - #endif - -}; - -/*********************************************************************************************************//** - * @brief USB Descriptor pointer initialization. - * @param pDesc: pointer of USBDCore_Desc_TypeDef - * @retval None - ***********************************************************************************************************/ -void USBDDesc_Init(USBDCore_Desc_TypeDef *pDesc) -{ - pDesc->pDeviceDesc = guUSB_DeviceDesc; - pDesc->pConfnDesc = guUSB_ConfnDesc; - pDesc->ppStringDesc = gpStringDesc; - pDesc->uStringDescNumber = DESC_NUM_STRING; - - return; -} - - -/** - * @} - */ - -/** - * @} - */ diff --git a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.h b/bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.h deleted file mode 100644 index 1f0dee2e819..00000000000 --- a/bsp/ht32/libraries/usbd_library/example/ht32_usbd_descriptor.h +++ /dev/null @@ -1,59 +0,0 @@ -/*********************************************************************************************************//** - * @file example/ht32_usbd_descriptor.h - * @version $Rev:: 5 $ - * @date $Date:: 2017-05-11 #$ - * @brief The USB descriptor. - ************************************************************************************************************* - * @attention - * - * Firmware Disclaimer Information - * - * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the - * proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and - * other intellectual property laws. - * - * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties - * other than HOLTEK and the customer. - * - * 3. The program technical documentation, including the code, is provided "as is" and for customer reference - * only. After delivery by HOLTEK, the customer shall use the program technical documentation, including - * the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including - * the warranties of merchantability, satisfactory quality and fitness for a particular purpose. - * - *

Copyright (C) Holtek Semiconductor Inc. All rights reserved

- ************************************************************************************************************/ - -/* Define to prevent recursive inclusion -------------------------------------------------------------------*/ -#ifndef __HT32_USBD_DESCRIPTOR_H -#define __HT32_USBD_DESCRIPTOR_H - -/* Includes ------------------------------------------------------------------------------------------------*/ - -/** @addtogroup HT32_USBD_Library HT32 USB Device Library - * @{ - */ - -/** @defgroup USBDDescriptor USB Descriptor - * @brief USB descriptor - * @{ - */ - - -/* Exported constants --------------------------------------------------------------------------------------*/ -#define DESC_LEN_CONFN_T (u16)(DESC_LEN_CONFN + DESC_LEN_INF + DESC_LEN_XXX + DESC_LEN_EPT * 2) - -/* Exported functions --------------------------------------------------------------------------------------*/ -void USBDDesc_Init(USBDCore_Desc_TypeDef *pDesc); - - -/** - * @} - */ - -/** - * @} - */ - -#endif /* __HT32_USBD_DESCRIPTOR_H -------------------------------------------------------------------------*/ diff --git a/bsp/ht32/libraries/usbd_library/example/ht32fxxxxx_usbdconf.h b/bsp/ht32/libraries/usbd_library/example/ht32fxxxxx_usbdconf.h deleted file mode 100644 index 73cdd54b0a0..00000000000 --- a/bsp/ht32/libraries/usbd_library/example/ht32fxxxxx_usbdconf.h +++ /dev/null @@ -1,453 +0,0 @@ -/*********************************************************************************************************//** - * @file example/ht32fxxxxx_usbdconf.h - * @version $Rev:: 5 $ - * @date $Date:: 2017-05-11 #$ - * @brief The configuration file of USB Device Driver. - ************************************************************************************************************* - * @attention - * - * Firmware Disclaimer Information - * - * 1. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, which is supplied by Holtek Semiconductor Inc., (hereinafter referred to as "HOLTEK") is the - * proprietary and confidential intellectual property of HOLTEK, and is protected by copyright law and - * other intellectual property laws. - * - * 2. The customer hereby acknowledges and agrees that the program technical documentation, including the - * code, is confidential information belonging to HOLTEK, and must not be disclosed to any third parties - * other than HOLTEK and the customer. - * - * 3. The program technical documentation, including the code, is provided "as is" and for customer reference - * only. After delivery by HOLTEK, the customer shall use the program technical documentation, including - * the code, at their own risk. HOLTEK disclaims any expressed, implied or statutory warranties, including - * the warranties of merchantability, satisfactory quality and fitness for a particular purpose. - * - *

Copyright (C) Holtek Semiconductor Inc. All rights reserved

- ************************************************************************************************************/ -// <<< Use Configuration Wizard in Context Menu >>> - -/* Define to prevent recursive inclusion -------------------------------------------------------------------*/ -#ifndef __HT32FXXXX_USBDCONF_H -#define __HT32FXXXX_USBDCONF_H - -// Enter Low Power mode when Suspended -#define USBDCORE_ENABLE_LOW_POWER (0) -// - -#if (USBDCORE_ENABLE_LOW_POWER == 1) - #define USBDCore_LowPower() PWRCU_DeepSleep1(PWRCU_SLEEP_ENTRY_WFE) -#else - #define USBDCore_LowPower(...) -#endif - -/*----------------------------------------------------------------------------------------------------------*/ -/* USB Interrupt Enable */ -/*----------------------------------------------------------------------------------------------------------*/ -// USB Interrupt Setting (UIER) -// USB Global Interrupt Enable (UGIE) (Default) -// Start Of Frame Interrupt Enable (SOFIE) -// USB Reset Interrupt Enable (URSTIE) (Default) -// Resume Interrupt Enable (RSMIE) (Default) -// Suspend Interrupt Enable (SUSPIE) (Default) -// Expected Start of Frame Interrupt Enable (ESOFE) -// Control Endpoint Interrupt Enable (EP0IE) (Default) -// Endpoint1 Interrupt Enable (EP1IE) -// Endpoint2 Interrupt Enable (EP2IE) -// Endpoint3 Interrupt Enable (EP3IE) -// Endpoint4 Interrupt Enable (EP4IE) -// Endpoint5 Interrupt Enable (EP5IE) -// Endpoint6 Interrupt Enable (EP6IE) -// Endpoint7 Interrupt Enable (EP7IE) -#define _UIER (0x071D) -// - - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint0 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Control Endpoint0 Configuration -// Endpoint Buffer Length (EPLEN) -// <8=> 8 bytes -// <16=> 16 bytes -// <32=> 32 bytes -// <64=> 64 bytes - /* Maximum: 64 Bytes */ -#define _EP0LEN (64) - - -// Control Endpoint0 Interrupt Enable Settings (EP0IER) -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) (Default) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) (Default) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -// SETUP Token Packet Received Interrupt Enable (STRXIE) -// SETUP Data Packet Received Interrupt Enable (SDRXIE) (Default) -// SETUP Data Error Interrupt Enable (SDERIE) -// Zero Length Data Packet Received Interrupt Enable (ZLRXIE) -#define _EP0_IER (0x212) -// -// - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint1 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint1 Configuration -#define _EP1_ENABLE (1) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP1_CFG_EPADR (1) - -// Endpoint Enable (EPEN) -#define _EP1_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <2=> Bulk -// <3=> Interrupt -#define _EP1_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP1_CFG_EPDIR (1) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-64:4> - /* Maximum: 64 Bytes */ -#define _EP1LEN_TMP (64) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP1_IER (0x10) -// -// - - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint2 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint2 Configuration -#define _EP2_ENABLE (1) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP2_CFG_EPADR (2) - -// Endpoint Enable (EPEN) -#define _EP2_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <2=> Bulk -// <3=> Interrupt -#define _EP2_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP2_CFG_EPDIR (0) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-64:4> - /* Maximum: 64 Bytes */ -#define _EP2LEN_TMP (64) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP2_IER (0x002) -// -// - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint3 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint3 Configuration -#define _EP3_ENABLE (0) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP3_CFG_EPADR (3) - -// Endpoint Enable (EPEN) -#define _EP3_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <2=> Bulk -// <3=> Interrupt -#define _EP3_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP3_CFG_EPDIR (1) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-64:4> - /* Maximum: 64 Bytes */ -#define _EP3LEN_TMP (8) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP3_IER (0x10) -// -// - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint4 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint4 Configuration -#define _EP4_ENABLE (0) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP4_CFG_EPADR (4) - -// Endpoint Enable (EPEN) -#define _EP4_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <1=> Isochronous -// <2=> Bulk -// <3=> Interrupt -#define _EP4_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP4_CFG_EPDIR (0) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-1000:4> - /* Maximum: 1000 Bytes */ -#define _EP4LEN_TMP (8) - -// Single/Double Buffer Selection (SDBS) -// <0=> Single Buffer -// <1=> Double Buffer -#define _EP4_CFG_SDBS (0) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP4_IER (0x02) -// -// - - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint5 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint5 Configuration -#define _EP5_ENABLE (0) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP5_CFG_EPADR (5) - -// Endpoint Enable (EPEN) -#define _EP5_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <1=> Isochronous -// <2=> Bulk -// <3=> Interrupt -#define _EP5_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP5_CFG_EPDIR (1) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-1000:4> - /* Maximum: 1000 Bytes */ -#define _EP5LEN_TMP (8) - - -// Single/Double Buffer Selection (SDBS) -// <0=> Single Buffer -// <1=> Double Buffer -#define _EP5_CFG_SDBS (0) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP5_IER (0x10) -// -// - - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint6 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint6 Configuration -#define _EP6_ENABLE (0) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP6_CFG_EPADR (6) - -// Endpoint Enable (EPEN) -#define _EP6_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <1=> Isochronous -// <2=> Bulk -// <3=> Interrupt -#define _EP6_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP6_CFG_EPDIR (0) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-1000:4> - /* Maximum: 1000 Bytes */ -#define _EP6LEN_TMP (8) - -// Single/Double Buffer Selection (SDBS) -// <0=> Single Buffer -// <1=> Double Buffer -#define _EP6_CFG_SDBS (0) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP6_IER (0x02) -// -// - - -/*----------------------------------------------------------------------------------------------------------*/ -/* Endpoint7 Configuration Setting */ -/*----------------------------------------------------------------------------------------------------------*/ -// Endpoint7 Configuration -#define _EP7_ENABLE (0) - -// Endpoint Address (EPADR) -// <1=> 1 -// <2=> 2 -// <3=> 3 -// <4=> 4 -// <5=> 5 -// <6=> 6 -// <7=> 7 -#define _EP7_CFG_EPADR (7) - -// Endpoint Enable (EPEN) -#define _EP7_CFG_EPEN_TMP (1) - -// Endpoint Transfer Type -// <1=> Isochronous -// <2=> Bulk -// <3=> Interrupt -#define _EP7_TYPR (3) - -// Endpoint Direction (EPDIR) -// <1=> IN -// <0=> OUT -#define _EP7_CFG_EPDIR (1) - -// Endpoint Buffer Length (EPLEN) (in byte) <4-1000:4> - /* Maximum: 1000 Bytes */ -#define _EP7LEN_TMP (8) - -// Single/Double Buffer Selection (SDBS) -// <0=> Single Buffer -// <1=> Double Buffer -#define _EP7_CFG_SDBS (0) - -// Endpoint Interrupt Enable Settings (EPIER) -// Endpoint Interrupt Enable Settings (EPIER) <0x0-0xFF:1> -// OUT Token Packet Received Interrupt Enable (OTRXIE) -// OUT Data Packet Received Interrupt Enable (ODRXIE) -// OUT Data Buffer Overrun Interrupt Enable (ODOVIE) -// IN Token Packet Received Interrupt Enable (ITRXIE) -// IN Data Packet Transmitted Interrupt Enable (IDTXIE) -// NAK Transmitted Interrupt Enable (NAKIE) -// STALL Transmitted Interrupt Enable (STLIE) -// USB Error Interrupt Enable (UERIE) -#define _EP7_IER (0x10) -// -// - -#endif