diff --git a/AT32F403A_407_periph_lib_V2.0.6.chm b/AT32F403A_407_periph_lib_V2.0.7.chm similarity index 70% rename from AT32F403A_407_periph_lib_V2.0.6.chm rename to AT32F403A_407_periph_lib_V2.0.7.chm index 49c3affc..b5114d74 100644 Binary files a/AT32F403A_407_periph_lib_V2.0.6.chm and b/AT32F403A_407_periph_lib_V2.0.7.chm differ diff --git a/document/ReleaseNotes_AT32F403A_407_Firmware_Library.pdf b/document/ReleaseNotes_AT32F403A_407_Firmware_Library.pdf index 71b43a85..96a09959 100644 Binary files a/document/ReleaseNotes_AT32F403A_407_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F403A_407_Firmware_Library.pdf differ diff --git a/libraries/cmsis/cm4/device_support/at32f403a_407.h b/libraries/cmsis/cm4/device_support/at32f403a_407.h index c42bd74e..a79c0121 100644 --- a/libraries/cmsis/cm4/device_support/at32f403a_407.h +++ b/libraries/cmsis/cm4/device_support/at32f403a_407.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 header file ************************************************************************** * Copyright notice & Disclaimer @@ -97,7 +97,7 @@ extern "C" { */ #define __AT32F403A_407_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F403A_407_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */ -#define __AT32F403A_407_LIBRARY_VERSION_MINOR (0x06) /*!< [15:8] minor version */ +#define __AT32F403A_407_LIBRARY_VERSION_MINOR (0x07) /*!< [15:8] minor version */ #define __AT32F403A_407_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F403A_407_LIBRARY_VERSION ((__AT32F403A_407_LIBRARY_VERSION_MAJOR << 24) | \ (__AT32F403A_407_LIBRARY_VERSION_MIDDLE << 16) | \ diff --git a/libraries/cmsis/cm4/device_support/at32f403a_407_conf_template.h b/libraries/cmsis/cm4/device_support/at32f403a_407_conf_template.h index d6a36c9d..d91717ce 100644 --- a/libraries/cmsis/cm4/device_support/at32f403a_407_conf_template.h +++ b/libraries/cmsis/cm4/device_support/at32f403a_407_conf_template.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f403a_407.s b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f403a_407.s index ea75c234..9374dedb 100644 --- a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f403a_407.s +++ b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f403a_407.s @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file startup_at32f403a_407.s - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407xx devices vector table for gcc toolchain. * this module performs: * - set the initial sp diff --git a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f403a_407.s b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f403a_407.s index d79be32e..90391f27 100644 --- a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f403a_407.s +++ b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f403a_407.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.6 -;* @date 2021-12-31 +;* @version v2.0.7 +;* @date 2022-02-11 ;* @brief at32f403a_407 startup file for IAR Systems ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f403a_407.s b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f403a_407.s index c2fa6bb3..5aac7b72 100644 --- a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f403a_407.s +++ b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f403a_407.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.6 -;* @date 2021-12-31 +;* @version v2.0.7 +;* @date 2022-02-11 ;* @brief at32f403a_407 startup file for keil ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/system_at32f403a_407.c b/libraries/cmsis/cm4/device_support/system_at32f403a_407.c index 5beb4e9a..92ffc618 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f403a_407.c +++ b/libraries/cmsis/cm4/device_support/system_at32f403a_407.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f403a_407.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for cmsis cortex-m4 system source file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/system_at32f403a_407.h b/libraries/cmsis/cm4/device_support/system_at32f403a_407.h index 6bfe119f..9430f8df 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f403a_407.h +++ b/libraries/cmsis/cm4/device_support/system_at32f403a_407.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f403a_407.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief cmsis cortex-m4 system header file. ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_acc.h b/libraries/drivers/inc/at32f403a_407_acc.h index 35d19509..e296de11 100644 --- a/libraries/drivers/inc/at32f403a_407_acc.h +++ b/libraries/drivers/inc/at32f403a_407_acc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_acc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 acc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_adc.h b/libraries/drivers/inc/at32f403a_407_adc.h index 44a1f599..3a1c2353 100644 --- a/libraries/drivers/inc/at32f403a_407_adc.h +++ b/libraries/drivers/inc/at32f403a_407_adc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_adc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 adc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_bpr.h b/libraries/drivers/inc/at32f403a_407_bpr.h index a2dbb020..00f08c3b 100644 --- a/libraries/drivers/inc/at32f403a_407_bpr.h +++ b/libraries/drivers/inc/at32f403a_407_bpr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_bpr.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 bpr header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_can.h b/libraries/drivers/inc/at32f403a_407_can.h index 4610edc9..f207dc20 100644 --- a/libraries/drivers/inc/at32f403a_407_can.h +++ b/libraries/drivers/inc/at32f403a_407_can.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_can.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 can header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_crc.h b/libraries/drivers/inc/at32f403a_407_crc.h index 66c36be5..e505ae3f 100644 --- a/libraries/drivers/inc/at32f403a_407_crc.h +++ b/libraries/drivers/inc/at32f403a_407_crc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_crc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 crc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_crm.h b/libraries/drivers/inc/at32f403a_407_crm.h index cc97f5f5..3a172703 100644 --- a/libraries/drivers/inc/at32f403a_407_crm.h +++ b/libraries/drivers/inc/at32f403a_407_crm.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_crm.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 crm header file ************************************************************************** * Copyright notice & Disclaimer @@ -57,6 +57,7 @@ extern "C" { #define CRM_PLL_STABLE_FLAG MAKE_VALUE(0x00, 25) /*!< phase locking loop stable flag */ #define CRM_LEXT_STABLE_FLAG MAKE_VALUE(0x20, 1) /*!< low speed external crystal stable flag */ #define CRM_LICK_STABLE_FLAG MAKE_VALUE(0x24, 1) /*!< low speed internal clock stable flag */ +#define CRM_ALL_RESET_FLAG MAKE_VALUE(0x24, 24) /*!< all reset flag */ #define CRM_NRST_RESET_FLAG MAKE_VALUE(0x24, 26) /*!< nrst pin reset flag */ #define CRM_POR_RESET_FLAG MAKE_VALUE(0x24, 27) /*!< power on reset flag */ #define CRM_SW_RESET_FLAG MAKE_VALUE(0x24, 28) /*!< software reset flag */ diff --git a/libraries/drivers/inc/at32f403a_407_dac.h b/libraries/drivers/inc/at32f403a_407_dac.h index db2dceb7..415ba9e9 100644 --- a/libraries/drivers/inc/at32f403a_407_dac.h +++ b/libraries/drivers/inc/at32f403a_407_dac.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_dac.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 dac header file ************************************************************************** * Copyright notice & Disclaimer @@ -344,7 +344,7 @@ void dac_reset(void); void dac_enable(dac_select_type dac_select, confirm_state new_state); void dac_output_buffer_enable(dac_select_type dac_select, confirm_state new_state); void dac_trigger_enable(dac_select_type dac_select, confirm_state new_state); -void dac_trigger_select(dac_select_type dac_select, dac_trigger_type dac_trigger_select); +void dac_trigger_select(dac_select_type dac_select, dac_trigger_type dac_trigger_source); void dac_software_trigger_generate(dac_select_type dac_select); void dac_dual_software_trigger_generate(void); void dac_wave_generate(dac_select_type dac_select, dac_wave_type dac_wave); diff --git a/libraries/drivers/inc/at32f403a_407_debug.h b/libraries/drivers/inc/at32f403a_407_debug.h index 46f3cb6e..49f360d6 100644 --- a/libraries/drivers/inc/at32f403a_407_debug.h +++ b/libraries/drivers/inc/at32f403a_407_debug.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_debug.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 debug header file ************************************************************************** * Copyright notice & Disclaimer @@ -121,18 +121,18 @@ typedef struct __IO uint32_t can1_pause : 1;/* [14] */ __IO uint32_t i2c1_smbus_timeout : 1;/* [15] */ __IO uint32_t i2c2_smbus_timeout : 1;/* [16] */ - __IO uint32_t tim8_pause : 1;/* [17] */ - __IO uint32_t tim5_pause : 1;/* [18] */ - __IO uint32_t tim6_pause : 1;/* [19] */ - __IO uint32_t tim7_pause : 1;/* [20] */ + __IO uint32_t tmr8_pause : 1;/* [17] */ + __IO uint32_t tmr5_pause : 1;/* [18] */ + __IO uint32_t tmr6_pause : 1;/* [19] */ + __IO uint32_t tmr7_pause : 1;/* [20] */ __IO uint32_t can2_pause : 1;/* [21] */ __IO uint32_t reserved2 : 3;/* [24:22] */ - __IO uint32_t tim12_pause : 1;/* [25] */ - __IO uint32_t tim13_pause : 1;/* [26] */ - __IO uint32_t tim14_pause : 1;/* [27] */ - __IO uint32_t tim9_pause : 1;/* [28] */ - __IO uint32_t tim10_pause : 1;/* [29] */ - __IO uint32_t tim11_pause : 1;/* [30] */ + __IO uint32_t tmr12_pause : 1;/* [25] */ + __IO uint32_t tmr13_pause : 1;/* [26] */ + __IO uint32_t tmr14_pause : 1;/* [27] */ + __IO uint32_t tmr9_pause : 1;/* [28] */ + __IO uint32_t tmr10_pause : 1;/* [29] */ + __IO uint32_t tmr11_pause : 1;/* [30] */ __IO uint32_t i2c3_smbus_timeout : 1;/* [31] */ } ctrl_bit; }; diff --git a/libraries/drivers/inc/at32f403a_407_def.h b/libraries/drivers/inc/at32f403a_407_def.h index 02420137..c21dee44 100644 --- a/libraries/drivers/inc/at32f403a_407_def.h +++ b/libraries/drivers/inc/at32f403a_407_def.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_def.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 macros header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_dma.h b/libraries/drivers/inc/at32f403a_407_dma.h index 44c3b3e6..70210e15 100644 --- a/libraries/drivers/inc/at32f403a_407_dma.h +++ b/libraries/drivers/inc/at32f403a_407_dma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_dma.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 dma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_emac.h b/libraries/drivers/inc/at32f403a_407_emac.h index 1d8cbf5f..388c4958 100644 --- a/libraries/drivers/inc/at32f403a_407_emac.h +++ b/libraries/drivers/inc/at32f403a_407_emac.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_emac.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 emac header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_exint.h b/libraries/drivers/inc/at32f403a_407_exint.h index 154aca67..e34555d5 100644 --- a/libraries/drivers/inc/at32f403a_407_exint.h +++ b/libraries/drivers/inc/at32f403a_407_exint.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_exint.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 exint header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_flash.h b/libraries/drivers/inc/at32f403a_407_flash.h index dcb841d1..d356476f 100644 --- a/libraries/drivers/inc/at32f403a_407_flash.h +++ b/libraries/drivers/inc/at32f403a_407_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_flash.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_gpio.h b/libraries/drivers/inc/at32f403a_407_gpio.h index 77735ef5..3df0b6c7 100644 --- a/libraries/drivers/inc/at32f403a_407_gpio.h +++ b/libraries/drivers/inc/at32f403a_407_gpio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_gpio.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 gpio header file ************************************************************************** * Copyright notice & Disclaimer @@ -259,7 +259,7 @@ extern "C" { #define SWJTAG_GMUX_100 IOMUX_MAKE_VALUE(0x30, 16, 3, 0x04) /*!< full swj disabled (jtag-dp + sw-dp) */ #define PD01_GMUX IOMUX_MAKE_VALUE(0x30, 20, 1, 0x01) /*!< pd0/pd1 mapping on osc_in/osc_out */ #define XMC_GMUX_001 IOMUX_MAKE_VALUE(0x30, 24, 3, 0x01) /*!< xmc_nwe(pd2), xmc_d0(pb14), xmc_d1(pc6), xmc_d2(pc11), xmc_d3(pc12), xmc_d4(pa2), xmc_d5(pa3), xmc_d6(pa4), xmc_d7(pa5), xmc_d13(pb12), xmc_noe(pc5) */ -#define XMC_GMUX_010 IOMUX_MAKE_VALUE(0x30, 24, 3, 0x02) /*!< xmc_nwe(pd2), xmc_d0(pb14), xmc_d1(pc6), xmc_d2(pc11), xmc_d3(pc12), xmc_d4(pa2), xmc_d5(pa3), xmc_d6(pa4), xmc_d7(pa5), xmc_d13(pb12), xmc_noe(pc5) */ +#define XMC_GMUX_010 IOMUX_MAKE_VALUE(0x30, 24, 3, 0x02) /*!< xmc_nwe(pc2), xmc_d0(pb14), xmc_d1(pc6), xmc_d2(pc11), xmc_d3(pc12), xmc_d4(pa2), xmc_d5(pa3), xmc_d6(pa4), xmc_d7(pa5), xmc_d13(pb12), xmc_noe(pc5) */ #define XMC_NADV_GMUX IOMUX_MAKE_VALUE(0x30, 27, 1, 0x01) /*!< xmc_nadv not used */ /** diff --git a/libraries/drivers/inc/at32f403a_407_i2c.h b/libraries/drivers/inc/at32f403a_407_i2c.h index 90ef8474..59d9fa43 100644 --- a/libraries/drivers/inc/at32f403a_407_i2c.h +++ b/libraries/drivers/inc/at32f403a_407_i2c.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_i2c.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 i2c header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_misc.h b/libraries/drivers/inc/at32f403a_407_misc.h index 05ebe800..3d06bbe4 100644 --- a/libraries/drivers/inc/at32f403a_407_misc.h +++ b/libraries/drivers/inc/at32f403a_407_misc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_misc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 misc header file ************************************************************************** * Copyright notice & Disclaimer @@ -99,8 +99,8 @@ typedef enum */ void nvic_system_reset(void); -void nvic_irq_enable(uint32_t irqn, uint32_t preempt_priority, uint32_t sub_priority); -void nvic_irq_disable(uint32_t irqn); +void nvic_irq_enable(IRQn_Type irqn, uint32_t preempt_priority, uint32_t sub_priority); +void nvic_irq_disable(IRQn_Type irqn); void nvic_priority_group_config(nvic_priority_group_type priority_group); void nvic_vector_table_set(uint32_t base, uint32_t offset); void nvic_lowpower_mode_config(nvic_lowpower_mode_type lp_mode, confirm_state new_state); diff --git a/libraries/drivers/inc/at32f403a_407_pwc.h b/libraries/drivers/inc/at32f403a_407_pwc.h index cc587cfd..888c0f16 100644 --- a/libraries/drivers/inc/at32f403a_407_pwc.h +++ b/libraries/drivers/inc/at32f403a_407_pwc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_pwc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 pwc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_rtc.h b/libraries/drivers/inc/at32f403a_407_rtc.h index b013c716..03be2f50 100644 --- a/libraries/drivers/inc/at32f403a_407_rtc.h +++ b/libraries/drivers/inc/at32f403a_407_rtc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_rtc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 rtc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_sdio.h b/libraries/drivers/inc/at32f403a_407_sdio.h index 39243614..e81eb47e 100644 --- a/libraries/drivers/inc/at32f403a_407_sdio.h +++ b/libraries/drivers/inc/at32f403a_407_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_sdio.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 sdio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_spi.h b/libraries/drivers/inc/at32f403a_407_spi.h index e2094f91..d890c9e6 100644 --- a/libraries/drivers/inc/at32f403a_407_spi.h +++ b/libraries/drivers/inc/at32f403a_407_spi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_spi.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 spi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_tmr.h b/libraries/drivers/inc/at32f403a_407_tmr.h index de706492..83bc9199 100644 --- a/libraries/drivers/inc/at32f403a_407_tmr.h +++ b/libraries/drivers/inc/at32f403a_407_tmr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_tmr.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 tmr header file ************************************************************************** * Copyright notice & Disclaimer @@ -174,8 +174,8 @@ typedef enum TMR_OUTPUT_CONTROL_HIGH = 0x01, /*!< tmr output control mode high */ TMR_OUTPUT_CONTROL_LOW = 0x02, /*!< tmr output control mode low */ TMR_OUTPUT_CONTROL_SWITCH = 0x03, /*!< tmr output control mode switch */ - TMR_OUTPUT_CONTROL_FORCE_HIGH = 0x04, /*!< tmr output control mode force high */ - TMR_OUTPUT_CONTROL_FORCE_LOW = 0x05, /*!< tmr output control mode force low */ + TMR_OUTPUT_CONTROL_FORCE_LOW = 0x04, /*!< tmr output control mode force low */ + TMR_OUTPUT_CONTROL_FORCE_HIGH = 0x05, /*!< tmr output control mode force high */ TMR_OUTPUT_CONTROL_PWM_MODE_A = 0x06, /*!< tmr output control mode pwm a */ TMR_OUTPUT_CONTROL_PWM_MODE_B = 0x07 /*!< tmr output control mode pwm b */ } tmr_output_control_mode_type; diff --git a/libraries/drivers/inc/at32f403a_407_usart.h b/libraries/drivers/inc/at32f403a_407_usart.h index 5cbcefa0..1eefa7e1 100644 --- a/libraries/drivers/inc/at32f403a_407_usart.h +++ b/libraries/drivers/inc/at32f403a_407_usart.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_usart.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 usart header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_usb.h b/libraries/drivers/inc/at32f403a_407_usb.h index cc00c792..c1b5462b 100644 --- a/libraries/drivers/inc/at32f403a_407_usb.h +++ b/libraries/drivers/inc/at32f403a_407_usb.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_usb.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_wdt.h b/libraries/drivers/inc/at32f403a_407_wdt.h index 8a3f29aa..090174bd 100644 --- a/libraries/drivers/inc/at32f403a_407_wdt.h +++ b/libraries/drivers/inc/at32f403a_407_wdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_wdt.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 wdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_wwdt.h b/libraries/drivers/inc/at32f403a_407_wwdt.h index a6cf132a..380008c0 100644 --- a/libraries/drivers/inc/at32f403a_407_wwdt.h +++ b/libraries/drivers/inc/at32f403a_407_wwdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_wwdt.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 wwdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f403a_407_xmc.h b/libraries/drivers/inc/at32f403a_407_xmc.h index b273fedd..c42d3939 100644 --- a/libraries/drivers/inc/at32f403a_407_xmc.h +++ b/libraries/drivers/inc/at32f403a_407_xmc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_xmc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 xmc header file ************************************************************************** * Copyright notice & Disclaimer @@ -402,7 +402,7 @@ typedef struct /** * @brief xmc bank1 reserved register, offset:0x120~0x21C */ - __IO uint32_t reserved2[64]; + __IO uint32_t reserved2[63]; /** * @brief xmc bank1 ext register, offset:0x220~0x22C diff --git a/libraries/drivers/src/at32f403a_407_acc.c b/libraries/drivers/src/at32f403a_407_acc.c index 322ed8d1..b1f4ab87 100644 --- a/libraries/drivers/src/at32f403a_407_acc.c +++ b/libraries/drivers/src/at32f403a_407_acc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_acc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the acc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_adc.c b/libraries/drivers/src/at32f403a_407_adc.c index a5065545..21a03b8f 100644 --- a/libraries/drivers/src/at32f403a_407_adc.c +++ b/libraries/drivers/src/at32f403a_407_adc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_adc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the adc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_bpr.c b/libraries/drivers/src/at32f403a_407_bpr.c index e80fb185..f90e0c6f 100644 --- a/libraries/drivers/src/at32f403a_407_bpr.c +++ b/libraries/drivers/src/at32f403a_407_bpr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_bpr.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the bpr firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_can.c b/libraries/drivers/src/at32f403a_407_can.c index 5f55719e..07b47797 100644 --- a/libraries/drivers/src/at32f403a_407_can.c +++ b/libraries/drivers/src/at32f403a_407_can.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_can.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the can firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_crc.c b/libraries/drivers/src/at32f403a_407_crc.c index a5f94e67..42233af5 100644 --- a/libraries/drivers/src/at32f403a_407_crc.c +++ b/libraries/drivers/src/at32f403a_407_crc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_crc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the crc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_crm.c b/libraries/drivers/src/at32f403a_407_crm.c index bf42baf8..36c99772 100644 --- a/libraries/drivers/src/at32f403a_407_crm.c +++ b/libraries/drivers/src/at32f403a_407_crm.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_crm.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the crm firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -326,6 +326,7 @@ void crm_clock_source_enable(crm_clock_source_type source, confirm_state new_sta * - CRM_WDT_RESET_FLAG * - CRM_WWDT_RESET_FLAG * - CRM_LOWPOWER_RESET_FLAG + * - CRM_ALL_RESET_FLAG * interrupt flag: * - CRM_LICK_READY_INT_FLAG * - CRM_LEXT_READY_INT_FLAG @@ -345,6 +346,7 @@ void crm_flag_clear(uint32_t flag) case CRM_WDT_RESET_FLAG: case CRM_WWDT_RESET_FLAG: case CRM_LOWPOWER_RESET_FLAG: + case CRM_ALL_RESET_FLAG: CRM->ctrlsts_bit.rstfc = TRUE; break; case CRM_LICK_READY_INT_FLAG: diff --git a/libraries/drivers/src/at32f403a_407_dac.c b/libraries/drivers/src/at32f403a_407_dac.c index 374b95b7..8bd7c601 100644 --- a/libraries/drivers/src/at32f403a_407_dac.c +++ b/libraries/drivers/src/at32f403a_407_dac.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_dac.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the dac firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -131,7 +131,7 @@ void dac_trigger_enable(dac_select_type dac_select, confirm_state new_state) * this parameter can be one of the following values: * - DAC1_SELECT * - DAC2_SELECT - * @param dac_trigger_select + * @param dac_trigger_source * this parameter can be one of the following values: * - DAC_TMR6_TRGOUT_EVENT * - DAC_TMR8_TRGOUT_EVENT @@ -143,15 +143,15 @@ void dac_trigger_enable(dac_select_type dac_select, confirm_state new_state) * - DAC_SOFTWARE_TRIGGER * @retval none */ -void dac_trigger_select(dac_select_type dac_select, dac_trigger_type dac_trigger_select) +void dac_trigger_select(dac_select_type dac_select, dac_trigger_type dac_trigger_source) { switch(dac_select) { case DAC1_SELECT: - DAC->ctrl_bit.d1trgsel = dac_trigger_select; + DAC->ctrl_bit.d1trgsel = dac_trigger_source; break; case DAC2_SELECT: - DAC->ctrl_bit.d2trgsel = dac_trigger_select; + DAC->ctrl_bit.d2trgsel = dac_trigger_source; break; default: break; diff --git a/libraries/drivers/src/at32f403a_407_debug.c b/libraries/drivers/src/at32f403a_407_debug.c index a0ee8c4c..4686908e 100644 --- a/libraries/drivers/src/at32f403a_407_debug.c +++ b/libraries/drivers/src/at32f403a_407_debug.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_debug.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the debug firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_dma.c b/libraries/drivers/src/at32f403a_407_dma.c index 606ec8c7..3ca759e9 100644 --- a/libraries/drivers/src/at32f403a_407_dma.c +++ b/libraries/drivers/src/at32f403a_407_dma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_dma.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the dma firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_emac.c b/libraries/drivers/src/at32f403a_407_emac.c index 99115d07..dfc10468 100644 --- a/libraries/drivers/src/at32f403a_407_emac.c +++ b/libraries/drivers/src/at32f403a_407_emac.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_emac.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the emac firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_exint.c b/libraries/drivers/src/at32f403a_407_exint.c index 539f4412..1464cbfb 100644 --- a/libraries/drivers/src/at32f403a_407_exint.c +++ b/libraries/drivers/src/at32f403a_407_exint.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_exint.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the exint firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_flash.c b/libraries/drivers/src/at32f403a_407_flash.c index 2c1da6a5..fee89a82 100644 --- a/libraries/drivers/src/at32f403a_407_flash.c +++ b/libraries/drivers/src/at32f403a_407_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_flash.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the flash firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_gpio.c b/libraries/drivers/src/at32f403a_407_gpio.c index ed6cff3b..a9407249 100644 --- a/libraries/drivers/src/at32f403a_407_gpio.c +++ b/libraries/drivers/src/at32f403a_407_gpio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_gpio.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the gpio firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_i2c.c b/libraries/drivers/src/at32f403a_407_i2c.c index 295f40c6..69214fbe 100644 --- a/libraries/drivers/src/at32f403a_407_i2c.c +++ b/libraries/drivers/src/at32f403a_407_i2c.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_i2c.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the i2c firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_misc.c b/libraries/drivers/src/at32f403a_407_misc.c index 528fdad6..525f7251 100644 --- a/libraries/drivers/src/at32f403a_407_misc.c +++ b/libraries/drivers/src/at32f403a_407_misc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_misc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the misc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -61,16 +61,16 @@ void nvic_system_reset(void) * @param sub_priority: subpriority value (starting from 0) * @retval none */ -void nvic_irq_enable(uint32_t irqn, uint32_t preempt_priority, uint32_t sub_priority) +void nvic_irq_enable(IRQn_Type irqn, uint32_t preempt_priority, uint32_t sub_priority) { uint32_t temp_priority = 0; /* encode priority */ temp_priority = NVIC_EncodePriority(NVIC_GetPriorityGrouping(), preempt_priority, sub_priority); /* set priority */ - NVIC_SetPriority((IRQn_Type)irqn, temp_priority); + NVIC_SetPriority(irqn, temp_priority); /* enable irqn */ - NVIC_EnableIRQ((IRQn_Type)irqn); + NVIC_EnableIRQ(irqn); } /** @@ -78,9 +78,9 @@ void nvic_irq_enable(uint32_t irqn, uint32_t preempt_priority, uint32_t sub_prio * @param irqn (IRQn_Type number) * @retval none */ -void nvic_irq_disable(uint32_t irqn) +void nvic_irq_disable(IRQn_Type irqn) { - NVIC_DisableIRQ((IRQn_Type)irqn); + NVIC_DisableIRQ(irqn); } /** diff --git a/libraries/drivers/src/at32f403a_407_pwc.c b/libraries/drivers/src/at32f403a_407_pwc.c index 4f52c64a..b259a739 100644 --- a/libraries/drivers/src/at32f403a_407_pwc.c +++ b/libraries/drivers/src/at32f403a_407_pwc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_pwc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the pwc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_rtc.c b/libraries/drivers/src/at32f403a_407_rtc.c index 446cc9eb..ffb7c9be 100644 --- a/libraries/drivers/src/at32f403a_407_rtc.c +++ b/libraries/drivers/src/at32f403a_407_rtc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_rtc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the rtc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_sdio.c b/libraries/drivers/src/at32f403a_407_sdio.c index 90d1f33b..77a56e48 100644 --- a/libraries/drivers/src/at32f403a_407_sdio.c +++ b/libraries/drivers/src/at32f403a_407_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_sdio.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the sdio firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_spi.c b/libraries/drivers/src/at32f403a_407_spi.c index b27d4d5d..de23ab2b 100644 --- a/libraries/drivers/src/at32f403a_407_spi.c +++ b/libraries/drivers/src/at32f403a_407_spi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_spi.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the spi firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_tmr.c b/libraries/drivers/src/at32f403a_407_tmr.c index 15a12c18..52429d59 100644 --- a/libraries/drivers/src/at32f403a_407_tmr.c +++ b/libraries/drivers/src/at32f403a_407_tmr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_tmr.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the tmr firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_usart.c b/libraries/drivers/src/at32f403a_407_usart.c index 2c0ac9ac..6d33c6bf 100644 --- a/libraries/drivers/src/at32f403a_407_usart.c +++ b/libraries/drivers/src/at32f403a_407_usart.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_usart.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the usart firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_usb.c b/libraries/drivers/src/at32f403a_407_usb.c index 95da9d84..0420f5a9 100644 --- a/libraries/drivers/src/at32f403a_407_usb.c +++ b/libraries/drivers/src/at32f403a_407_usb.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_usb.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_wdt.c b/libraries/drivers/src/at32f403a_407_wdt.c index c3989c5c..cc157b40 100644 --- a/libraries/drivers/src/at32f403a_407_wdt.c +++ b/libraries/drivers/src/at32f403a_407_wdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_wdt.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the wdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_wwdt.c b/libraries/drivers/src/at32f403a_407_wwdt.c index c8edc7fc..3545a28d 100644 --- a/libraries/drivers/src/at32f403a_407_wwdt.c +++ b/libraries/drivers/src/at32f403a_407_wwdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_wwdt.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the wwdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f403a_407_xmc.c b/libraries/drivers/src/at32f403a_407_xmc.c index 9111678e..488ae0f2 100644 --- a/libraries/drivers/src/at32f403a_407_xmc.c +++ b/libraries/drivers/src/at32f403a_407_xmc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_xmc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief contains all the functions for the xmc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/i2c_application_library/i2c_application.c b/middlewares/i2c_application_library/i2c_application.c index 923ed923..d9353810 100644 --- a/middlewares/i2c_application_library/i2c_application.c +++ b/middlewares/i2c_application_library/i2c_application.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file i2c_application.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief the driver library of the i2c peripheral ************************************************************************** * Copyright notice & Disclaimer @@ -94,6 +94,16 @@ #define I2C_START 0 #define I2C_END 1 +/** + * @brief initializes peripherals used by the i2c. + * @param none + * @retval none + */ +__WEAK void i2c_lowlevel_init(i2c_handle_type* hi2c) +{ + +} + /** * @brief i2c peripheral initialization. * @param hi2c: the handle points to the operation information. @@ -1290,13 +1300,13 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui * @brief write data to the memory device through polling mode. * @param hi2c: the handle points to the operation information. * @param address: memory device address. - * @param memaddress: memory address. + * @param mem_address: memory address. * @param pdata: data buffer. * @param size: data size. * @param timeout: maximum waiting time. * @retval i2c status. */ -i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout) +i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout) { /* initialization parameters */ hi2c->pbuff = pdata; @@ -1335,7 +1345,7 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 } /* send memory address */ - i2c_data_send(hi2c->i2cx, memaddress); + i2c_data_send(hi2c->i2cx, mem_address); while(size > 0) { @@ -1372,13 +1382,13 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 * @brief read data from memory device through polling mode. * @param hi2c: the handle points to the operation information. * @param address: memory device address. - * @param memaddress: memory address. + * @param mem_address: memory address. * @param pdata: data buffer. * @param size: data size. * @param timeout: maximum waiting time. * @retval i2c status. */ -i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout) +i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout) { /* initialization parameters */ hi2c->pbuff = pdata; @@ -1420,7 +1430,7 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ } /* send memory address */ - i2c_data_send(hi2c->i2cx, memaddress); + i2c_data_send(hi2c->i2cx, mem_address); /* wait for the tdbe falg to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) @@ -1578,13 +1588,13 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ * @brief write data to the memory device through interrupt mode. * @param hi2c: the handle points to the operation information. * @param address: memory device address. - * @param memaddress: memory address. + * @param mem_address: memory address. * @param pdata: data buffer. * @param size: data size. * @param timeout: maximum waiting time. * @retval i2c status. */ -i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout) +i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout) { /* initialization parameters */ hi2c->mode = I2C_INT_MA_TX; @@ -1627,7 +1637,7 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui } /* send memory address */ - i2c_data_send(hi2c->i2cx, memaddress); + i2c_data_send(hi2c->i2cx, mem_address); /* wait for the tdbe falg to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) @@ -1648,13 +1658,13 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui * @brief read data from memory device through interrupt mode. * @param hi2c: the handle points to the operation information. * @param address: memory device address. - * @param memaddress: memory address. + * @param mem_address: memory address. * @param pdata: data buffer. * @param size: data size. * @param timeout: maximum waiting time. * @retval i2c status. */ -i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout) +i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout) { /* initialization parameters */ hi2c->mode = I2C_INT_MA_RX; @@ -1697,7 +1707,7 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin } /* send memory address */ - i2c_data_send(hi2c->i2cx, memaddress); + i2c_data_send(hi2c->i2cx, mem_address); /* wait for the tdbe falg to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) @@ -1758,13 +1768,13 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin * @brief write data to the memory device through dma mode. * @param hi2c: the handle points to the operation information. * @param address: memory device address. - * @param memaddress: memory address. + * @param mem_address: memory address. * @param pdata: data buffer. * @param size: data size. * @param timeout: maximum waiting time. * @retval i2c status. */ -i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout) +i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout) { /* initialization parameters */ hi2c->mode = I2C_DMA_MA_TX; @@ -1813,7 +1823,7 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui } /* send memory address */ - i2c_data_send(hi2c->i2cx, memaddress); + i2c_data_send(hi2c->i2cx, mem_address); /* wait for the tdbe falg to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) @@ -1834,13 +1844,13 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui * @brief read data from memory device through polling mode. * @param hi2c: the handle points to the operation information. * @param address: memory device address. - * @param memaddress: memory address. + * @param mem_address: memory address. * @param pdata: data buffer. * @param size: data size. * @param timeout: maximum waiting time. * @retval i2c status. */ -i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout) +i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout) { /* initialization parameters */ hi2c->mode = I2C_DMA_MA_RX; @@ -1892,7 +1902,7 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin } /* send memory address */ - i2c_data_send(hi2c->i2cx, memaddress); + i2c_data_send(hi2c->i2cx, mem_address); /* wait for the tdbe falg to be set */ if(i2c_wait_flag(hi2c, I2C_TDBE_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) diff --git a/middlewares/i2c_application_library/i2c_application.h b/middlewares/i2c_application_library/i2c_application.h index 1e41d1d0..e3efe1f1 100644 --- a/middlewares/i2c_application_library/i2c_application.h +++ b/middlewares/i2c_application_library/i2c_application.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file i2c_application.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief i2c application libray header file ************************************************************************** * Copyright notice & Disclaimer @@ -135,7 +135,9 @@ typedef struct void i2c_config (i2c_handle_type* hi2c); void i2c_lowlevel_init (i2c_handle_type* hi2c); +void i2c_reset_ctrl2_register (i2c_handle_type* hi2c); i2c_status_type i2c_wait_end (i2c_handle_type* hi2c, uint32_t timeout); +i2c_status_type i2c_wait_flag (i2c_handle_type* hi2c, uint32_t flag, flag_status status, uint32_t event_check, uint32_t timeout); i2c_status_type i2c_master_transmit (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout); i2c_status_type i2c_master_receive (i2c_handle_type* hi2c, uint16_t address, uint8_t* pdata, uint16_t size, uint32_t timeout); @@ -152,12 +154,12 @@ i2c_status_type i2c_master_receive_dma (i2c_handle_type* hi2c, uint16_t addre i2c_status_type i2c_slave_transmit_dma (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout); i2c_status_type i2c_slave_receive_dma (i2c_handle_type* hi2c, uint8_t* pdata, uint16_t size, uint32_t timeout); -i2c_status_type i2c_memory_write (i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout); -i2c_status_type i2c_memory_write_int (i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout); -i2c_status_type i2c_memory_write_dma (i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout); -i2c_status_type i2c_memory_read (i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout); -i2c_status_type i2c_memory_read_int (i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout); -i2c_status_type i2c_memory_read_dma (i2c_handle_type* hi2c, uint16_t address, uint16_t memaddress, uint8_t* pdata, uint16_t size, uint32_t timeout); +i2c_status_type i2c_memory_write (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout); +i2c_status_type i2c_memory_write_int (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout); +i2c_status_type i2c_memory_write_dma (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout); +i2c_status_type i2c_memory_read (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout); +i2c_status_type i2c_memory_read_int (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout); +i2c_status_type i2c_memory_read_dma (i2c_handle_type* hi2c, uint16_t address, uint16_t mem_address, uint8_t* pdata, uint16_t size, uint32_t timeout); void i2c_evt_irq_handler (i2c_handle_type* hi2c); void i2c_err_irq_handler (i2c_handle_type* hi2c); diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c index 16abe646..cc314624 100644 --- a/middlewares/usbd_class/audio/audio_class.c +++ b/middlewares/usbd_class/audio/audio_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer @@ -41,25 +41,25 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -void audio_req_get_cur(void *udev, usb_setup_type *setup); -void audio_req_set_cur(void *udev, usb_setup_type *setup); -void audio_req_get_min(void *udev, usb_setup_type *setup); -void audio_req_get_max(void *udev, usb_setup_type *setup); -void audio_req_get_res(void *udev, usb_setup_type *setup); -void audio_get_interface(void *udev, usb_setup_type *setup); -void audio_set_interface(void *udev, usb_setup_type *setup); +static void audio_req_get_cur(void *udev, usb_setup_type *setup); +static void audio_req_set_cur(void *udev, usb_setup_type *setup); +static void audio_req_get_min(void *udev, usb_setup_type *setup); +static void audio_req_get_max(void *udev, usb_setup_type *setup); +static void audio_req_get_res(void *udev, usb_setup_type *setup); +static void audio_get_interface(void *udev, usb_setup_type *setup); +static void audio_set_interface(void *udev, usb_setup_type *setup); -usb_audio_type audio_struct = {0, 0, 0, 0, 0, 0x1400, 0, 0, 0, {0x0000, 0x1400, 0x33}, {0x0000, 0x1400, 0x33}}; +usb_audio_type audio_struct = {0, 0, 0, 0, 0, 0x1400, 0, 0, 0, {0x0000, 0x1400, 0x33}, {0x0000, 0x1400, 0x33}, 0, 0}; /* usb device class handler */ usbd_class_handler audio_class_handler = @@ -73,6 +73,7 @@ usbd_class_handler audio_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &audio_struct }; /** @@ -80,11 +81,11 @@ usbd_class_handler audio_class_handler = * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; /* enable microphone in endpoint double buffer mode */ usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_MIC_IN_EPT); @@ -104,7 +105,7 @@ usb_sts_type class_init_handler(void *udev) usbd_ept_open(pudev, USBD_AUDIO_FEEDBACK_EPT, EPT_ISO_TYPE, AUDIO_FEEDBACK_MAXPACKET_SIZE); /* start receive speaker out data */ - usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, paudio->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); return status; } @@ -114,7 +115,7 @@ usb_sts_type class_init_handler(void *udev) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -137,7 +138,7 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -181,8 +182,9 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if((setup->wValue >> 8) == AUDIO_DESCRIPTOR_TYPE) { + usbd_desc_t *config = pudev->desc_handler->get_device_configuration(); len = MIN(AUDIO_DESCRIPTOR_SIZE, setup->wLength); - usbd_ctrl_send(pudev, g_usbd_configuration+18, len); + usbd_ctrl_send(pudev, config->descriptor + 18, len); } else { @@ -215,7 +217,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -229,60 +231,61 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( audio_struct.audio_cmd == AUDIO_REQ_SET_CUR) + if( paudio->audio_cmd == AUDIO_REQ_SET_CUR) { /* class process */ - switch(audio_struct.request_no) + switch( paudio->request_no) { case AUDIO_VOLUME_CONTROL: - if(audio_struct.interface == AUDIO_SPK_FEATURE_UNIT_ID) + if( paudio->interface == AUDIO_SPK_FEATURE_UNIT_ID) { - audio_struct.spk_volume = (uint16_t)(audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8)); + paudio->spk_volume = (uint16_t)( paudio->g_audio_cur[0] | + ( paudio->g_audio_cur[1] << 8)); /* set volume */ - audio_codec_set_spk_volume(audio_struct.spk_volume*100/audio_struct.spk_volume_limits[1]); + audio_codec_set_spk_volume(paudio->spk_volume*100/paudio->spk_volume_limits[1]); } else { - audio_struct.mic_volume = (uint16_t)(audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8)); + paudio->mic_volume = (uint16_t)(paudio->g_audio_cur[0] | + (paudio->g_audio_cur[1] << 8)); - audio_codec_set_mic_volume(audio_struct.mic_volume*256/audio_struct.mic_volume_limits[1]); + audio_codec_set_mic_volume(paudio->mic_volume*256/paudio->mic_volume_limits[1]); } break; case AUDIO_MUTE_CONTROL: - if(audio_struct.interface == AUDIO_SPK_FEATURE_UNIT_ID) + if(paudio->interface == AUDIO_SPK_FEATURE_UNIT_ID) { - audio_struct.spk_mute = audio_struct.g_audio_cur[0]; - audio_codec_set_spk_mute(audio_struct.spk_mute); + paudio->spk_mute = paudio->g_audio_cur[0]; + audio_codec_set_spk_mute(paudio->spk_mute); } else { - audio_struct.mic_mute = audio_struct.g_audio_cur[0]; - audio_codec_set_mic_mute(audio_struct.mic_mute); + paudio->mic_mute = paudio->g_audio_cur[0]; + audio_codec_set_mic_mute(paudio->mic_mute); } break; case AUDIO_FREQ_SET_CONTROL: - if(audio_struct.enpd == USBD_AUDIO_MIC_IN_EPT) + if(paudio->enpd == USBD_AUDIO_MIC_IN_EPT) { - audio_struct.mic_freq = (audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8) | - (audio_struct.g_audio_cur[2] << 16)); - audio_codec_set_mic_freq(audio_struct.mic_freq); + paudio->mic_freq = (paudio->g_audio_cur[0] | + (paudio->g_audio_cur[1] << 8) | + (paudio->g_audio_cur[2] << 16)); + audio_codec_set_mic_freq(paudio->mic_freq); } else { - audio_struct.spk_freq = (audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8) | - (audio_struct.g_audio_cur[2] << 16)); - audio_codec_set_spk_freq(audio_struct.spk_freq); + paudio->spk_freq = (paudio->g_audio_cur[0] | + (paudio->g_audio_cur[1] << 8) | + (paudio->g_audio_cur[2] << 16)); + audio_codec_set_spk_freq(paudio->spk_freq); } break; default: @@ -299,9 +302,11 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; uint32_t len = 0; /* ...user code... @@ -309,14 +314,14 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) */ if((ept_num & 0x7F) == (USBD_AUDIO_MIC_IN_EPT & 0x7F)) { - len = audio_codec_mic_get_data(audio_struct.audio_mic_data); - usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + len = audio_codec_mic_get_data(paudio->audio_mic_data); + usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, paudio->audio_mic_data, len); } else if((ept_num & 0x7F) == (USBD_AUDIO_FEEDBACK_EPT & 0x7F)) { - len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_send(udev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + len = audio_codec_spk_feedback(paudio->audio_feed_back); + usbd_ept_send(udev, USBD_AUDIO_FEEDBACK_EPT, paudio->audio_feed_back, len); } return status; @@ -328,10 +333,11 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; uint16_t g_rxlen; /* get endpoint receive data length */ @@ -340,10 +346,10 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) if((ept_num & 0x7F) == (USBD_AUDIO_SPK_OUT_EPT & 0x7F)) { /* speaker data*/ - audio_codec_spk_fifo_write(audio_struct.audio_spk_data, g_rxlen); + audio_codec_spk_fifo_write(paudio->audio_spk_data, g_rxlen); /* get next data */ - usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, paudio->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); } return status; @@ -354,7 +360,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -372,6 +378,8 @@ usb_sts_type class_sof_handler(void *udev) usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; switch(event) { case USBD_RESET_EVENT: @@ -380,10 +388,10 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) break; case USBD_SUSPEND_EVENT: - audio_struct.spk_alt_setting = 0; - audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); - audio_struct.mic_alt_setting = 0; - audio_codec_mic_alt_setting(audio_struct.spk_alt_setting); + paudio->spk_alt_setting = 0; + audio_codec_spk_alt_setting(paudio->spk_alt_setting); + paudio->mic_alt_setting = 0; + audio_codec_mic_alt_setting(paudio->spk_alt_setting); /* ...user code... */ break; @@ -403,33 +411,34 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param setup: setup class * @retval none */ -void audio_req_get_cur(void *udev, usb_setup_type *setup) +static void audio_req_get_cur(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - audio_struct.g_audio_cur[0] = audio_struct.spk_mute; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + paudio->g_audio_cur[0] = paudio->spk_mute; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } } else { if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - audio_struct.g_audio_cur[0] = audio_struct.mic_mute; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + paudio->g_audio_cur[0] = paudio->mic_mute; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } } @@ -441,32 +450,33 @@ void audio_req_get_cur(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_set_cur(void *udev, usb_setup_type *setup) +static void audio_req_set_cur(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(setup->wLength > 0) { - usbd_ctrl_recv(pudev, audio_struct.g_audio_cur, setup->wLength); + usbd_ctrl_recv(pudev, paudio->g_audio_cur, setup->wLength); - audio_struct.audio_cmd = AUDIO_REQ_SET_CUR; - audio_struct.audio_cmd_len = setup->wLength; + paudio->audio_cmd = AUDIO_REQ_SET_CUR; + paudio->audio_cmd_len = setup->wLength; switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK) { case AUDIO_REQ_CONTROL_INTERFACE: - audio_struct.interface = HBYTE(setup->wIndex); + paudio->interface = HBYTE(setup->wIndex); if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - audio_struct.request_no = AUDIO_MUTE_CONTROL; + paudio->request_no = AUDIO_MUTE_CONTROL; } else { - audio_struct.request_no = AUDIO_VOLUME_CONTROL; + paudio->request_no = AUDIO_VOLUME_CONTROL; } break; case AUDIO_REQ_CONTROL_ENDPOINT: - audio_struct.enpd = setup->wIndex; - audio_struct.request_no = AUDIO_FREQ_SET_CONTROL; + paudio->enpd = setup->wIndex; + paudio->request_no = AUDIO_FREQ_SET_CONTROL; break; default: break; @@ -480,18 +490,19 @@ void audio_req_set_cur(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_get_min(void *udev, usb_setup_type *setup) +static void audio_req_get_min(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[0]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[0]; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[0]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[0]; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } } @@ -501,18 +512,19 @@ void audio_req_get_min(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_get_max(void *udev, usb_setup_type *setup) +static void audio_req_get_max(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[1]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[1]; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[1]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[1]; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } } @@ -522,18 +534,19 @@ void audio_req_get_max(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_get_res(void *udev, usb_setup_type *setup) +static void audio_req_get_res(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[2]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->spk_volume_limits[2]; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[2]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio->g_audio_cur) = paudio->mic_volume_limits[2]; + usbd_ctrl_send(pudev, paudio->g_audio_cur, setup->wLength); } } @@ -543,30 +556,31 @@ void audio_req_get_res(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_set_interface(void *udev, usb_setup_type *setup) +static void audio_set_interface(void *udev, usb_setup_type *setup) { uint32_t len; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(LBYTE(setup->wIndex) == AUDIO_SPK_INTERFACE_NUMBER) { - audio_struct.spk_alt_setting = setup->wValue; - audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); - if(audio_struct.spk_alt_setting ) + paudio->spk_alt_setting = setup->wValue; + audio_codec_spk_alt_setting(paudio->spk_alt_setting); + if(paudio->spk_alt_setting ) { - int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + int len = audio_codec_spk_feedback(paudio->audio_feed_back); + usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, paudio->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, paudio->audio_feed_back, len); } } else if(LBYTE(setup->wIndex) == AUDIO_MIC_INTERFACE_NUMBER) { - audio_struct.mic_alt_setting = setup->wValue; - audio_codec_mic_alt_setting(audio_struct.mic_alt_setting); - if(audio_struct.mic_alt_setting) + paudio->mic_alt_setting = setup->wValue; + audio_codec_mic_alt_setting(paudio->mic_alt_setting); + if(paudio->mic_alt_setting) { - len = audio_codec_mic_get_data(audio_struct.audio_mic_data); - usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + len = audio_codec_mic_get_data(paudio->audio_mic_data); + usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, paudio->audio_mic_data, len); } } @@ -579,15 +593,17 @@ void audio_set_interface(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_get_interface(void *udev, usb_setup_type *setup) +static void audio_get_interface(void *udev, usb_setup_type *setup) { + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; if(LBYTE(setup->wIndex) == AUDIO_SPK_INTERFACE_NUMBER) { - usbd_ctrl_send((usbd_core_type *)udev, (uint8_t *)&audio_struct.spk_alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio->spk_alt_setting, 1); } else if(LBYTE(setup->wIndex) == AUDIO_MIC_INTERFACE_NUMBER) { - usbd_ctrl_send((usbd_core_type *)udev, (uint8_t *)&audio_struct.mic_alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio->mic_alt_setting, 1); } } diff --git a/middlewares/usbd_class/audio/audio_class.h b/middlewares/usbd_class/audio/audio_class.h index 270c5c85..18980b64 100644 --- a/middlewares/usbd_class/audio/audio_class.h +++ b/middlewares/usbd_class/audio/audio_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_conf.h b/middlewares/usbd_class/audio/audio_conf.h index d1965b68..9718b73d 100644 --- a/middlewares/usbd_class/audio/audio_conf.h +++ b/middlewares/usbd_class/audio/audio_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio config ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_desc.c b/middlewares/usbd_class/audio/audio_desc.c index b3ac2ec5..75fabbb2 100644 --- a/middlewares/usbd_class/audio/audio_desc.c +++ b/middlewares/usbd_class/audio/audio_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -40,20 +40,18 @@ /** @defgroup USB_audio_desc_private_functions * @{ */ +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); - -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); - -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -81,7 +79,7 @@ usbd_desc_handler audio_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -91,10 +89,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_AUDIO_VENDOR_ID), /* idVendor */ + HBYTE(USBD_AUDIO_VENDOR_ID), /* idVendor */ + LBYTE(USBD_AUDIO_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_AUDIO_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -109,12 +107,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_AUDIO_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_AUDIO_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_AUDIO_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x1 + AUDIO_INTERFACE_NUM, /* bNumInterfaces: n interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -135,8 +133,8 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x08+AUDIO_INTERFACE_NUM, /* bLength: size of this descriptor, in bytes 8+n */ AUDIO_CS_INTERFACE, /* bDescriptorType: cs interface descriptor type */ AUDIO_AC_HEADER, /* bDescriptorSubtype: Header function Descriptor*/ - LBYTE(BCD_NUM), - HBYTE(BCD_NUM), /* bcdCDC: audio device class specification release number */ + LBYTE(AUDIO_BCD_NUM), + HBYTE(AUDIO_BCD_NUM), /* bcdCDC: audio device class specification release number */ LBYTE(AUDIO_INTERFACE_LEN), HBYTE(AUDIO_INTERFACE_LEN), /* wTotalLength: total number of bytes returned for the class-specific audio control interface */ AUDIO_INTERFACE_NUM, /* bInClollection: the number of audio streaming */ @@ -280,7 +278,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_EPT_DESC_ISO | USB_ETP_DESC_ASYNC, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_MIC_IN_MAXPACKET_SIZE), HBYTE(AUDIO_MIC_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + AUDIO_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ 0x00, /* bRefresh: unused */ 0x00, /* bSynchAddress: unused */ @@ -344,7 +342,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_EPT_DESC_ISO | USB_ETP_DESC_ASYNC, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_SPK_OUT_MAXPACKET_SIZE), HBYTE(AUDIO_SPK_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + AUDIO_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ 0x00, /* bRefresh: unused */ #if (AUDIO_SUPPORT_FEEDBACK == 1) USBD_AUDIO_FEEDBACK_EPT, /* bSynchAddress: feedback endpoint */ @@ -367,7 +365,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x11, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ HBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - 1, /* bInterval: interval for polling endpoint for data transfers */ + 1, /* bInterval: interval for polling endpoint for data transfers */ FEEDBACK_REFRESH_TIME, /* bRefresh: this field indicates the rate at which an iso syncronization pipe provides new syncronization feedback data. this rate must be a power of 2, therefore only the power is reported back and the range of this field is from @@ -384,9 +382,9 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_AUDIO_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_AUDIO_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -398,42 +396,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_AUDIO_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_AUDIO_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_AUDIO_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_AUDIO_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_AUDIO_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -441,7 +439,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -515,7 +513,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -525,7 +523,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -535,7 +533,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -545,7 +543,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -555,7 +553,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -566,9 +564,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUDIO_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -578,9 +576,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUDIO_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -590,7 +588,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -601,9 +599,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUDIO_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -613,9 +611,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUDIO_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/audio/audio_desc.h b/middlewares/usbd_class/audio/audio_desc.h index b0f7fddb..9e1f63d8 100644 --- a/middlewares/usbd_class/audio/audio_desc.h +++ b/middlewares/usbd_class/audio/audio_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -48,18 +48,18 @@ extern "C" { * @{ */ -#define BCD_NUM 0x0100 +#define AUDIO_BCD_NUM 0x0100 -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5730 +#define USBD_AUDIO_VENDOR_ID 0x2E3C +#define USBD_AUDIO_PRODUCT_ID 0x5730 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_AUDIO_SIZ_STRING_LANGID 4 +#define USBD_AUDIO_SIZ_STRING_SERIAL 0x1A -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "AT32 Audio" -#define USBD_DESC_CONFIGURATION_STRING "Audio Config" -#define USBD_DESC_INTERFACE_STRING "Audio Interface" +#define USBD_AUDIO_DESC_MANUFACTURER_STRING "Artery" +#define USBD_AUDIO_DESC_PRODUCT_STRING "AT32 Audio" +#define USBD_AUDIO_DESC_CONFIGURATION_STRING "Audio Config" +#define USBD_AUDIO_DESC_INTERFACE_STRING "Audio Interface" /** * @brief audio interface subclass codes @@ -202,10 +202,10 @@ extern "C" { #define AUDIO_SPK_CHR AUDIO_SPK_CHANEL_NUM #define AUDIO_SPK_BITW (AUDIO_SPK_DEFAULT_BITW) -#define HID_BINTERVAL_TIME 0x01 +#define AUDIO_BINTERVAL_TIME 0x01 -#define USBD_CONFIG_DESC_SIZE ( 0x12 + AUDIO_INTERFACE_LEN + \ +#define USBD_AUDIO_CONFIG_DESC_SIZE ( 0x12 + AUDIO_INTERFACE_LEN + \ + (0x31 + AUDIO_SPK_FREQ_SIZE * 3) \ + (0x31 + AUDIO_MIC_FREQ_SIZE * 3) \ + (9 * AUDIO_SUPPORT_FEEDBACK) \ @@ -216,8 +216,6 @@ extern "C" { #define MCU_ID2 (0x1FFFF7EC) #define MCU_ID3 (0x1FFFF7F0) -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; extern usbd_desc_handler audio_desc_handler; /** diff --git a/middlewares/usbd_class/audio_hid/audio_conf.h b/middlewares/usbd_class/audio_hid/audio_conf.h index fee47672..47cae800 100644 --- a/middlewares/usbd_class/audio_hid/audio_conf.h +++ b/middlewares/usbd_class/audio_hid/audio_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio config ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.c b/middlewares/usbd_class/audio_hid/audio_hid_class.c index 4ee1f2f8..7ee13567 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_class.c +++ b/middlewares/usbd_class/audio_hid/audio_hid_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer @@ -41,38 +41,26 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -void audio_req_get_cur(void *udev, usb_setup_type *setup); -void audio_req_set_cur(void *udev, usb_setup_type *setup); -void audio_req_get_min(void *udev, usb_setup_type *setup); -void audio_req_get_max(void *udev, usb_setup_type *setup); -void audio_req_get_res(void *udev, usb_setup_type *setup); -void audio_get_interface(void *udev, usb_setup_type *setup); -void audio_set_interface(void *udev, usb_setup_type *setup); -void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len); -/* usb hid rx and tx buffer */ -static uint8_t g_rxhid_buff[USBD_OUT_MAXPACKET_SIZE]; -static uint8_t g_txhid_buff[USBD_IN_MAXPACKET_SIZE]; +static void audio_req_get_cur(void *udev, usb_setup_type *setup); +static void audio_req_set_cur(void *udev, usb_setup_type *setup); +static void audio_req_get_min(void *udev, usb_setup_type *setup); +static void audio_req_get_max(void *udev, usb_setup_type *setup); +static void audio_req_get_res(void *udev, usb_setup_type *setup); +static void audio_get_interface(void *udev, usb_setup_type *setup); +static void audio_set_interface(void *udev, usb_setup_type *setup); +static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len); +usb_audio_hid_type audio_hid_struct = {0, 0, 0, 0, 0, 0x1400, 0, 0, 0, {0x0000, 0x1400, 0x33}, {0x0000, 0x1400, 0x33}, 0, 0}; -usb_audio_type audio_struct = {0, 0, 0, 0, 0, 0x1400, 0, 0, 0, {0x0000, 0x1400, 0x33}, {0x0000, 0x1400, 0x33}}; -/* custom hid static variable */ -static uint32_t hid_protocol = 0; -static uint32_t hid_set_idle = 0; -static uint32_t alt_setting = 0; -static uint8_t hid_state; -uint8_t hid_set_report[64]; -static __IO uint16_t audio_feedback_state = 0; -static __IO uint8_t audio_spk_out_stage = 0; -/* usb device class handler */ usbd_class_handler audio_hid_class_handler = { class_init_handler, @@ -84,6 +72,7 @@ usbd_class_handler audio_hid_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &audio_hid_struct }; /** @@ -91,42 +80,42 @@ usbd_class_handler audio_hid_class_handler = * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; /* enable microphone in endpoint double buffer mode */ - usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_MIC_IN_EPT); + usbd_ept_dbuffer_enable(pudev, USBD_AUHID_AUDIO_MIC_IN_EPT); /* open microphone in endpoint */ - usbd_ept_open(pudev, USBD_AUDIO_MIC_IN_EPT, EPT_ISO_TYPE, AUDIO_MIC_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_AUHID_AUDIO_MIC_IN_EPT, EPT_ISO_TYPE, AUDIO_MIC_IN_MAXPACKET_SIZE); /* enable speaker out endpoint double buffer mode */ - usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_SPK_OUT_EPT); + usbd_ept_dbuffer_enable(pudev, USBD_AUHID_AUDIO_SPK_OUT_EPT); /* open speaker out endpoint */ - usbd_ept_open(pudev, USBD_AUDIO_SPK_OUT_EPT, EPT_ISO_TYPE, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_AUHID_AUDIO_SPK_OUT_EPT, EPT_ISO_TYPE, AUDIO_SPK_OUT_MAXPACKET_SIZE); #if AUDIO_SUPPORT_FEEDBACK /* enable speaker feedback endpoint double buffer mode */ - usbd_ept_dbuffer_enable(pudev, USBD_AUDIO_FEEDBACK_EPT); + usbd_ept_dbuffer_enable(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT); /* open speaker feedback endpoint */ - usbd_ept_open(pudev, USBD_AUDIO_FEEDBACK_EPT, EPT_ISO_TYPE, AUDIO_FEEDBACK_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT, EPT_ISO_TYPE, AUDIO_FEEDBACK_MAXPACKET_SIZE); #endif /* start receive speaker out data */ - usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_AUHID_AUDIO_SPK_OUT_EPT, paudio_hid->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); /*open hid endpoint */ /* open custom hid in endpoint */ - usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_AUHID_HID_IN_EPT, EPT_INT_TYPE, USBD_AUHID_IN_MAXPACKET_SIZE); /* open custom hid out endpoint */ - usbd_ept_open(pudev, USBD_HID_OUT_EPT, EPT_INT_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_AUHID_HID_OUT_EPT, EPT_INT_TYPE, USBD_AUHID_OUT_MAXPACKET_SIZE); /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_AUHID_HID_OUT_EPT, paudio_hid->g_rxhid_buff, USBD_AUHID_OUT_MAXPACKET_SIZE); return status; } @@ -136,27 +125,27 @@ usb_sts_type class_init_handler(void *udev) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; /* close in endpoint */ - usbd_ept_close(pudev, USBD_AUDIO_MIC_IN_EPT); + usbd_ept_close(pudev, USBD_AUHID_AUDIO_MIC_IN_EPT); #if AUDIO_SUPPORT_FEEDBACK /* close in endpoint */ - usbd_ept_close(pudev, USBD_AUDIO_FEEDBACK_EPT); + usbd_ept_close(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT); #endif /* close out endpoint */ - usbd_ept_close(pudev, USBD_AUDIO_SPK_OUT_EPT); + usbd_ept_close(pudev, USBD_AUHID_AUDIO_SPK_OUT_EPT); /* close custom hid in endpoint */ - usbd_ept_close(pudev, USBD_HID_IN_EPT); + usbd_ept_close(pudev, USBD_AUHID_HID_IN_EPT); /* close custom hid out endpoint */ - usbd_ept_close(pudev, USBD_HID_OUT_EPT); + usbd_ept_close(pudev, USBD_AUHID_HID_OUT_EPT); return status; } @@ -211,8 +200,9 @@ usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if((setup->wValue >> 8) == AUDIO_DESCRIPTOR_TYPE) { + usbd_desc_t *config = pudev->desc_handler->get_device_configuration(); len = MIN(AUDIO_DESCRIPTOR_SIZE, setup->wLength); - usbd_ctrl_send(pudev, g_usbd_configuration+18, len); + usbd_ctrl_send(pudev, config->descriptor + 18, len); } else { @@ -251,6 +241,7 @@ usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -261,20 +252,20 @@ usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case HID_REQ_SET_PROTOCOL: - hid_protocol = (uint8_t)setup->wValue; + paudio_hid->hid_protocol = (uint8_t)setup->wValue; break; case HID_REQ_GET_PROTOCOL: - usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->hid_protocol, 1); break; case HID_REQ_SET_IDLE: - hid_set_idle = (uint8_t)(setup->wValue >> 8); + paudio_hid->hid_set_idle = (uint8_t)(setup->wValue >> 8); break; case HID_REQ_GET_IDLE: - usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->hid_set_idle, 1); break; case HID_REQ_SET_REPORT: - hid_state = HID_REQ_SET_REPORT; - usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + paudio_hid->hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, paudio_hid->hid_set_report, setup->wLength); break; default: usbd_ctrl_unsupport(pudev); @@ -288,21 +279,21 @@ usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if(setup->wValue >> 8 == HID_REPORT_DESC) { - len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); - buf = (uint8_t *)g_usbd_hid_report; + len = MIN(USBD_AUHID_HID_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_audio_hid_report; } else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) { len = MIN(9, setup->wLength); - buf = (uint8_t *)g_hid_usb_desc; + buf = (uint8_t *)g_audio_hid_usb_desc; } usbd_ctrl_send(pudev, (uint8_t *)buf, len); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + paudio_hid->alt_setting = setup->wValue; break; default: break; @@ -365,74 +356,75 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; usb_setup_type *setup = &pudev->setup; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ if(setup->wIndex == HID_INTERFACE_NUMBER) { - if( hid_state == HID_REQ_SET_REPORT) + if( paudio_hid->hid_state == HID_REQ_SET_REPORT) { /* hid buffer process */ - usb_hid_buf_process(udev, hid_set_report, recv_len); - hid_state = 0; + usb_hid_buf_process(udev, paudio_hid->hid_set_report, recv_len); + paudio_hid->hid_state = 0; } } else { /* ...user code... */ - if( audio_struct.audio_cmd == AUDIO_REQ_SET_CUR) + if( paudio_hid->audio_cmd == AUDIO_REQ_SET_CUR) { /* class process */ - switch(audio_struct.request_no) + switch(paudio_hid->request_no) { case AUDIO_VOLUME_CONTROL: - if(audio_struct.interface == AUDIO_SPK_FEATURE_UNIT_ID) + if(paudio_hid->interface == AUDIO_SPK_FEATURE_UNIT_ID) { - audio_struct.spk_volume = (uint16_t)(audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8)); + paudio_hid->spk_volume = (uint16_t)(paudio_hid->g_audio_cur[0] | + (paudio_hid->g_audio_cur[1] << 8)); /* set volume */ - audio_codec_set_spk_volume(audio_struct.spk_volume*100/audio_struct.spk_volume_limits[1]); + audio_codec_set_spk_volume(paudio_hid->spk_volume*100/paudio_hid->spk_volume_limits[1]); } else { - audio_struct.mic_volume = (uint16_t)(audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8)); + paudio_hid->mic_volume = (uint16_t)(paudio_hid->g_audio_cur[0] | + (paudio_hid->g_audio_cur[1] << 8)); - audio_codec_set_mic_volume(audio_struct.mic_volume*256/audio_struct.mic_volume_limits[1]); + audio_codec_set_mic_volume(paudio_hid->mic_volume*256/paudio_hid->mic_volume_limits[1]); } break; case AUDIO_MUTE_CONTROL: - if(audio_struct.interface == AUDIO_SPK_FEATURE_UNIT_ID) + if(paudio_hid->interface == AUDIO_SPK_FEATURE_UNIT_ID) { - audio_struct.spk_mute = audio_struct.g_audio_cur[0]; - audio_codec_set_spk_mute(audio_struct.spk_mute); + paudio_hid->spk_mute = paudio_hid->g_audio_cur[0]; + audio_codec_set_spk_mute(paudio_hid->spk_mute); } else { - audio_struct.mic_mute = audio_struct.g_audio_cur[0]; - audio_codec_set_mic_mute(audio_struct.mic_mute); + paudio_hid->mic_mute = paudio_hid->g_audio_cur[0]; + audio_codec_set_mic_mute(paudio_hid->mic_mute); } break; case AUDIO_FREQ_SET_CONTROL: - if(audio_struct.enpd == USBD_AUDIO_MIC_IN_EPT) + if(paudio_hid->enpd == USBD_AUHID_AUDIO_MIC_IN_EPT) { - audio_struct.mic_freq = (audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8) | - (audio_struct.g_audio_cur[2] << 16)); - audio_codec_set_mic_freq(audio_struct.mic_freq); + paudio_hid->mic_freq = (paudio_hid->g_audio_cur[0] | + (paudio_hid->g_audio_cur[1] << 8) | + (paudio_hid->g_audio_cur[2] << 16)); + audio_codec_set_mic_freq(paudio_hid->mic_freq); } else { - audio_struct.spk_freq = (audio_struct.g_audio_cur[0] | - (audio_struct.g_audio_cur[1] << 8) | - (audio_struct.g_audio_cur[2] << 16)); - audio_codec_set_spk_freq(audio_struct.spk_freq); + paudio_hid->spk_freq = (paudio_hid->g_audio_cur[0] | + (paudio_hid->g_audio_cur[1] << 8) | + (paudio_hid->g_audio_cur[2] << 16)); + audio_codec_set_spk_freq(paudio_hid->spk_freq); } break; default: @@ -453,24 +445,26 @@ usb_sts_type class_ept0_rx_handler(void *udev) usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; uint32_t len = 0; /* ...user code... trans next packet data */ - if((ept_num & 0x7F) == (USBD_AUDIO_MIC_IN_EPT & 0x7F)) + if((ept_num & 0x7F) == (USBD_AUHID_AUDIO_MIC_IN_EPT & 0x7F)) { - len = audio_codec_mic_get_data(audio_struct.audio_mic_data); - usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + len = audio_codec_mic_get_data(paudio_hid->audio_mic_data); + usbd_ept_send(udev, USBD_AUHID_AUDIO_MIC_IN_EPT, paudio_hid->audio_mic_data, len); } #if AUDIO_SUPPORT_FEEDBACK - else if((ept_num & 0x7F) == (USBD_AUDIO_FEEDBACK_EPT & 0x7F)) + else if((ept_num & 0x7F) == (USBD_AUHID_AUDIO_FEEDBACK_EPT & 0x7F)) { - len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_send(udev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + len = audio_codec_spk_feedback(paudio_hid->audio_feed_back); + usbd_ept_send(udev, USBD_AUHID_AUDIO_FEEDBACK_EPT, paudio_hid->audio_feed_back, len); } #endif - else if((ept_num & 0x7F) == (USBD_HID_IN_EPT & 0x7F)) + else if((ept_num & 0x7F) == (USBD_AUHID_HID_IN_EPT & 0x7F)) { } @@ -484,30 +478,31 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; uint16_t g_rxlen; /* get endpoint receive data length */ g_rxlen = usbd_get_recv_len(pudev, ept_num); - if((ept_num & 0x7F) == (USBD_AUDIO_SPK_OUT_EPT & 0x7F)) + if((ept_num & 0x7F) == (USBD_AUHID_AUDIO_SPK_OUT_EPT & 0x7F)) { /* speaker data*/ - audio_codec_spk_fifo_write(audio_struct.audio_spk_data, g_rxlen); + audio_codec_spk_fifo_write(paudio_hid->audio_spk_data, g_rxlen); /* get next data */ - usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_AUHID_AUDIO_SPK_OUT_EPT, paudio_hid->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); } - else if((ept_num & 0x7F) == (USBD_HID_OUT_EPT & 0x7F)) + else if((ept_num & 0x7F) == (USBD_AUHID_HID_OUT_EPT & 0x7F)) { /* hid buffer process */ - usb_hid_buf_process(udev, g_rxhid_buff, g_rxlen); + usb_hid_buf_process(udev, paudio_hid->g_rxhid_buff, g_rxlen); /* start receive next packet */ - usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_AUHID_HID_OUT_EPT, paudio_hid->g_rxhid_buff, USBD_AUHID_OUT_MAXPACKET_SIZE); } return status; } @@ -517,7 +512,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -532,9 +527,11 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; switch(event) { case USBD_RESET_EVENT: @@ -543,10 +540,10 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) break; case USBD_SUSPEND_EVENT: - audio_struct.spk_alt_setting = 0; - audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); - audio_struct.mic_alt_setting = 0; - audio_codec_mic_alt_setting(audio_struct.spk_alt_setting); + paudio_hid->spk_alt_setting = 0; + audio_codec_spk_alt_setting(paudio_hid->spk_alt_setting); + paudio_hid->mic_alt_setting = 0; + audio_codec_mic_alt_setting(paudio_hid->spk_alt_setting); /* ...user code... */ break; @@ -566,33 +563,34 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param setup: setup class * @retval none */ -void audio_req_get_cur(void *udev, usb_setup_type *setup) +static void audio_req_get_cur(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - audio_struct.g_audio_cur[0] = audio_struct.spk_mute; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + paudio_hid->g_audio_cur[0] = paudio_hid->spk_mute; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } } else { if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - audio_struct.g_audio_cur[0] = audio_struct.mic_mute; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + paudio_hid->g_audio_cur[0] = paudio_hid->mic_mute; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } } @@ -604,32 +602,33 @@ void audio_req_get_cur(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_set_cur(void *udev, usb_setup_type *setup) +static void audio_req_set_cur(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(setup->wLength > 0) { - usbd_ctrl_recv(pudev, audio_struct.g_audio_cur, setup->wLength); + usbd_ctrl_recv(pudev, paudio_hid->g_audio_cur, setup->wLength); - audio_struct.audio_cmd = AUDIO_REQ_SET_CUR; - audio_struct.audio_cmd_len = setup->wLength; + paudio_hid->audio_cmd = AUDIO_REQ_SET_CUR; + paudio_hid->audio_cmd_len = setup->wLength; switch(setup->bmRequestType & AUDIO_REQ_CONTROL_MASK) { case AUDIO_REQ_CONTROL_INTERFACE: - audio_struct.interface = HBYTE(setup->wIndex); + paudio_hid->interface = HBYTE(setup->wIndex); if(HBYTE(setup->wValue) == AUDIO_MUTE_CONTROL) { - audio_struct.request_no = AUDIO_MUTE_CONTROL; + paudio_hid->request_no = AUDIO_MUTE_CONTROL; } else { - audio_struct.request_no = AUDIO_VOLUME_CONTROL; + paudio_hid->request_no = AUDIO_VOLUME_CONTROL; } break; case AUDIO_REQ_CONTROL_ENDPOINT: - audio_struct.enpd = setup->wIndex; - audio_struct.request_no = AUDIO_FREQ_SET_CONTROL; + paudio_hid->enpd = setup->wIndex; + paudio_hid->request_no = AUDIO_FREQ_SET_CONTROL; break; default: break; @@ -643,18 +642,19 @@ void audio_req_set_cur(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_get_min(void *udev, usb_setup_type *setup) +static void audio_req_get_min(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[0]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[0]; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[0]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[0]; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } } @@ -664,18 +664,19 @@ void audio_req_get_min(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_get_max(void *udev, usb_setup_type *setup) +static void audio_req_get_max(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[1]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[1]; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[1]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[1]; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } } @@ -685,18 +686,19 @@ void audio_req_get_max(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_req_get_res(void *udev, usb_setup_type *setup) +static void audio_req_get_res(void *udev, usb_setup_type *setup) { usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(HBYTE(setup->wIndex) == AUDIO_SPK_FEATURE_UNIT_ID) { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.spk_volume_limits[2]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->spk_volume_limits[2]; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } else { - *((uint16_t *)audio_struct.g_audio_cur) = audio_struct.mic_volume_limits[2]; - usbd_ctrl_send(pudev, audio_struct.g_audio_cur, setup->wLength); + *((uint16_t *)paudio_hid->g_audio_cur) = paudio_hid->mic_volume_limits[2]; + usbd_ctrl_send(pudev, paudio_hid->g_audio_cur, setup->wLength); } } @@ -706,30 +708,31 @@ void audio_req_get_res(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_set_interface(void *udev, usb_setup_type *setup) +static void audio_set_interface(void *udev, usb_setup_type *setup) { uint32_t len; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(LBYTE(setup->wIndex) == AUDIO_SPK_INTERFACE_NUMBER) { - audio_struct.spk_alt_setting = setup->wValue; - audio_codec_spk_alt_setting(audio_struct.spk_alt_setting); - if(audio_struct.spk_alt_setting ) + paudio_hid->spk_alt_setting = setup->wValue; + audio_codec_spk_alt_setting(paudio_hid->spk_alt_setting); + if(paudio_hid->spk_alt_setting ) { - int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_recv(pudev, USBD_AUDIO_SPK_OUT_EPT, audio_struct.audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); + int len = audio_codec_spk_feedback(paudio_hid->audio_feed_back); + usbd_ept_recv(pudev, USBD_AUHID_AUDIO_SPK_OUT_EPT, paudio_hid->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); + usbd_ept_send(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT, paudio_hid->audio_feed_back, len); } } else if(LBYTE(setup->wIndex) == AUDIO_MIC_INTERFACE_NUMBER) { - audio_struct.mic_alt_setting = setup->wValue; - audio_codec_mic_alt_setting(audio_struct.mic_alt_setting); - if(audio_struct.mic_alt_setting) + paudio_hid->mic_alt_setting = setup->wValue; + audio_codec_mic_alt_setting(paudio_hid->mic_alt_setting); + if(paudio_hid->mic_alt_setting) { - len = audio_codec_mic_get_data(audio_struct.audio_mic_data); - usbd_ept_send(pudev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + len = audio_codec_mic_get_data(paudio_hid->audio_mic_data); + usbd_ept_send(pudev, USBD_AUHID_AUDIO_MIC_IN_EPT, paudio_hid->audio_mic_data, len); } } @@ -742,15 +745,17 @@ void audio_set_interface(void *udev, usb_setup_type *setup) * @param setup: setup class * @retval none */ -void audio_get_interface(void *udev, usb_setup_type *setup) +static void audio_get_interface(void *udev, usb_setup_type *setup) { + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; if(LBYTE(setup->wIndex) == AUDIO_SPK_INTERFACE_NUMBER) { - usbd_ctrl_send((usbd_core_type *)udev, (uint8_t *)&audio_struct.spk_alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->spk_alt_setting, 1); } else if(LBYTE(setup->wIndex) == AUDIO_MIC_INTERFACE_NUMBER) { - usbd_ctrl_send((usbd_core_type *)udev, (uint8_t *)&audio_struct.mic_alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->mic_alt_setting, 1); } } @@ -762,13 +767,13 @@ void audio_get_interface(void *udev, usb_setup_type *setup) * @param len: report length * @retval status of usb_sts_type */ -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +usb_sts_type audio_hid_class_send_report(void *udev, uint8_t *report, uint16_t len) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_ept_send(pudev, USBD_AUHID_HID_IN_EPT, report, len); return status; } @@ -781,15 +786,16 @@ usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) * @param len: report length * @retval none */ -void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) +static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) { uint32_t i_index; usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; switch(report[0]) { case HID_REPORT_ID_2: - if(g_rxhid_buff[1] == 0) + if(paudio_hid->g_rxhid_buff[1] == 0) { at32_led_off(LED2); } @@ -799,7 +805,7 @@ void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) } break; case HID_REPORT_ID_3: - if(g_rxhid_buff[1] == 0) + if(paudio_hid->g_rxhid_buff[1] == 0) { at32_led_off(LED3); } @@ -809,7 +815,7 @@ void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) } break; case HID_REPORT_ID_4: - if(g_rxhid_buff[1] == 0) + if(paudio_hid->g_rxhid_buff[1] == 0) { at32_led_off(LED4); } @@ -821,9 +827,9 @@ void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) case HID_REPORT_ID_6: for(i_index = 0; i_index < len; i_index ++) { - g_txhid_buff[i_index] = report[i_index]; + paudio_hid->g_txhid_buff[i_index] = report[i_index]; } - usbd_ept_send(pudev, USBD_HID_IN_EPT, g_txhid_buff, len); + usbd_ept_send(pudev, USBD_AUHID_HID_IN_EPT, paudio_hid->g_txhid_buff, len); default: break; } diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.h b/middlewares/usbd_class/audio_hid/audio_hid_class.h index 3e4a1e09..bdfa78c4 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_class.h +++ b/middlewares/usbd_class/audio_hid/audio_hid_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer @@ -25,8 +25,8 @@ */ /* define to prevent recursive inclusion -------------------------------------*/ -#ifndef __AUDIO_CLASS_H -#define __AUDIO_CLASS_H +#ifndef __AUDIO_HID_CLASS_H +#define __AUDIO_HID_CLASS_H #ifdef __cplusplus extern "C" { @@ -51,21 +51,21 @@ extern "C" { /** * @brief endpoint define */ -#define USBD_AUDIO_MIC_IN_EPT 0x81 -#define USBD_AUDIO_SPK_OUT_EPT 0x02 -#define USBD_AUDIO_FEEDBACK_EPT 0x83 +#define USBD_AUHID_AUDIO_MIC_IN_EPT 0x81 +#define USBD_AUHID_AUDIO_SPK_OUT_EPT 0x02 +#define USBD_AUHID_AUDIO_FEEDBACK_EPT 0x83 /** * @brief usb custom hid use endpoint define */ -#define USBD_HID_IN_EPT 0x84 -#define USBD_HID_OUT_EPT 0x05 +#define USBD_AUHID_HID_IN_EPT 0x84 +#define USBD_AUHID_HID_OUT_EPT 0x05 /** * @brief usb custom hid in and out max packet size define */ -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 +#define USBD_AUHID_IN_MAXPACKET_SIZE 0x40 +#define USBD_AUHID_OUT_MAXPACKET_SIZE 0x40 /** * @brief endpoint support max size @@ -106,19 +106,6 @@ extern "C" { #define AUDIO_DESCRIPTOR_TYPE 0x21 #define AUDIO_DESCRIPTOR_SIZE 0x09 -/** - * @brief usb custom hid class request code define - */ -#define HID_REQ_SET_PROTOCOL 0x0B -#define HID_REQ_GET_PROTOCOL 0x03 -#define HID_REQ_SET_IDLE 0x0A -#define HID_REQ_GET_IDLE 0x02 -#define HID_REQ_SET_REPORT 0x09 -#define HID_REQ_GET_REPORT 0x01 -#define HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESC 0x22 - - /** * @brief usb audio control struct */ @@ -144,11 +131,21 @@ typedef struct uint8_t audio_spk_data[AUDIO_SPK_OUT_MAXPACKET_SIZE]; uint8_t audio_mic_data[AUDIO_MIC_IN_MAXPACKET_SIZE]; uint8_t audio_feed_back[AUDIO_FEEDBACK_MAXPACKET_SIZE+1]; -}usb_audio_type; + + + /* hid */ + uint32_t hid_protocol; + uint32_t hid_set_idle; + uint32_t alt_setting; + uint8_t hid_state; + uint8_t hid_set_report[64]; + uint8_t g_rxhid_buff[USBD_AUHID_OUT_MAXPACKET_SIZE]; + uint8_t g_txhid_buff[USBD_AUHID_IN_MAXPACKET_SIZE]; +}usb_audio_hid_type; extern usbd_class_handler audio_hid_class_handler; -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); +usb_sts_type audio_hid_class_send_report(void *udev, uint8_t *report, uint16_t len); /** * @} diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.c b/middlewares/usbd_class/audio_hid/audio_hid_desc.c index 2196664c..ec5d08aa 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_desc.c +++ b/middlewares/usbd_class/audio_hid/audio_hid_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -42,18 +42,18 @@ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -81,7 +81,7 @@ usbd_desc_handler audio_hid_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -91,10 +91,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_AUHID_VENDOR_ID), /* idVendor */ + HBYTE(USBD_AUHID_VENDOR_ID), /* idVendor */ + LBYTE(USBD_AUHID_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_AUHID_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -109,12 +109,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_AUHID_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_AUHID_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_AUHID_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x1 + AUDIO_INTERFACE_NUM + 0x1, /* bNumInterfaces: n interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -135,8 +135,8 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x08+AUDIO_INTERFACE_NUM, /* bLength: size of this descriptor, in bytes 8+n */ AUDIO_CS_INTERFACE, /* bDescriptorType: cs interface descriptor type */ AUDIO_AC_HEADER, /* bDescriptorSubtype: Header function Descriptor*/ - LBYTE(BCD_NUM), - HBYTE(BCD_NUM), /* bcdCDC: audio device class specification release number */ + LBYTE(AUHID_BCD_NUM), + HBYTE(AUHID_BCD_NUM), /* bcdCDC: audio device class specification release number */ LBYTE(AUDIO_INTERFACE_LEN), HBYTE(AUDIO_INTERFACE_LEN), /* wTotalLength: total number of bytes returned for the class-specific audio control interface */ AUDIO_INTERFACE_NUM, /* bInClollection: the number of audio streaming */ @@ -155,7 +155,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = AUDIO_MIC_INPUT_TERMINAL_ID, /* bTerminalID: id of this input terminal*/ LBYTE(AUDIO_INPUT_TERMINAL_MICROPHONE), HBYTE(AUDIO_INPUT_TERMINAL_MICROPHONE),/* wTerminalType: terminal is microphone */ - 0x00, /* bAssocTerminal: no association */ + AUDIO_MIC_OUTPUT_TERMINAL_ID, /* bAssocTerminal: no association */ AUDIO_MIC_CHR, /* bNrChannels: two channel */ #if (AUDIO_MIC_CHR == 2) 0x03, /* wChannelConfig: left front and right front */ @@ -183,7 +183,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = AUDIO_MIC_OUTPUT_TERMINAL_ID, /* bTerminalID: id of this output terminal*/ LBYTE(AUDIO_TERMINAL_TYPE_STREAMING), HBYTE(AUDIO_TERMINAL_TYPE_STREAMING), /* wTerminalType: usb streaming */ - 0x00, /* bAssocTerminal: unused */ + AUDIO_MIC_INPUT_TERMINAL_ID, /* bAssocTerminal: unused */ AUDIO_MIC_FEATURE_UNIT_ID, /* bSourceID: from feature unit terminal */ 0x00, /* iTerminal: unused */ #endif @@ -196,7 +196,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = AUDIO_SPK_INPUT_TERMINAL_ID, /* bTerminalID: id of this input terminal*/ LBYTE(AUDIO_TERMINAL_TYPE_STREAMING), /* wTerminalType: usb streaming */ HBYTE(AUDIO_TERMINAL_TYPE_STREAMING), /* wTerminalType: usb streaming */ - 0x00, /* bAssocTerminal: no association */ + AUDIO_SPK_OUTPUT_TERMINAL_ID, /* bAssocTerminal: no association */ AUDIO_SPK_CHR, /* bNrChannels: two channel */ #if (AUDIO_SPK_CHR == 2) 0x03, /* wChannelConfig: left front and right front */ @@ -224,7 +224,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = AUDIO_SPK_OUTPUT_TERMINAL_ID, /* bTerminalID: id of this output terminal*/ LBYTE(AUDIO_OUTPUT_TERMINAL_SPEAKER), /* wTerminalType: usb speaker */ HBYTE(AUDIO_OUTPUT_TERMINAL_SPEAKER), /* wTerminalType: usb speaker */ - 0x00, /* bAssocTerminal: unused */ + AUDIO_SPK_INPUT_TERMINAL_ID, /* bAssocTerminal: unused */ AUDIO_SPK_FEATURE_UNIT_ID, /* bSourceID: from feature unit terminal */ 0x00, /* iTerminal: unused */ #endif @@ -276,11 +276,11 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_AUDIO_MIC_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_AUHID_AUDIO_MIC_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_ISO | USB_ETP_DESC_ASYNC, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_MIC_IN_MAXPACKET_SIZE), HBYTE(AUDIO_MIC_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + AUHID_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ 0x00, /* bRefresh: unused */ 0x00, /* bSynchAddress: unused */ @@ -340,14 +340,14 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_AUDIO_SPK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_AUHID_AUDIO_SPK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_ISO | USB_ETP_DESC_ASYNC, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_SPK_OUT_MAXPACKET_SIZE), HBYTE(AUDIO_SPK_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + AUHID_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ 0x00, /* bRefresh: unused */ #if (AUDIO_SUPPORT_FEEDBACK == 1) - USBD_AUDIO_FEEDBACK_EPT, /* bSynchAddress: feedback endpoint */ + USBD_AUHID_AUDIO_FEEDBACK_EPT, /* bSynchAddress: feedback endpoint */ #else 0x00, /* bSynchAddress: unused */ #endif @@ -363,7 +363,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if (AUDIO_SUPPORT_FEEDBACK == 1) 0x09, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_AUDIO_FEEDBACK_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_AUHID_AUDIO_FEEDBACK_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ 0x11, /* bmAttributes: endpoint attributes */ LBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ HBYTE(AUDIO_FEEDBACK_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ @@ -389,29 +389,29 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(AUHID_HID_BCD_NUM), + HBYTE(AUHID_HID_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_audio_hid_report)), + HBYTE(sizeof(g_usbd_audio_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_AUHID_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_AUHID_IN_MAXPACKET_SIZE), + HBYTE(USBD_AUHID_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + AUHID_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_AUHID_HID_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_OUT_MAXPACKET_SIZE), - HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_AUHID_OUT_MAXPACKET_SIZE), + HBYTE(USBD_AUHID_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + AUHID_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -420,7 +420,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_usbd_audio_hid_report[USBD_AUHID_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x06, 0xFF, 0x00, /* USAGE_PAGE(Vendor Page:0xFF00) */ 0x09, 0x01, /* USAGE (Demo Kit) */ @@ -518,17 +518,17 @@ ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_audio_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(AUHID_HID_BCD_NUM), + HBYTE(AUHID_HID_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_audio_hid_report)), + HBYTE(sizeof(g_usbd_audio_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ }; /** @@ -537,9 +537,9 @@ ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_AUHID_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_AUHID_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -551,42 +551,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_AUHID_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_AUHID_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_AUHID_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_AUHID_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_AUHID_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -594,7 +594,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -668,7 +668,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -678,7 +678,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -688,7 +688,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -698,7 +698,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -708,7 +708,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -719,9 +719,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUHID_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -731,9 +731,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUHID_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -743,7 +743,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -754,9 +754,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUHID_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -766,9 +766,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_AUHID_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.h b/middlewares/usbd_class/audio_hid/audio_hid_desc.h index 22d3d56f..7c498b46 100644 --- a/middlewares/usbd_class/audio_hid/audio_hid_desc.h +++ b/middlewares/usbd_class/audio_hid/audio_hid_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb audio descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -25,8 +25,8 @@ */ /* define to prevent recursive inclusion -------------------------------------*/ -#ifndef __AUDIO_DESC_H -#define __AUDIO_DESC_H +#ifndef __AUDIO_HID_DESC_H +#define __AUDIO_HID_DESC_H #ifdef __cplusplus extern "C" { @@ -47,20 +47,19 @@ extern "C" { /** @defgroup USB_audio_hid_desc_definition * @{ */ + +#define AUHID_BCD_NUM 0x0100 -#define BCD_NUM 0x0100 +#define USBD_AUHID_VENDOR_ID 0x2E3C +#define USBD_AUHID_PRODUCT_ID 0x5555 -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5730 - -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A - -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "AT32 Audio" -#define USBD_DESC_CONFIGURATION_STRING "Audio Config" -#define USBD_DESC_INTERFACE_STRING "Audio Interface" +#define USBD_AUHID_SIZ_STRING_LANGID 4 +#define USBD_AUHID_SIZ_STRING_SERIAL 0x1A +#define USBD_AUHID_DESC_MANUFACTURER_STRING "Artery" +#define USBD_AUHID_DESC_PRODUCT_STRING "AT32 Audio" +#define USBD_AUHID_DESC_CONFIGURATION_STRING "Audio Config" +#define USBD_AUHID_DESC_INTERFACE_STRING "Audio Interface" /** * @brief audio interface subclass codes */ @@ -203,12 +202,12 @@ extern "C" { #define AUDIO_SPK_CHR AUDIO_SPK_CHANEL_NUM #define AUDIO_SPK_BITW (AUDIO_SPK_DEFAULT_BITW) -#define HID_BINTERVAL_TIME 0x01 +#define AUHID_HID_BINTERVAL_TIME 0x01 /** * @brief usb bcd number define */ -#define HID_BCD_NUM 0x0110 +#define AUHID_HID_BCD_NUM 0x0110 /** * @brief usb hid class descriptor define @@ -227,24 +226,24 @@ extern "C" { #define HID_REPORT_ID_5 0x05 #define HID_REPORT_ID_6 0xF0 -#define USBD_HID_DESC_SIZE 32 -#define USBD_CONFIG_DESC_SIZE ( 0x12 + AUDIO_INTERFACE_LEN + \ - + (0x31 + AUDIO_SPK_FREQ_SIZE * 3) \ - + (0x31 + AUDIO_MIC_FREQ_SIZE * 3) \ - + (9 * AUDIO_SUPPORT_FEEDBACK) \ - + USBD_HID_DESC_SIZE) -#define USBD_HID_SIZ_REPORT_DESC 126 +#define MCU_ID1 (0x1FFFF7E8) +#define MCU_ID2 (0x1FFFF7EC) +#define MCU_ID3 (0x1FFFF7F0) + #define SAMPLE_FREQ(frq) (uint8_t)(frq), (uint8_t)((frq >> 8)), (uint8_t)((frq >> 16)) -#define MCU_ID1 (0x1FFFF7E8) -#define MCU_ID2 (0x1FFFF7EC) -#define MCU_ID3 (0x1FFFF7F0) +#define USBD_AUHID_HID_SIZ_REPORT_DESC 126 +#define USBD_AUHID_HID_DESC_SIZE 32 +#define USBD_AUHID_CONFIG_DESC_SIZE ( 0x12 + AUDIO_INTERFACE_LEN + \ + + (0x31 + AUDIO_SPK_FREQ_SIZE * 3) \ + + (0x31 + AUDIO_MIC_FREQ_SIZE * 3) \ + + (9 * AUDIO_SUPPORT_FEEDBACK) \ + + USBD_AUHID_HID_DESC_SIZE) + +extern uint8_t g_usbd_audio_hid_report[USBD_AUHID_HID_SIZ_REPORT_DESC]; +extern uint8_t g_audio_hid_usb_desc[9]; -extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; -extern uint8_t g_hid_usb_desc[9]; -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; extern usbd_desc_handler audio_hid_desc_handler; /** diff --git a/middlewares/usbd_class/cdc/cdc_class.c b/middlewares/usbd_class/cdc/cdc_class.c index d904393d..12e5bce7 100644 --- a/middlewares/usbd_class/cdc/cdc_class.c +++ b/middlewares/usbd_class/cdc/cdc_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,39 +40,33 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len); -/* usb rx and tx buffer */ -static uint32_t alt_setting = 0; -static uint8_t g_rx_buff[USBD_OUT_MAXPACKET_SIZE]; -//static uint8_t g_tx_buff[USBD_IN_MAXPACKET_SIZE]; -static uint8_t g_cmd[USBD_CMD_MAXPACKET_SIZE]; -static uint8_t g_req; -static uint16_t g_len, g_rxlen; -__IO uint8_t g_tx_completed = 1, g_rx_completed = 0; +static usb_sts_type cdc_struct_init(cdc_struct_type *pcdc); +extern void usb_usart_config( linecoding_type linecoding); +static void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len); -linecoding_type linecoding = +linecoding_type linecoding = { 115200, - 0x00, - 0x00, - 0x08 + 0, + 0, + 8 }; -/* static variable */ - +/* cdc data struct */ +cdc_struct_type cdc_struct; /* usb device class handler */ -usbd_class_handler class_handler = +usbd_class_handler cdc_class_handler = { class_init_handler, class_clear_handler, @@ -83,6 +77,7 @@ usbd_class_handler class_handler = class_out_handler, class_sof_handler, class_event_handler, + &cdc_struct }; /** @@ -90,10 +85,11 @@ usbd_class_handler class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; #ifndef USB_EPT_AUTO_MALLOC_BUFFER /* use user define buffer address */ @@ -103,18 +99,18 @@ usb_sts_type class_init_handler(void *udev) #endif /* open in endpoint */ - usbd_ept_open(pudev, USBD_CDC_INT_EPT, EPT_INT_TYPE, USBD_CMD_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_CDC_INT_EPT, EPT_INT_TYPE, USBD_CDC_CMD_MAXPACKET_SIZE); /* open in endpoint */ - usbd_ept_open(pudev, USBD_CDC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_CDC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_CDC_IN_MAXPACKET_SIZE); /* open out endpoint */ - usbd_ept_open(pudev, USBD_CDC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_CDC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_CDC_OUT_MAXPACKET_SIZE); /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, g_rx_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdc->g_rx_buff, USBD_CDC_OUT_MAXPACKET_SIZE); - g_tx_completed = 1; + cdc_struct_init(pcdc); return status; } @@ -124,7 +120,7 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -147,10 +143,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) { @@ -160,14 +157,14 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { if(setup->bmRequestType & USB_REQ_DIR_DTH) { - usb_vcp_cmd_process(udev, setup->bRequest, g_cmd, setup->wLength); - usbd_ctrl_send(pudev, g_cmd, setup->wLength); + usb_vcp_cmd_process(udev, setup->bRequest, pcdc->g_cmd, setup->wLength); + usbd_ctrl_send(pudev, pcdc->g_cmd, setup->wLength); } else { - g_req = setup->bRequest; - g_len = setup->wLength; - usbd_ctrl_recv(pudev, g_cmd, g_len); + pcdc->g_req = setup->bRequest; + pcdc->g_len = setup->wLength; + usbd_ctrl_recv(pudev, pcdc->g_cmd, pcdc->g_len); } } @@ -180,10 +177,10 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) usbd_ctrl_unsupport(pudev); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pcdc->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + pcdc->alt_setting = setup->wValue; break; default: break; @@ -201,7 +198,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -215,16 +212,17 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( g_req == SET_LINE_CODING) + if( pcdc->g_req == SET_LINE_CODING) { /* class process */ - usb_vcp_cmd_process(udev, g_req, g_cmd, recv_len); + usb_vcp_cmd_process(udev, pcdc->g_req, pcdc->g_cmd, recv_len); } return status; @@ -236,14 +234,16 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; usb_sts_type status = USB_OK; /* ...user code... trans next packet data */ - g_tx_completed = 1; + pcdc->g_tx_completed = 1; return status; } @@ -254,16 +254,17 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; /* get endpoint receive data length */ - g_rxlen = usbd_get_recv_len(pudev, ept_num); + pcdc->g_rxlen = usbd_get_recv_len(pudev, ept_num); /*set recv flag*/ - g_rx_completed = 1; + pcdc->g_rx_completed = 1; return status; } @@ -273,7 +274,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -288,7 +289,7 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; switch(event) @@ -313,6 +314,23 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) return status; } +/** + * @brief usb device cdc init + * @param pcdc: to the structure of cdc_struct + * @retval status of usb_sts_type + */ +static usb_sts_type cdc_struct_init(cdc_struct_type *pcdc) +{ + pcdc->g_tx_completed = 1; + pcdc->g_rx_completed = 0; + pcdc->alt_setting = 0; + pcdc->linecoding.bitrate = linecoding.bitrate; + pcdc->linecoding.data = linecoding.data; + pcdc->linecoding.format = linecoding.format; + pcdc->linecoding.parity = linecoding.parity; + return USB_OK; +} + /** * @brief usb device class rx data process * @param udev: to the structure of usbd_core_type @@ -322,22 +340,22 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data) { uint16_t i_index = 0; + uint16_t tmp_len = 0; usbd_core_type *pudev = (usbd_core_type *)udev; - uint16_t tmp_len = g_rxlen; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; - if(g_rx_completed == 0) + if(pcdc->g_rx_completed == 0) { return 0; } - g_rx_completed = 0; - - tmp_len = g_rxlen; - for(i_index = 0; i_index < g_rxlen; i_index ++) + pcdc->g_rx_completed = 0; + tmp_len = pcdc->g_rxlen; + for(i_index = 0; i_index < pcdc->g_rxlen; i_index ++) { - recv_data[i_index] = g_rx_buff[i_index]; + recv_data[i_index] = pcdc->g_rx_buff[i_index]; } - usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, g_rx_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdc->g_rx_buff, USBD_CDC_OUT_MAXPACKET_SIZE); return tmp_len; } @@ -353,9 +371,10 @@ error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) { error_status status = SUCCESS; usbd_core_type *pudev = (usbd_core_type *)udev; - if(g_tx_completed) + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; + if(pcdc->g_tx_completed) { - g_tx_completed = 0; + pcdc->g_tx_completed = 0; usbd_ept_send(pudev, USBD_CDC_BULK_IN_EPT, send_data, len); } else @@ -374,25 +393,31 @@ error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) * @param len: buffer length * @retval none */ -void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len) +static void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len) { + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_struct_type *pcdc = (cdc_struct_type *)pudev->class_handler->pdata; switch(cmd) { case SET_LINE_CODING: - linecoding.bitrate = (uint32_t)(buff[0] | (buff[1] << 8) | (buff[2] << 16) | (buff[3] <<24)); - linecoding.format = buff[4]; - linecoding.parity = buff[5]; - linecoding.data = buff[6]; + pcdc->linecoding.bitrate = (uint32_t)(buff[0] | (buff[1] << 8) | (buff[2] << 16) | (buff[3] <<24)); + pcdc->linecoding.format = buff[4]; + pcdc->linecoding.parity = buff[5]; + pcdc->linecoding.data = buff[6]; +#ifdef USB_VIRTUAL_COMPORT + /* set hardware usart */ + usb_usart_config(pcdc->linecoding); +#endif break; case GET_LINE_CODING: - buff[0] = (uint8_t)linecoding.bitrate; - buff[1] = (uint8_t)(linecoding.bitrate >> 8); - buff[2] = (uint8_t)(linecoding.bitrate >> 16); - buff[3] = (uint8_t)(linecoding.bitrate >> 24); - buff[4] = (uint8_t)(linecoding.format); - buff[5] = (uint8_t)(linecoding.parity); - buff[6] = (uint8_t)(linecoding.data); + buff[0] = (uint8_t)pcdc->linecoding.bitrate; + buff[1] = (uint8_t)(pcdc->linecoding.bitrate >> 8); + buff[2] = (uint8_t)(pcdc->linecoding.bitrate >> 16); + buff[3] = (uint8_t)(pcdc->linecoding.bitrate >> 24); + buff[4] = (uint8_t)(pcdc->linecoding.format); + buff[5] = (uint8_t)(pcdc->linecoding.parity); + buff[6] = (uint8_t)(pcdc->linecoding.data); break; default: diff --git a/middlewares/usbd_class/cdc/cdc_class.h b/middlewares/usbd_class/cdc/cdc_class.h index bb46ed3c..cea46f5a 100644 --- a/middlewares/usbd_class/cdc/cdc_class.h +++ b/middlewares/usbd_class/cdc/cdc_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc class file ************************************************************************** * Copyright notice & Disclaimer @@ -57,15 +57,9 @@ extern "C" { /** * @brief usb cdc in and out max packet size define */ -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 -#define USBD_CMD_MAXPACKET_SIZE 0x08 - -/** - * @brief usb cdc class request code define - */ -#define SET_LINE_CODING 0x20 -#define GET_LINE_CODING 0x21 +#define USBD_CDC_IN_MAXPACKET_SIZE 0x40 +#define USBD_CDC_OUT_MAXPACKET_SIZE 0x40 +#define USBD_CDC_CMD_MAXPACKET_SIZE 0x08 /** * @} @@ -76,15 +70,19 @@ extern "C" { */ /** - * @brief usb cdc class set line coding struct + * @brief usb cdc class struct */ -typedef struct +typedef struct { - uint32_t bitrate; /* line coding baud rate */ - uint8_t format; /* line coding foramt */ - uint8_t parity; /* line coding parity */ - uint8_t data; /* line coding data bit */ -}linecoding_type; + uint32_t alt_setting; + uint8_t g_rx_buff[USBD_CDC_OUT_MAXPACKET_SIZE]; + uint8_t g_cmd[USBD_CDC_CMD_MAXPACKET_SIZE]; + uint8_t g_req; + uint16_t g_len, g_rxlen; + __IO uint8_t g_tx_completed, g_rx_completed; + linecoding_type linecoding; +}cdc_struct_type; + /** * @} @@ -93,7 +91,7 @@ typedef struct /** @defgroup USB_cdc_class_exported_functions * @{ */ -extern usbd_class_handler class_handler; +extern usbd_class_handler cdc_class_handler; uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data); error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len); diff --git a/middlewares/usbd_class/cdc/cdc_desc.c b/middlewares/usbd_class/cdc/cdc_desc.c index 1453c10b..5420761e 100644 --- a/middlewares/usbd_class/cdc/cdc_desc.c +++ b/middlewares/usbd_class/cdc/cdc_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -41,18 +41,18 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -60,7 +60,7 @@ static uint8_t g_usbd_desc_buffer[256]; /** * @brief device descriptor handler structure */ -usbd_desc_handler desc_handler = +usbd_desc_handler cdc_desc_handler = { get_device_descriptor, get_device_qualifier, @@ -80,7 +80,7 @@ usbd_desc_handler desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -90,10 +90,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_CDC_VENDOR_ID), /* idVendor */ + HBYTE(USBD_CDC_VENDOR_ID), /* idVendor */ + LBYTE(USBD_CDC_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_CDC_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -108,12 +108,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_CDC_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_CDC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_CDC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x02, /* bNumInterfaces: 2 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -134,8 +134,8 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x05, /* bFunctionLength: size of this descriptor in bytes */ USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ USBD_CDC_SUBTYPE_HEADER, /* bDescriptorSubtype: Header function Descriptor 0x00*/ - LBYTE(BCD_NUM), - HBYTE(BCD_NUM), /* bcdCDC: USB class definitions for communications */ + LBYTE(CDC_BCD_NUM), + HBYTE(CDC_BCD_NUM), /* bcdCDC: USB class definitions for communications */ 0x05, /* bFunctionLength: size of this descriptor in bytes */ USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ @@ -158,9 +158,9 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ USBD_CDC_INT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_CMD_MAXPACKET_SIZE), - HBYTE(USBD_CMD_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_CDC_CMD_MAXPACKET_SIZE), + HBYTE(USBD_CDC_CMD_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + CDC_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ @@ -177,17 +177,17 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ USBD_CDC_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - 0x00, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_CDC_IN_MAXPACKET_SIZE), + HBYTE(USBD_CDC_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ USBD_CDC_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_OUT_MAXPACKET_SIZE), - HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - 0x00, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_CDC_OUT_MAXPACKET_SIZE), + HBYTE(USBD_CDC_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -196,9 +196,9 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_CDC_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_CDC_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -210,42 +210,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_CDC_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_CDC_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_CDC_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_CDC_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_CDC_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -253,7 +253,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -266,7 +266,7 @@ uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) } str_len = str_len * 2 + 2; - unicode_buf[0] = str_len; + unicode_buf[0] = (uint8_t)str_len; unicode_buf[1] = USB_DESCIPTOR_TYPE_STRING; return str_len; @@ -327,7 +327,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -337,7 +337,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -347,7 +347,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -357,7 +357,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -367,7 +367,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -378,9 +378,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -390,9 +390,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -402,7 +402,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -413,9 +413,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -425,9 +425,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CDC_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/cdc/cdc_desc.h b/middlewares/usbd_class/cdc/cdc_desc.h index 57ab5fa8..b6197bf7 100644 --- a/middlewares/usbd_class/cdc/cdc_desc.h +++ b/middlewares/usbd_class/cdc/cdc_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -46,51 +46,36 @@ extern "C" { /** @defgroup USB_cdc_desc_definition * @{ */ - /** * @brief usb bcd number define */ -#define BCD_NUM 0x0110 +#define CDC_BCD_NUM 0x0110 /** * @brief usb vendor id and product id define */ -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5740 +#define USBD_CDC_VENDOR_ID 0x2E3C +#define USBD_CDC_PRODUCT_ID 0x5740 /** * @brief usb descriptor size define */ -#define USBD_CONFIG_DESC_SIZE 67 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_CDC_CONFIG_DESC_SIZE 67 +#define USBD_CDC_SIZ_STRING_LANGID 4 +#define USBD_CDC_SIZ_STRING_SERIAL 0x1A /** * @brief usb string define(vendor, product configuration, interface) */ -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "AT32 Virtual Com Port" -#define USBD_DESC_CONFIGURATION_STRING "Virtual ComPort Config" -#define USBD_DESC_INTERFACE_STRING "Virtual ComPort Interface" +#define USBD_CDC_DESC_MANUFACTURER_STRING "Artery" +#define USBD_CDC_DESC_PRODUCT_STRING "AT32 Virtual Com Port " +#define USBD_CDC_DESC_CONFIGURATION_STRING "Virtual ComPort Config" +#define USBD_CDC_DESC_INTERFACE_STRING "Virtual ComPort Interface" /** * @brief usb endpoint interval define */ -#define HID_BINTERVAL_TIME 0xFF - -/** - * @brief usb hid class descriptor define - */ -#define USBD_CDC_CS_INTERFACE 0x24 -#define USBD_CDC_CS_ENDPOINT 0x25 - -/** - * @brief usb hid class sub-type define - */ -#define USBD_CDC_SUBTYPE_HEADER 0x00 -#define USBD_CDC_SUBTYPE_CMF 0x01 -#define USBD_CDC_SUBTYPE_ACM 0x02 -#define USBD_CDC_SUBTYPE_UFD 0x06 +#define CDC_HID_BINTERVAL_TIME 0xFF /** * @brief usb mcu id address deine @@ -98,26 +83,22 @@ extern "C" { #define MCU_ID1 (0x1FFFF7E8) #define MCU_ID2 (0x1FFFF7EC) #define MCU_ID3 (0x1FFFF7F0) +/** + * @} + */ + +extern usbd_desc_handler cdc_desc_handler; + /** * @} */ -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; -extern usbd_desc_handler desc_handler; - +/** + * @} + */ #ifdef __cplusplus } #endif - #endif - -/** - * @} - */ - -/** - * @} - */ diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c index d8f48c60..43eddbab 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc and keyboard class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,36 +40,24 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); -usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup); -void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len); -/* usb rx and tx buffer */ -static uint32_t alt_setting = 0; -static uint32_t hid_protocol = 0; -static uint32_t hid_set_idle = 0; -static uint8_t hid_state; -uint8_t hid_set_report[64]; -static uint8_t g_rx_buff[USBD_OUT_MAXPACKET_SIZE]; +static void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len); -static uint8_t g_cmd[USBD_CMD_MAXPACKET_SIZE]; -static uint8_t g_req; -static uint16_t g_len, g_rxlen; -__IO uint8_t g_tx_completed = 1, g_rx_completed = 0; - -__IO uint8_t g_keyboard_tx_completed = 0; +vcp_keyboard_type vcp_keyboard_struct; #define SHIFT 0x80 -const unsigned char _asciimap[128] = +const static unsigned char _asciimap[128] = { 0x00,// NUL 0x00,// SOH @@ -202,7 +190,7 @@ const unsigned char _asciimap[128] = 0 // DEL }; -linecoding_type linecoding = +linecoding_type linecoding_vcpkybrd = { 115200, 0x00, @@ -225,6 +213,7 @@ usbd_class_handler cdc_keyboard_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &vcp_keyboard_struct }; /** @@ -232,37 +221,41 @@ usbd_class_handler cdc_keyboard_class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; #ifndef USB_EPT_AUTO_MALLOC_BUFFER /* use user define buffer address */ - usbd_ept_buf_custom_define(pudev, USBD_CDC_INT_EPT, EPT2_TX_ADDR); - usbd_ept_buf_custom_define(pudev, USBD_CDC_BULK_IN_EPT, EPT1_TX_ADDR); - usbd_ept_buf_custom_define(pudev, USBD_CDC_BULK_OUT_EPT, EPT1_RX_ADDR); - usbd_ept_buf_custom_define(pudev, USBD_HID_IN_EPT, EPT3_TX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_VCPKYBRD_CDC_INT_EPT, EPT2_TX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_VCPKYBRD_CDC_BULK_IN_EPT, EPT1_TX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_VCPKYBRD_CDC_BULK_OUT_EPT, EPT1_RX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_VCPKYBRD_HID_IN_EPT, EPT3_TX_ADDR); #endif /* open in endpoint */ - usbd_ept_open(pudev, USBD_CDC_INT_EPT, EPT_INT_TYPE, USBD_CMD_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_VCPKYBRD_CDC_INT_EPT, EPT_INT_TYPE, USBD_VCPKYBRD_CMD_MAXPACKET_SIZE); /* open in endpoint */ - usbd_ept_open(pudev, USBD_CDC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_VCPKYBRD_CDC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_VCPKYBRD_IN_MAXPACKET_SIZE); /* open out endpoint */ - usbd_ept_open(pudev, USBD_CDC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_VCPKYBRD_CDC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_VCPKYBRD_OUT_MAXPACKET_SIZE); /* open hid in endpoint */ - usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_VCPKYBRD_HID_IN_EPT, EPT_INT_TYPE, USBD_VCPKYBRD_IN_MAXPACKET_SIZE); /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, g_rx_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_VCPKYBRD_CDC_BULK_OUT_EPT, vcpkybrd->g_rx_buff, USBD_VCPKYBRD_OUT_MAXPACKET_SIZE); - g_tx_completed = 1; - g_keyboard_tx_completed = 1; + vcpkybrd->g_tx_completed = 1; + vcpkybrd->g_keyboard_tx_completed = 1; + vcpkybrd->linecoding.bitrate = linecoding_vcpkybrd.bitrate; + vcpkybrd->linecoding.data = linecoding_vcpkybrd.data; + vcpkybrd->linecoding.format = linecoding_vcpkybrd.format; + vcpkybrd->linecoding.parity = linecoding_vcpkybrd.parity; return status; } @@ -271,22 +264,22 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; /* close in endpoint */ - usbd_ept_close(pudev, USBD_CDC_INT_EPT); + usbd_ept_close(pudev, USBD_VCPKYBRD_CDC_INT_EPT); /* close in endpoint */ - usbd_ept_close(pudev, USBD_CDC_BULK_IN_EPT); + usbd_ept_close(pudev, USBD_VCPKYBRD_CDC_BULK_IN_EPT); /* close out endpoint */ - usbd_ept_close(pudev, USBD_CDC_BULK_OUT_EPT); + usbd_ept_close(pudev, USBD_VCPKYBRD_CDC_BULK_OUT_EPT); /* close in endpoint */ - usbd_ept_close(pudev, USBD_HID_IN_EPT); + usbd_ept_close(pudev, USBD_VCPKYBRD_HID_IN_EPT); return status; } @@ -297,14 +290,14 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; switch(setup->bmRequestType & USB_REQ_RECIPIENT_MASK) { case USB_REQ_RECIPIENT_INTERFACE: - if(setup->wIndex == HID_KEYBOARD_INTERFACE) + if(setup->wIndex == VCPKYBRD_KEYBOARD_INTERFACE) { keyboard_class_setup_handler(pudev, setup); } @@ -326,10 +319,11 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) { @@ -339,14 +333,14 @@ usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup) { if(setup->bmRequestType & USB_REQ_DIR_DTH) { - usb_vcp_cmd_process(pudev, setup->bRequest, g_cmd, setup->wLength); - usbd_ctrl_send(pudev, g_cmd, setup->wLength); + usb_vcp_cmd_process(udev, setup->bRequest, vcpkybrd->g_cmd, setup->wLength); + usbd_ctrl_send(pudev, vcpkybrd->g_cmd, setup->wLength); } else { - g_req = setup->bRequest; - g_len = setup->wLength; - usbd_ctrl_recv(pudev, g_cmd, g_len); + vcpkybrd->g_req = setup->bRequest; + vcpkybrd->g_len = setup->wLength; + usbd_ctrl_recv(pudev, vcpkybrd->g_cmd, vcpkybrd->g_len); } } @@ -359,10 +353,10 @@ usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup) usbd_ctrl_unsupport(pudev); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&vcpkybrd->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + vcpkybrd->alt_setting = setup->wValue; break; default: break; @@ -381,10 +375,11 @@ usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -395,20 +390,20 @@ usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case HID_REQ_SET_PROTOCOL: - hid_protocol = (uint8_t)setup->wValue; + vcpkybrd->hid_protocol = (uint8_t)setup->wValue; break; case HID_REQ_GET_PROTOCOL: - usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + usbd_ctrl_send(pudev, (uint8_t *)&vcpkybrd->hid_protocol, 1); break; case HID_REQ_SET_IDLE: - hid_set_idle = (uint8_t)(setup->wValue >> 8); + vcpkybrd->hid_set_idle = (uint8_t)(setup->wValue >> 8); break; case HID_REQ_GET_IDLE: - usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + usbd_ctrl_send(pudev, (uint8_t *)&vcpkybrd->hid_set_idle, 1); break; case HID_REQ_SET_REPORT: - hid_state = HID_REQ_SET_REPORT; - usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + vcpkybrd->hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, vcpkybrd->hid_set_report, setup->wLength); break; default: usbd_ctrl_unsupport(pudev); @@ -422,21 +417,21 @@ usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if(setup->wValue >> 8 == HID_REPORT_DESC) { - len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); - buf = (uint8_t *)g_usbd_hid_report; + len = MIN(USBD_VCPKYBRD_HID_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_vcpkybrd_hid_report; } else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) { len = MIN(9, setup->wLength); - buf = (uint8_t *)g_hid_usb_desc; + buf = (uint8_t *)g_vcpkybrd_hid_usb_desc; } usbd_ctrl_send(pudev, (uint8_t *)buf, len); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&vcpkybrd->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + vcpkybrd->alt_setting = setup->wValue; break; default: break; @@ -454,7 +449,7 @@ usb_sts_type keyboard_class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -468,23 +463,23 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( g_req == SET_LINE_CODING) + if( vcpkybrd->g_req == SET_LINE_CODING) { /* class process */ - usb_vcp_cmd_process(udev, g_req, g_cmd, recv_len); + usb_vcp_cmd_process(udev, vcpkybrd->g_req, vcpkybrd->g_cmd, recv_len); } - if( hid_state == HID_REQ_SET_REPORT) + if( vcpkybrd->hid_state == HID_REQ_SET_REPORT) { /* hid buffer process */ - hid_state = 0; + vcpkybrd->hid_state = 0; } return status; } @@ -495,20 +490,22 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; /* ...user code... trans next packet data */ - if((ept_num & 0x7F) == (USBD_CDC_BULK_IN_EPT & 0x7F)) + if((ept_num & 0x7F) == (USBD_VCPKYBRD_CDC_BULK_IN_EPT & 0x7F)) { - g_tx_completed = 1; + vcpkybrd->g_tx_completed = 1; } - if((ept_num & 0x7F) == (USBD_HID_IN_EPT & 0x7F)) + if((ept_num & 0x7F) == (USBD_VCPKYBRD_HID_IN_EPT & 0x7F)) { - g_keyboard_tx_completed = 1; + vcpkybrd->g_keyboard_tx_completed = 1; } @@ -521,16 +518,17 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; /* get endpoint receive data length */ - g_rxlen = usbd_get_recv_len(pudev, ept_num); + vcpkybrd->g_rxlen = usbd_get_recv_len(pudev, ept_num); /*set recv flag*/ - g_rx_completed = 1; + vcpkybrd->g_rx_completed = 1; return status; } @@ -540,7 +538,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -555,7 +553,7 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; switch(event) @@ -586,25 +584,26 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param recv_data: receive buffer * @retval receive data len */ -uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data) +uint16_t usb_vcpkybrd_vcp_get_rxdata(void *udev, uint8_t *recv_data) { uint16_t i_index = 0; usbd_core_type *pudev = (usbd_core_type *)udev; - uint16_t tmp_len = g_rxlen; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; + uint16_t tmp_len = 0; - if(g_rx_completed == 0) + if(vcpkybrd->g_rx_completed == 0) { return 0; } - g_rx_completed = 0; + vcpkybrd->g_rx_completed = 0; - tmp_len = g_rxlen; - for(i_index = 0; i_index < g_rxlen; i_index ++) + tmp_len = vcpkybrd->g_rxlen; + for(i_index = 0; i_index < vcpkybrd->g_rxlen; i_index ++) { - recv_data[i_index] = g_rx_buff[i_index]; + recv_data[i_index] = vcpkybrd->g_rx_buff[i_index]; } - usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, g_rx_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_VCPKYBRD_CDC_BULK_OUT_EPT, vcpkybrd->g_rx_buff, USBD_VCPKYBRD_OUT_MAXPACKET_SIZE); return tmp_len; } @@ -616,14 +615,15 @@ uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data) * @param len: send length * @retval error status */ -error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) +error_status usb_vcpkybrd_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) { error_status status = SUCCESS; usbd_core_type *pudev = (usbd_core_type *)udev; - if(g_tx_completed) + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; + if(vcpkybrd->g_tx_completed) { - g_tx_completed = 0; - usbd_ept_send(pudev, USBD_CDC_BULK_IN_EPT, send_data, len); + vcpkybrd->g_tx_completed = 0; + usbd_ept_send(pudev, USBD_VCPKYBRD_CDC_BULK_IN_EPT, send_data, len); } else { @@ -641,25 +641,27 @@ error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) * @param len: buffer length * @retval none */ -void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len) +static void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len) { + usbd_core_type *pudev = (usbd_core_type *)udev; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; switch(cmd) { case SET_LINE_CODING: - linecoding.bitrate = (uint32_t)(buff[0] | (buff[1] << 8) | (buff[2] << 16) | (buff[3] <<24)); - linecoding.format = buff[4]; - linecoding.parity = buff[5]; - linecoding.data = buff[6]; + vcpkybrd->linecoding.bitrate = (uint32_t)(buff[0] | (buff[1] << 8) | (buff[2] << 16) | (buff[3] <<24)); + vcpkybrd->linecoding.format = buff[4]; + vcpkybrd->linecoding.parity = buff[5]; + vcpkybrd->linecoding.data = buff[6]; break; case GET_LINE_CODING: - buff[0] = (uint8_t)linecoding.bitrate; - buff[1] = (uint8_t)(linecoding.bitrate >> 8); - buff[2] = (uint8_t)(linecoding.bitrate >> 16); - buff[3] = (uint8_t)(linecoding.bitrate >> 24); - buff[4] = (uint8_t)(linecoding.format); - buff[5] = (uint8_t)(linecoding.parity); - buff[6] = (uint8_t)(linecoding.data); + buff[0] = (uint8_t)vcpkybrd->linecoding.bitrate; + buff[1] = (uint8_t)(vcpkybrd->linecoding.bitrate >> 8); + buff[2] = (uint8_t)(vcpkybrd->linecoding.bitrate >> 16); + buff[3] = (uint8_t)(vcpkybrd->linecoding.bitrate >> 24); + buff[4] = (uint8_t)(vcpkybrd->linecoding.format); + buff[5] = (uint8_t)(vcpkybrd->linecoding.parity); + buff[6] = (uint8_t)(vcpkybrd->linecoding.data); break; default: @@ -674,13 +676,13 @@ void usb_vcp_cmd_process(void *udev, uint8_t cmd, uint8_t *buff, uint16_t len) * @param len: report length * @retval status of usb_sts_type */ -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +usb_sts_type usb_vcpkybrd_class_send_report(void *udev, uint8_t *report, uint16_t len) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_ept_send(pudev, USBD_VCPKYBRD_HID_IN_EPT, report, len); return status; } @@ -692,7 +694,7 @@ usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) * @param op: operation * @retval none */ -void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code) +void usb_vcpkybrd_keyboard_send_char(void *udev, uint8_t ascii_code) { uint8_t key_data = 0; static uint8_t temp = 0; @@ -721,13 +723,13 @@ void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code) { keyboard_buf[0] = 0; keyboard_buf[2] = 0; - class_send_report(udev, keyboard_buf, 8); + usb_vcpkybrd_class_send_report(udev, keyboard_buf, 8); } else { keyboard_buf[0] = key_data; keyboard_buf[2] = ascii_code; - class_send_report(udev, keyboard_buf, 8); + usb_vcpkybrd_class_send_report(udev, keyboard_buf, 8); } } diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h index 57285159..b9ed943c 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc and keyboard class file ************************************************************************** * Copyright notice & Disclaimer @@ -50,35 +50,19 @@ extern "C" { /** * @brief usb use endpoint define */ -#define USBD_CDC_INT_EPT 0x82 -#define USBD_CDC_BULK_IN_EPT 0x81 -#define USBD_CDC_BULK_OUT_EPT 0x01 -#define USBD_HID_IN_EPT 0x83 +#define USBD_VCPKYBRD_CDC_INT_EPT 0x82 +#define USBD_VCPKYBRD_CDC_BULK_IN_EPT 0x81 +#define USBD_VCPKYBRD_CDC_BULK_OUT_EPT 0x01 +#define USBD_VCPKYBRD_HID_IN_EPT 0x83 /** * @brief usb in and out max packet size define */ -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 -#define USBD_CMD_MAXPACKET_SIZE 0x08 +#define USBD_VCPKYBRD_IN_MAXPACKET_SIZE 0x40 +#define USBD_VCPKYBRD_OUT_MAXPACKET_SIZE 0x40 +#define USBD_VCPKYBRD_CMD_MAXPACKET_SIZE 0x08 -/** - * @brief usb cdc class request code define - */ -#define SET_LINE_CODING 0x20 -#define GET_LINE_CODING 0x21 -/** - * @brief usb hid class request code define - */ -#define HID_REQ_SET_PROTOCOL 0x0B -#define HID_REQ_GET_PROTOCOL 0x03 -#define HID_REQ_SET_IDLE 0x0A -#define HID_REQ_GET_IDLE 0x02 -#define HID_REQ_SET_REPORT 0x09 -#define HID_REQ_GET_REPORT 0x01 -#define HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESC 0x22 /** * @} */ @@ -87,16 +71,24 @@ extern "C" { * @{ */ -/** - * @brief usb cdc class set line coding struct - */ -typedef struct +typedef struct { - uint32_t bitrate; /* line coding baud rate */ - uint8_t format; /* line coding foramt */ - uint8_t parity; /* line coding parity */ - uint8_t data; /* line coding data bit */ -}linecoding_type; + uint32_t alt_setting; + uint32_t hid_protocol; + uint32_t hid_set_idle; + + uint8_t hid_set_report[64]; + uint8_t g_rx_buff[USBD_VCPKYBRD_OUT_MAXPACKET_SIZE]; + uint8_t g_cmd[USBD_VCPKYBRD_CMD_MAXPACKET_SIZE]; + uint8_t g_req; + uint8_t hid_state; + uint16_t g_len, g_rxlen; + __IO uint8_t g_tx_completed; + __IO uint8_t g_rx_completed; + __IO uint8_t g_keyboard_tx_completed; + + linecoding_type linecoding; +}vcp_keyboard_type; /** * @} @@ -106,11 +98,10 @@ typedef struct * @{ */ extern usbd_class_handler cdc_keyboard_class_handler; -extern __IO uint8_t g_keyboard_tx_completed; -uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data); -error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len); -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); -void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code); +uint16_t usb_vcpkybrd_vcp_get_rxdata(void *udev, uint8_t *recv_data); +error_status usb_vcpkybrd_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len); +usb_sts_type usb_vcpkybrd_class_send_report(void *udev, uint8_t *report, uint16_t len); +void usb_vcpkybrd_keyboard_send_char(void *udev, uint8_t ascii_code); /** * @} diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c index 4c981a84..6ba32194 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc and keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -40,18 +40,18 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -79,7 +79,7 @@ usbd_desc_handler cdc_keyboard_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -89,10 +89,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x02, /* bDeviceSubClass */ 0x01, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_VCPKYBRD_VENDOR_ID), /* idVendor */ + HBYTE(USBD_VCPKYBRD_VENDOR_ID), /* idVendor */ + LBYTE(USBD_VCPKYBRD_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_VCPKYBRD_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -107,12 +107,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_VCPKYBRD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_VCPKYBRD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_VCPKYBRD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x03, /* bNumInterfaces: 2 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -131,7 +131,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ - CDC_INTERFACE, /* bInterfaceNumber: number of interface */ + VCPKYBRD_CDC_INTERFACE, /* bInterfaceNumber: number of interface */ 0x00, /* bAlternateSetting: alternate set */ 0x01, /* bNumEndpoints: number of endpoints */ USB_CLASS_CODE_CDC, /* bInterfaceClass: CDC class code */ @@ -142,8 +142,8 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x05, /* bFunctionLength: size of this descriptor in bytes */ USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ USBD_CDC_SUBTYPE_HEADER, /* bDescriptorSubtype: Header function Descriptor 0x00*/ - LBYTE(BCD_NUM), - HBYTE(BCD_NUM), /* bcdCDC: USB class definitions for communications */ + LBYTE(VCPKYBRD_BCD_NUM), + HBYTE(VCPKYBRD_BCD_NUM), /* bcdCDC: USB class definitions for communications */ 0x05, /* bFunctionLength: size of this descriptor in bytes */ USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ @@ -164,16 +164,16 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_CDC_INT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_VCPKYBRD_CDC_INT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_CMD_MAXPACKET_SIZE), - HBYTE(USBD_CMD_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_VCPKYBRD_CMD_MAXPACKET_SIZE), + HBYTE(USBD_VCPKYBRD_CMD_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + VCPKYBRD_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ - CDC_DATA_INTERFACE, /* bInterfaceNumber: number of interface */ + VCPKYBRD_CDC_DATA_INTERFACE, /* bInterfaceNumber: number of interface */ 0x00, /* bAlternateSetting: alternate set */ 0x02, /* bNumEndpoints: number of endpoints */ USB_CLASS_CODE_CDCDATA, /* bInterfaceClass: CDC-data class code */ @@ -183,18 +183,18 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_CDC_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_VCPKYBRD_CDC_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + LBYTE(USBD_VCPKYBRD_IN_MAXPACKET_SIZE), + HBYTE(USBD_VCPKYBRD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ 0x00, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_CDC_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_VCPKYBRD_CDC_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_OUT_MAXPACKET_SIZE), - HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + LBYTE(USBD_VCPKYBRD_OUT_MAXPACKET_SIZE), + HBYTE(USBD_VCPKYBRD_OUT_MAXPACKET_SIZE),/* wMaxPacketSize: maximum packe size this endpoint */ 0x00, /* bInterval: interval for polling endpoint for data transfers */ 0x08, /* bLength */ @@ -208,7 +208,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ - HID_KEYBOARD_INTERFACE, /* bInterfaceNumber: number of interface */ + VCPKYBRD_KEYBOARD_INTERFACE, /* bInterfaceNumber: number of interface */ 0x00, /* bAlternateSetting: alternate set */ 0x01, /* bNumEndpoints: number of endpoints */ USB_CLASS_CODE_HID, /* bInterfaceClass: class code hid */ @@ -218,21 +218,21 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(VCPKYBRD_BCD_NUM), + HBYTE(VCPKYBRD_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_vcpkybrd_hid_report)), + HBYTE(sizeof(g_usbd_vcpkybrd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_VCPKYBRD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_VCPKYBRD_IN_MAXPACKET_SIZE), + HBYTE(USBD_VCPKYBRD_IN_MAXPACKET_SIZE),/* wMaxPacketSize: maximum packe size this endpoint */ + VCPKYBRD_HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -241,17 +241,17 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_vcpkybrd_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(VCPKYBRD_BCD_NUM), + HBYTE(VCPKYBRD_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_vcpkybrd_hid_report)), + HBYTE(sizeof(g_usbd_vcpkybrd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ }; /** @@ -260,7 +260,7 @@ ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_usbd_vcpkybrd_hid_report[USBD_VCPKYBRD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x06, // USAGE (Keyboard) @@ -301,9 +301,9 @@ ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_VCPKYBRD_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_VCPKYBRD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -315,42 +315,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_VCPKYBRD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_VCPKYBRD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_VCPKYBRD_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_VCPKYBRD_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_VCPKYBRD_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -358,7 +358,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -432,7 +432,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -442,7 +442,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -452,7 +452,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -462,7 +462,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -472,7 +472,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -483,9 +483,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_VCPKYBRD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -495,9 +495,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_VCPKYBRD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -507,7 +507,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -518,9 +518,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_VCPKYBRD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -530,9 +530,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_VCPKYBRD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h index 10f7d721..351234d4 100644 --- a/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h +++ b/middlewares/usbd_class/composite_cdc_keyboard/cdc_keyboard_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file cdc_keyboard_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb cdc and keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -50,67 +50,42 @@ extern "C" { /** * @brief usb bcd number define */ -#define BCD_NUM 0x0110 +#define VCPKYBRD_BCD_NUM 0x0110 /** * @brief usb vendor id and product id define */ -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5750 +#define USBD_VCPKYBRD_VENDOR_ID 0x2E3C +#define USBD_VCPKYBRD_PRODUCT_ID 0x5750 -/** - * @brief usb bcd number define - */ -#define HID_BCD_NUM 0x0110 - -/** - * @brief usb hid class descriptor define - */ -#define HID_CLASS_DESC_HID 0x21 -#define HID_CLASS_DESC_REPORT 0x22 -#define HID_CLASS_DESC_PHYSICAL 0x23 /** * @brief usb descriptor size define */ -#define USBD_CONFIG_DESC_SIZE 108 -#define USBD_HID_SIZ_REPORT_DESC 63 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_VCPKYBRD_CONFIG_DESC_SIZE 108 +#define USBD_VCPKYBRD_HID_SIZ_REPORT_DESC 63 +#define USBD_VCPKYBRD_SIZ_STRING_LANGID 4 +#define USBD_VCPKYBRD_SIZ_STRING_SERIAL 0x1A /** * @brief usb string define(vendor, product configuration, interface) */ -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "AT32 Composite VCP and Keyboard" -#define USBD_DESC_CONFIGURATION_STRING "Composite VCP and Keyboard Config" -#define USBD_DESC_INTERFACE_STRING "Composite VCP and Keyboard Interface" +#define USBD_VCPKYBRD_DESC_MANUFACTURER_STRING "Artery" +#define USBD_VCPKYBRD_DESC_PRODUCT_STRING "AT32 Composite VCP and Keyboard" +#define USBD_VCPKYBRD_DESC_CONFIGURATION_STRING "Composite VCP and Keyboard Config" +#define USBD_VCPKYBRD_DESC_INTERFACE_STRING "Composite VCP and Keyboard Interface" /** * @brief usb endpoint interval define */ -#define HID_BINTERVAL_TIME 0x0A - -/** - * @brief usb cdc class descriptor define - */ -#define USBD_CDC_CS_INTERFACE 0x24 -#define USBD_CDC_CS_ENDPOINT 0x25 - -/** - * @brief usb cdc class sub-type define - */ -#define USBD_CDC_SUBTYPE_HEADER 0x00 -#define USBD_CDC_SUBTYPE_CMF 0x01 -#define USBD_CDC_SUBTYPE_ACM 0x02 -#define USBD_CDC_SUBTYPE_UFD 0x06 +#define VCPKYBRD_HID_BINTERVAL_TIME 0x0A /** * @brief usb interface define */ -#define CDC_INTERFACE 0x00 -#define CDC_DATA_INTERFACE 0x01 -#define HID_KEYBOARD_INTERFACE 0x02 +#define VCPKYBRD_CDC_INTERFACE 0x00 +#define VCPKYBRD_CDC_DATA_INTERFACE 0x01 +#define VCPKYBRD_KEYBOARD_INTERFACE 0x02 /** * @brief usb mcu id address deine @@ -122,13 +97,11 @@ extern "C" { /** * @} */ - -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; -extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; -extern uint8_t g_hid_usb_desc[9]; +extern uint8_t g_usbd_vcpkybrd_hid_report[USBD_VCPKYBRD_HID_SIZ_REPORT_DESC]; +extern uint8_t g_vcpkybrd_hid_usb_desc[9]; extern usbd_desc_handler cdc_keyboard_desc_handler; + /** * @} */ diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.c b/middlewares/usbd_class/custom_hid/custom_hid_class.c index 4835172d..58167e90 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_class.c +++ b/middlewares/usbd_class/custom_hid/custom_hid_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb custom hid class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,27 +40,18 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len); -/* usb hid rx and tx buffer */ -static uint8_t g_rxhid_buff[USBD_OUT_MAXPACKET_SIZE]; -static uint8_t g_txhid_buff[USBD_IN_MAXPACKET_SIZE]; - -/* custom hid static variable */ -static uint32_t hid_protocol = 0; -static uint32_t hid_set_idle = 0; -static uint32_t alt_setting = 0; -static uint8_t hid_state; -uint8_t hid_set_report[64]; +static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len); +custom_hid_type custom_hid_struct; /* usb device class handler */ usbd_class_handler custom_hid_class_handler = @@ -74,6 +65,7 @@ usbd_class_handler custom_hid_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &custom_hid_struct }; /** @@ -85,21 +77,21 @@ usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; #ifndef USB_EPT_AUTO_MALLOC_BUFFER /* use user define buffer address */ - usbd_ept_buf_custom_define(pudev, USBD_HID_IN_EPT, EPT1_TX_ADDR); - usbd_ept_buf_custom_define(pudev, USBD_HID_OUT_EPT, EPT1_RX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_CUSTOM_HID_IN_EPT, EPT1_TX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_CUSTOM_HID_OUT_EPT, EPT1_RX_ADDR); #endif /* open custom hid in endpoint */ - usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_CUSTOM_HID_IN_EPT, EPT_INT_TYPE, USBD_CUSTOM_IN_MAXPACKET_SIZE); /* open custom hid out endpoint */ - usbd_ept_open(pudev, USBD_HID_OUT_EPT, EPT_INT_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_CUSTOM_HID_OUT_EPT, EPT_INT_TYPE, USBD_CUSTOM_OUT_MAXPACKET_SIZE); /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_CUSTOM_HID_OUT_EPT, pcshid->g_rxhid_buff, USBD_CUSTOM_OUT_MAXPACKET_SIZE); return status; } @@ -109,16 +101,16 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; /* close custom hid in endpoint */ - usbd_ept_close(pudev, USBD_HID_IN_EPT); + usbd_ept_close(pudev, USBD_CUSTOM_HID_IN_EPT); /* close custom hid out endpoint */ - usbd_ept_close(pudev, USBD_HID_OUT_EPT); + usbd_ept_close(pudev, USBD_CUSTOM_HID_OUT_EPT); return status; } @@ -129,10 +121,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -143,20 +136,20 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case HID_REQ_SET_PROTOCOL: - hid_protocol = (uint8_t)setup->wValue; + pcshid->hid_protocol = (uint8_t)setup->wValue; break; case HID_REQ_GET_PROTOCOL: - usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pcshid->hid_protocol, 1); break; case HID_REQ_SET_IDLE: - hid_set_idle = (uint8_t)(setup->wValue >> 8); + pcshid->hid_set_idle = (uint8_t)(setup->wValue >> 8); break; case HID_REQ_GET_IDLE: - usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pcshid->hid_set_idle, 1); break; case HID_REQ_SET_REPORT: - hid_state = HID_REQ_SET_REPORT; - usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + pcshid->hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, pcshid->hid_set_report, setup->wLength); break; default: usbd_ctrl_unsupport(pudev); @@ -170,21 +163,21 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if(setup->wValue >> 8 == HID_REPORT_DESC) { - len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); - buf = (uint8_t *)g_usbd_hid_report; + len = MIN(USBD_CUSHID_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_custom_hid_report; } else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) { len = MIN(9, setup->wLength); - buf = (uint8_t *)g_hid_usb_desc; + buf = (uint8_t *)g_custom_hid_usb_desc; } usbd_ctrl_send(pudev, (uint8_t *)buf, len); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pcshid->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + pcshid->alt_setting = setup->wValue; break; default: break; @@ -202,7 +195,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -216,18 +209,18 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( hid_state == HID_REQ_SET_REPORT) + if( pcshid->hid_state == HID_REQ_SET_REPORT) { /* hid buffer process */ - usb_hid_buf_process(udev, hid_set_report, recv_len); - hid_state = 0; + usb_hid_buf_process(udev, pcshid->hid_set_report, recv_len); + pcshid->hid_state = 0; } return status; @@ -239,7 +232,7 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; @@ -256,19 +249,20 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; /* get endpoint receive data length */ uint32_t recv_len = usbd_get_recv_len(pudev, ept_num); /* hid buffer process */ - usb_hid_buf_process(udev, g_rxhid_buff, recv_len); + usb_hid_buf_process(udev, pcshid->g_rxhid_buff, recv_len); /* start receive next packet */ - usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, recv_len); + usbd_ept_recv(pudev, USBD_CUSTOM_HID_OUT_EPT, pcshid->g_rxhid_buff, recv_len); return status; } @@ -278,7 +272,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -293,7 +287,7 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; switch(event) @@ -325,13 +319,13 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param len: report length * @retval status of usb_sts_type */ -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +usb_sts_type custom_hid_class_send_report(void *udev, uint8_t *report, uint16_t len) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_ept_send(pudev, USBD_CUSTOM_HID_IN_EPT, report, len); return status; } @@ -343,15 +337,16 @@ usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) * @param len: report length * @retval none */ -void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) +static void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) { uint32_t i_index; usbd_core_type *pudev = (usbd_core_type *)udev; + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; switch(report[0]) { case HID_REPORT_ID_2: - if(g_rxhid_buff[1] == 0) + if(pcshid->g_rxhid_buff[1] == 0) { at32_led_off(LED2); } @@ -361,7 +356,7 @@ void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) } break; case HID_REPORT_ID_3: - if(g_rxhid_buff[1] == 0) + if(pcshid->g_rxhid_buff[1] == 0) { at32_led_off(LED3); } @@ -371,7 +366,7 @@ void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) } break; case HID_REPORT_ID_4: - if(g_rxhid_buff[1] == 0) + if(pcshid->g_rxhid_buff[1] == 0) { at32_led_off(LED4); } @@ -383,9 +378,9 @@ void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len) case HID_REPORT_ID_6: for(i_index = 0; i_index < len; i_index ++) { - g_txhid_buff[i_index] = report[i_index]; + pcshid->g_txhid_buff[i_index] = report[i_index]; } - usbd_ept_send(pudev, USBD_HID_IN_EPT, g_txhid_buff, len); + usbd_ept_send(pudev, USBD_CUSTOM_HID_IN_EPT, pcshid->g_txhid_buff, len); default: break; } diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.h b/middlewares/usbd_class/custom_hid/custom_hid_class.h index 2368a204..c43f7b7f 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_class.h +++ b/middlewares/usbd_class/custom_hid/custom_hid_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb custom hid header file ************************************************************************** * Copyright notice & Disclaimer @@ -50,14 +50,14 @@ extern "C" { /** * @brief usb custom hid use endpoint define */ -#define USBD_HID_IN_EPT 0x81 -#define USBD_HID_OUT_EPT 0x01 +#define USBD_CUSTOM_HID_IN_EPT 0x81 +#define USBD_CUSTOM_HID_OUT_EPT 0x01 /** * @brief usb custom hid in and out max packet size define */ -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 +#define USBD_CUSTOM_IN_MAXPACKET_SIZE 0x40 +#define USBD_CUSTOM_OUT_MAXPACKET_SIZE 0x40 /** * @} @@ -67,17 +67,17 @@ extern "C" { * @{ */ -/** - * @brief usb custom hid class request code define - */ -#define HID_REQ_SET_PROTOCOL 0x0B -#define HID_REQ_GET_PROTOCOL 0x03 -#define HID_REQ_SET_IDLE 0x0A -#define HID_REQ_GET_IDLE 0x02 -#define HID_REQ_SET_REPORT 0x09 -#define HID_REQ_GET_REPORT 0x01 -#define HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESC 0x22 +typedef struct +{ + uint8_t g_rxhid_buff[USBD_CUSTOM_OUT_MAXPACKET_SIZE]; + uint8_t g_txhid_buff[USBD_CUSTOM_IN_MAXPACKET_SIZE]; + + uint32_t hid_protocol; + uint32_t hid_set_idle; + uint32_t alt_setting; + uint8_t hid_state; + uint8_t hid_set_report[64]; +}custom_hid_type; /** * @} @@ -87,7 +87,7 @@ extern "C" { * @{ */ extern usbd_class_handler custom_hid_class_handler; -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); +usb_sts_type custom_hid_class_send_report(void *udev, uint8_t *report, uint16_t len); /** * @} */ diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.c b/middlewares/usbd_class/custom_hid/custom_hid_desc.c index 5135874f..ec5ed558 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_desc.c +++ b/middlewares/usbd_class/custom_hid/custom_hid_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -40,19 +40,18 @@ /** @defgroup USB_custom_hid_desc_private_functions * @{ */ +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); - -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -60,7 +59,7 @@ static uint8_t g_usbd_desc_buffer[256]; /** * @brief custom hid device descriptor handler structure */ -usbd_desc_handler hid_desc_handler = +usbd_desc_handler custom_hid_desc_handler = { get_device_descriptor, get_device_qualifier, @@ -80,7 +79,7 @@ usbd_desc_handler hid_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -90,10 +89,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_CUSHID_VENDOR_ID), /* idVendor */ + HBYTE(USBD_CUSHID_VENDOR_ID), /* idVendor */ + LBYTE(USBD_CUSHID_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_CUSHID_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -108,12 +107,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_CUSHID_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_CUSHID_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_CUSHID_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x01, /* bNumInterfaces: 1 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -133,29 +132,29 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(CUSHID_BCD_NUM), + HBYTE(CUSHID_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_custom_hid_report)), + HBYTE(sizeof(g_usbd_custom_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_CUSTOM_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_CUSTOM_IN_MAXPACKET_SIZE), + HBYTE(USBD_CUSTOM_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + CUSHID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_CUSTOM_HID_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_OUT_MAXPACKET_SIZE), - HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_CUSTOM_OUT_MAXPACKET_SIZE), + HBYTE(USBD_CUSTOM_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + CUSHID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -164,7 +163,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_usbd_custom_hid_report[USBD_CUSHID_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x06, 0xFF, 0x00, /* USAGE_PAGE(Vendor Page:0xFF00) */ 0x09, 0x01, /* USAGE (Demo Kit) */ @@ -262,17 +261,17 @@ ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_custom_hid_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(CUSHID_BCD_NUM), + HBYTE(CUSHID_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_custom_hid_report)), + HBYTE(sizeof(g_usbd_custom_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ }; @@ -282,9 +281,9 @@ ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_CUSHID_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_CUSHID_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -296,42 +295,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_CUSHID_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_CUSHID_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_CUSHID_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_CUSHID_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_CUSHID_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -339,7 +338,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -413,7 +412,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -423,7 +422,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -433,7 +432,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -443,7 +442,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -453,7 +452,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -464,9 +463,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CUSHID_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -476,9 +475,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CUSHID_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -488,7 +487,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -499,9 +498,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CUSHID_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -511,9 +510,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_CUSHID_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.h b/middlewares/usbd_class/custom_hid/custom_hid_desc.h index b0fed861..86fe5a47 100644 --- a/middlewares/usbd_class/custom_hid/custom_hid_desc.h +++ b/middlewares/usbd_class/custom_hid/custom_hid_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file custom_hid_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb custom hid descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -46,46 +46,40 @@ extern "C" { /** @defgroup USB_custom_hid_desc_definition * @{ */ - + + /** * @brief usb bcd number define */ -#define HID_BCD_NUM 0x0110 - -/** - * @brief usb hid class descriptor define - */ -#define HID_CLASS_DESC_HID 0x21 -#define HID_CLASS_DESC_REPORT 0x22 -#define HID_CLASS_DESC_PHYSICAL 0x23 +#define CUSHID_BCD_NUM 0x0110 /** * @brief usb vendor id and product id define */ -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5745 +#define USBD_CUSHID_VENDOR_ID 0x2E3C +#define USBD_CUSHID_PRODUCT_ID 0x5745 /** * @brief usb descriptor size define */ -#define USBD_CONFIG_DESC_SIZE 41 -#define USBD_HID_SIZ_REPORT_DESC 126 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_CUSHID_CONFIG_DESC_SIZE 41 +#define USBD_CUSHID_SIZ_REPORT_DESC 126 +#define USBD_CUSHID_SIZ_STRING_LANGID 4 +#define USBD_CUSHID_SIZ_STRING_SERIAL 0x1A /** * @brief usb string define(vendor, product configuration, interface) */ -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "Custom HID" -#define USBD_DESC_CONFIGURATION_STRING "Custom HID Config" -#define USBD_DESC_INTERFACE_STRING "Custom HID Interface" +#define USBD_CUSHID_DESC_MANUFACTURER_STRING "Artery" +#define USBD_CUSHID_DESC_PRODUCT_STRING "Custom HID" +#define USBD_CUSHID_DESC_CONFIGURATION_STRING "Custom HID Config" +#define USBD_CUSHID_DESC_INTERFACE_STRING "Custom HID Interface" + +#define CUSHID_BINTERVAL_TIME 0x0A /** - * @brief usb hid endpoint interval define + * @brief usb hid report id define */ -#define HID_BINTERVAL_TIME 0x0A - /** * @brief usb hid report id define */ @@ -99,19 +93,16 @@ extern "C" { /** * @brief usb mcu id address deine */ -#define MCU_ID1 (0x1FFFF7E8) -#define MCU_ID2 (0x1FFFF7EC) -#define MCU_ID3 (0x1FFFF7F0) +#define MCU_ID1 (0x1FFFF7E8) +#define MCU_ID2 (0x1FFFF7EC) +#define MCU_ID3 (0x1FFFF7F0) /** * @} */ - -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; -extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; -extern uint8_t g_hid_usb_desc[9]; -extern usbd_desc_handler hid_desc_handler; +extern uint8_t g_usbd_custom_hid_report[USBD_CUSHID_SIZ_REPORT_DESC]; +extern uint8_t g_custom_hid_usb_desc[9]; +extern usbd_desc_handler custom_hid_desc_handler; /** * @} @@ -120,10 +111,10 @@ extern usbd_desc_handler hid_desc_handler; /** * @} */ - #ifdef __cplusplus } #endif #endif + diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.c b/middlewares/usbd_class/hid_iap/hid_iap_class.c index e40e7549..531b737b 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_class.c +++ b/middlewares/usbd_class/hid_iap/hid_iap_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid iap class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,26 +40,16 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); -void usb_hid_buf_process(void *udev, uint8_t *report, uint16_t len); -/* usb hid rx and tx buffer */ -static uint8_t g_rxhid_buff[USBD_OUT_MAXPACKET_SIZE]; - -/* custom hid static variable */ -static uint32_t hid_protocol = 0; -static uint32_t hid_set_idle = 0; -static uint32_t alt_setting = 0; -static uint8_t hid_state; -uint8_t hid_set_report[64]; +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); iap_info_type iap_info; @@ -75,6 +65,7 @@ usbd_class_handler hid_iap_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &iap_info }; /** @@ -82,19 +73,19 @@ usbd_class_handler hid_iap_class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + iap_info_type *piap = (iap_info_type *)pudev->class_handler->pdata; /* open hid iap in endpoint */ - usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_HIDIAP_IN_EPT, EPT_INT_TYPE, USBD_HIDIAP_IN_MAXPACKET_SIZE); /* open hid iap out endpoint */ - usbd_ept_open(pudev, USBD_HID_OUT_EPT, EPT_INT_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_HIDIAP_OUT_EPT, EPT_INT_TYPE, USBD_HIDIAP_OUT_MAXPACKET_SIZE); /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_HIDIAP_OUT_EPT, piap->g_rxhid_buff, USBD_HIDIAP_OUT_MAXPACKET_SIZE); return status; } @@ -104,16 +95,16 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; /* close hid iap in endpoint */ - usbd_ept_close(pudev, USBD_HID_IN_EPT); + usbd_ept_close(pudev, USBD_HIDIAP_IN_EPT); /* close hid iap out endpoint */ - usbd_ept_close(pudev, USBD_HID_OUT_EPT); + usbd_ept_close(pudev, USBD_HIDIAP_OUT_EPT); return status; } @@ -124,10 +115,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + iap_info_type *piap = (iap_info_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -138,20 +130,20 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case HID_REQ_SET_PROTOCOL: - hid_protocol = (uint8_t)setup->wValue; + piap->hid_protocol = (uint8_t)setup->wValue; break; case HID_REQ_GET_PROTOCOL: - usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + usbd_ctrl_send(pudev, (uint8_t *)&piap->hid_protocol, 1); break; case HID_REQ_SET_IDLE: - hid_set_idle = (uint8_t)(setup->wValue >> 8); + piap->hid_set_idle = (uint8_t)(setup->wValue >> 8); break; case HID_REQ_GET_IDLE: - usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + usbd_ctrl_send(pudev, (uint8_t *)&piap->hid_set_idle, 1); break; case HID_REQ_SET_REPORT: - hid_state = HID_REQ_SET_REPORT; - usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + piap->hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, piap->hid_set_report, setup->wLength); break; default: usbd_ctrl_unsupport(pudev); @@ -165,21 +157,21 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if(setup->wValue >> 8 == HID_REPORT_DESC) { - len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); - buf = (uint8_t *)g_usbd_hid_report; + len = MIN(USBD_HIDIAP_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_hidiap_report; } else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) { len = MIN(9, setup->wLength); - buf = (uint8_t *)g_hid_usb_desc; + buf = (uint8_t *)g_hidiap_usb_desc; } usbd_ctrl_send(pudev, (uint8_t *)buf, len); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&piap->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + piap->alt_setting = setup->wValue; break; default: break; @@ -197,7 +189,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -211,16 +203,17 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + iap_info_type *piap = (iap_info_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( hid_state == HID_REQ_SET_REPORT) + if( piap->hid_state == HID_REQ_SET_REPORT) { /* hid buffer process */ - hid_state = 0; + piap->hid_state = 0; } return status; @@ -232,7 +225,7 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; @@ -250,19 +243,20 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + iap_info_type *piap = (iap_info_type *)pudev->class_handler->pdata; /* get endpoint receive data length */ uint32_t recv_len = usbd_get_recv_len(pudev, ept_num); /* hid iap process */ - usbd_hid_iap_process(udev, g_rxhid_buff, recv_len); + usbd_hid_iap_process(udev, piap->g_rxhid_buff, recv_len); /* start receive next packet */ - usbd_ept_recv(pudev, USBD_HID_OUT_EPT, g_rxhid_buff, 0x40); + usbd_ept_recv(pudev, USBD_HIDIAP_OUT_EPT, piap->g_rxhid_buff, USBD_HIDIAP_OUT_MAXPACKET_SIZE); return status; } @@ -272,7 +266,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -287,7 +281,7 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; switch(event) @@ -319,13 +313,13 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param len: report length * @retval status of usb_sts_type */ -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +usb_sts_type usb_iap_class_send_report(void *udev, uint8_t *report, uint16_t len) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_ept_send(pudev, USBD_HIDIAP_IN_EPT, report, len); return status; } diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.h b/middlewares/usbd_class/hid_iap/hid_iap_class.h index 258dc29f..99cc9d24 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_class.h +++ b/middlewares/usbd_class/hid_iap/hid_iap_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid iap header file ************************************************************************** * Copyright notice & Disclaimer @@ -35,6 +35,7 @@ extern "C" { #include "usb_std.h" #include "usbd_core.h" + /** @addtogroup AT32F403A_407_middlewares_usbd_class * @{ */ @@ -47,23 +48,12 @@ extern "C" { * @{ */ -#define USBD_HID_IN_EPT 0x81 -#define USBD_HID_OUT_EPT 0x01 -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 +#define USBD_HIDIAP_IN_EPT 0x81 +#define USBD_HIDIAP_OUT_EPT 0x01 -#define HID_REQ_SET_PROTOCOL 0x0B -#define HID_REQ_GET_PROTOCOL 0x03 - -#define HID_REQ_SET_IDLE 0x0A -#define HID_REQ_GET_IDLE 0x02 - -#define HID_REQ_SET_REPORT 0x09 -#define HID_REQ_GET_REPORT 0x01 - -#define HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESC 0x22 +#define USBD_HIDIAP_IN_MAXPACKET_SIZE 0x40 +#define USBD_HIDIAP_OUT_MAXPACKET_SIZE 0x40 #define FLASH_SIZE_REG() ((*(uint32_t *)0x1FFFF7E0) & 0xFFFF) /*Get Flash size*/ #define KB_TO_B(kb) ((kb) << 10) @@ -115,8 +105,8 @@ typedef struct { uint8_t iap_fifo[HID_IAP_BUFFER_LEN]; - uint8_t iap_rx[USBD_OUT_MAXPACKET_SIZE]; - uint8_t iap_tx[USBD_IN_MAXPACKET_SIZE]; + uint8_t iap_rx[USBD_HIDIAP_OUT_MAXPACKET_SIZE]; + uint8_t iap_tx[USBD_HIDIAP_IN_MAXPACKET_SIZE]; uint32_t fifo_length; uint32_t tx_length; @@ -131,14 +121,21 @@ typedef struct uint32_t sector_size; uint32_t flash_size; + uint32_t respond_flag; + + uint8_t g_rxhid_buff[USBD_HIDIAP_OUT_MAXPACKET_SIZE]; + uint32_t hid_protocol; + uint32_t hid_set_idle; + uint32_t alt_setting; + uint32_t hid_state; + uint8_t hid_set_report[64]; + iap_machine_state_type state; - uint8_t respond_flag; }iap_info_type; extern usbd_class_handler hid_iap_class_handler; extern iap_info_type iap_info; -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); - +usb_sts_type usb_iap_class_send_report(void *udev, uint8_t *report, uint16_t len); iap_result_type usbd_hid_iap_process(void *udev, uint8_t *report, uint16_t len); void usbd_hid_iap_in_complete(void *udev); @@ -153,9 +150,10 @@ void usbd_hid_iap_in_complete(void *udev); /** * @} */ - #ifdef __cplusplus } #endif #endif + + diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.c b/middlewares/usbd_class/hid_iap/hid_iap_desc.c index 0dea9695..854571a3 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_desc.c +++ b/middlewares/usbd_class/hid_iap/hid_iap_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -28,6 +28,7 @@ #include "usbd_core.h" #include "hid_iap_desc.h" + /** @addtogroup AT32F403A_407_middlewares_usbd_class * @{ */ @@ -41,18 +42,19 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); + +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -80,7 +82,7 @@ usbd_desc_handler hid_iap_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -90,10 +92,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_HIDIAP_VENDOR_ID), /* idVendor */ + HBYTE(USBD_HIDIAP_VENDOR_ID), /* idVendor */ + LBYTE(USBD_HIDIAP_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_HIDIAP_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -108,12 +110,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_HIDIAP_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_HIDIAP_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_HIDIAP_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x01, /* bNumInterfaces: 1 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -133,29 +135,29 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(HIDIAP_BCD_NUM), + HBYTE(HIDIAP_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_hidiap_report)), + HBYTE(sizeof(g_usbd_hidiap_report)), /* wDescriptorLength: total length of reprot descriptor */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_HIDIAP_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_HIDIAP_IN_MAXPACKET_SIZE), + HBYTE(USBD_HIDIAP_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HIDIAP_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_HIDIAP_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_OUT_MAXPACKET_SIZE), - HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_HIDIAP_OUT_MAXPACKET_SIZE), + HBYTE(USBD_HIDIAP_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + HIDIAP_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -164,7 +166,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_usbd_hidiap_report[USBD_HIDIAP_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x06, 0xFF, 0x00, /* USAGE_PAGE(Vendor Page:0xFF00) */ 0x09, 0x01, /* USAGE (Demo Kit) */ @@ -195,17 +197,17 @@ ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_hidiap_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(HIDIAP_BCD_NUM), + HBYTE(HIDIAP_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_hidiap_report)), + HBYTE(sizeof(g_usbd_hidiap_report)), /* wDescriptorLength: total length of reprot descriptor */ }; @@ -215,9 +217,9 @@ ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_HIDIAP_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_HIDIAP_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -229,42 +231,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_HIDIAP_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_HIDIAP_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_HIDIAP_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_HIDIAP_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_HIDIAP_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -272,7 +274,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -346,7 +348,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -356,7 +358,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -366,7 +368,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -376,7 +378,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -386,7 +388,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -397,9 +399,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_HIDIAP_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -409,9 +411,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_HIDIAP_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -421,7 +423,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -432,9 +434,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_HIDIAP_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -444,9 +446,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_HIDIAP_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -462,3 +464,5 @@ usbd_desc_t *get_device_config_string(void) /** * @} */ + + diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.h b/middlewares/usbd_class/hid_iap/hid_iap_desc.h index cae3733e..42a58539 100644 --- a/middlewares/usbd_class/hid_iap/hid_iap_desc.h +++ b/middlewares/usbd_class/hid_iap/hid_iap_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file hid_iap_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -47,40 +47,33 @@ extern "C" { * @{ */ -#define HID_BCD_NUM 0x0110 -#define HID_CLASS_DESC_HID 0x21 -#define HID_CLASS_DESC_REPORT 0x22 -#define HID_CLASS_DESC_PHYSICAL 0x23 +#define HIDIAP_BCD_NUM 0x0110 +#define USBD_HIDIAP_VENDOR_ID 0x2E3C +#define USBD_HIDIAP_PRODUCT_ID 0xAF01 -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0xAF01 +#define USBD_HIDIAP_CONFIG_DESC_SIZE 41 +#define USBD_HIDIAP_SIZ_REPORT_DESC 32 +#define USBD_HIDIAP_SIZ_STRING_LANGID 4 +#define USBD_HIDIAP_SIZ_STRING_SERIAL 0x1A -#define USBD_CONFIG_DESC_SIZE 41 -#define USBD_HID_SIZ_REPORT_DESC 32 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A - -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "HID IAP" -#define USBD_DESC_CONFIGURATION_STRING "HID IAP Config" -#define USBD_DESC_INTERFACE_STRING "HID IAP Interface" - -#define HID_BINTERVAL_TIME 0x01 +#define USBD_HIDIAP_DESC_MANUFACTURER_STRING "Artery" +#define USBD_HIDIAP_DESC_PRODUCT_STRING "HID IAP" +#define USBD_HIDIAP_DESC_CONFIGURATION_STRING "HID IAP Config" +#define USBD_HIDIAP_DESC_INTERFACE_STRING "HID IAP Interface" +#define HIDIAP_BINTERVAL_TIME 0x01 #define MCU_ID1 (0x1FFFF7E8) #define MCU_ID2 (0x1FFFF7EC) #define MCU_ID3 (0x1FFFF7F0) - -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; -extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; -extern uint8_t g_hid_usb_desc[9]; +extern uint8_t g_usbd_hidiap_report[USBD_HIDIAP_SIZ_REPORT_DESC]; +extern uint8_t g_hidiap_usb_desc[9]; extern usbd_desc_handler hid_iap_desc_handler; + /** * @} */ @@ -98,3 +91,4 @@ extern usbd_desc_handler hid_iap_desc_handler; #endif #endif + diff --git a/middlewares/usbd_class/keyboard/keyboard_class.c b/middlewares/usbd_class/keyboard/keyboard_class.c index 3ab697e9..6d7ee1cc 100644 --- a/middlewares/usbd_class/keyboard/keyboard_class.c +++ b/middlewares/usbd_class/keyboard/keyboard_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid keyboard class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,27 +40,19 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); - -/* hid static variable */ -static uint32_t hid_protocol = 0; -static uint32_t hid_set_idle = 0; -static uint32_t alt_setting = 0; -static uint8_t hid_state; -__IO uint8_t hid_suspend_flag = 0; -uint8_t hid_set_report[64]; -__IO uint8_t g_u8tx_completed = 0; +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); +keyboard_type keyboard_struct; #define SHIFT 0x80 -const unsigned char _asciimap[128] = +const static unsigned char _asciimap[128] = { 0x00,// NUL 0x00,// SOH @@ -205,6 +197,7 @@ usbd_class_handler keyboard_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &keyboard_struct }; /** @@ -212,20 +205,20 @@ usbd_class_handler keyboard_class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; #ifndef USB_EPT_AUTO_MALLOC_BUFFER /* use user define buffer address */ - usbd_ept_buf_custom_define(pudev, USBD_HID_IN_EPT, EPT1_TX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_KEYBOARD_IN_EPT, EPT1_TX_ADDR); #endif /* open hid in endpoint */ - usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_KEYBOARD_IN_EPT, EPT_INT_TYPE, USBD_KEYBOARD_IN_MAXPACKET_SIZE); - g_u8tx_completed = 1; + pkeyboard->g_u8tx_completed = 1; return status; } @@ -235,13 +228,13 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; /* close hid in endpoint */ - usbd_ept_close(pudev, USBD_HID_IN_EPT); + usbd_ept_close(pudev, USBD_KEYBOARD_IN_EPT); return status; } @@ -252,10 +245,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -266,20 +260,20 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case HID_REQ_SET_PROTOCOL: - hid_protocol = (uint8_t)setup->wValue; + pkeyboard->hid_protocol = (uint8_t)setup->wValue; break; case HID_REQ_GET_PROTOCOL: - usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pkeyboard->hid_protocol, 1); break; case HID_REQ_SET_IDLE: - hid_set_idle = (uint8_t)(setup->wValue >> 8); + pkeyboard->hid_set_idle = (uint8_t)(setup->wValue >> 8); break; case HID_REQ_GET_IDLE: - usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pkeyboard->hid_set_idle, 1); break; case HID_REQ_SET_REPORT: - hid_state = HID_REQ_SET_REPORT; - usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + pkeyboard->hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, pkeyboard->hid_set_report, setup->wLength); break; default: usbd_ctrl_unsupport(pudev); @@ -293,21 +287,21 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if(setup->wValue >> 8 == HID_REPORT_DESC) { - len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); - buf = (uint8_t *)g_usbd_hid_report; + len = MIN(USBD_KEYBOARD_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_keyboard_report; } else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) { len = MIN(9, setup->wLength); - buf = (uint8_t *)g_hid_usb_desc; + buf = (uint8_t *)g_keyboard_usb_desc; } usbd_ctrl_send(pudev, (uint8_t *)buf, len); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pkeyboard->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + pkeyboard->alt_setting = setup->wValue; break; default: break; @@ -325,7 +319,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -339,16 +333,17 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( hid_state == HID_REQ_SET_REPORT) + if( pkeyboard->hid_state == HID_REQ_SET_REPORT) { /* hid buffer process */ - hid_state = 0; + pkeyboard->hid_state = 0; } return status; @@ -360,14 +355,16 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; /* ...user code... trans next packet data */ - g_u8tx_completed = 1; + pkeyboard->g_u8tx_completed = 1; return status; } @@ -378,7 +375,7 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; @@ -390,7 +387,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -405,9 +402,11 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; switch(event) { case USBD_RESET_EVENT: @@ -416,7 +415,7 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) break; case USBD_SUSPEND_EVENT: - hid_suspend_flag = 1; + pkeyboard->hid_suspend_flag = 1; /* ...user code... */ break; @@ -437,13 +436,13 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param len: report length * @retval status of usb_sts_type */ -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +usb_sts_type usb_keyboard_class_send_report(void *udev, uint8_t *report, uint16_t len) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_ept_send(pudev, USBD_KEYBOARD_IN_EPT, report, len); return status; } @@ -458,8 +457,8 @@ usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code) { uint8_t key_data = 0; - static uint8_t temp = 0; - static uint8_t keyboard_buf[8] = {0, 0, 6, 0, 0, 0, 0, 0}; + usbd_core_type *pudev = (usbd_core_type *)udev; + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; if(ascii_code > 128) { @@ -480,17 +479,17 @@ void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code) } } - if((temp == ascii_code) && (ascii_code != 0)) + if((pkeyboard->temp == ascii_code) && (ascii_code != 0)) { - keyboard_buf[0] = 0; - keyboard_buf[2] = 0; - class_send_report(udev, keyboard_buf, 8); + pkeyboard->keyboard_buf[0] = 0; + pkeyboard->keyboard_buf[2] = 0; + usb_keyboard_class_send_report(udev, pkeyboard->keyboard_buf, 8); } else { - keyboard_buf[0] = key_data; - keyboard_buf[2] = ascii_code; - class_send_report(udev, keyboard_buf, 8); + pkeyboard->keyboard_buf[0] = key_data; + pkeyboard->keyboard_buf[2] = ascii_code; + usb_keyboard_class_send_report(udev, pkeyboard->keyboard_buf, 8); } } diff --git a/middlewares/usbd_class/keyboard/keyboard_class.h b/middlewares/usbd_class/keyboard/keyboard_class.h index c37fc513..146faa6a 100644 --- a/middlewares/usbd_class/keyboard/keyboard_class.h +++ b/middlewares/usbd_class/keyboard/keyboard_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid keyboard header file ************************************************************************** * Copyright notice & Disclaimer @@ -50,45 +50,40 @@ extern "C" { /** * @brief usb hid use endpoint define */ -#define USBD_HID_IN_EPT 0x81 +#define USBD_KEYBOARD_IN_EPT 0x81 /** * @brief usb hid in and out max packet size define */ -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 +#define USBD_KEYBOARD_IN_MAXPACKET_SIZE 0x40 +#define USBD_KEYBOARD_OUT_MAXPACKET_SIZE 0x40 /** * @} */ -/** @defgroup USB_hid_class_request_code_definition - * @{ - */ + +typedef struct +{ + uint32_t hid_protocol; + uint32_t hid_set_idle; + uint32_t alt_setting; + uint8_t hid_set_report[64]; + uint8_t keyboard_buf[8]; -/** - * @brief usb hid class request code define - */ -#define HID_REQ_SET_PROTOCOL 0x0B -#define HID_REQ_GET_PROTOCOL 0x03 -#define HID_REQ_SET_IDLE 0x0A -#define HID_REQ_GET_IDLE 0x02 -#define HID_REQ_SET_REPORT 0x09 -#define HID_REQ_GET_REPORT 0x01 -#define HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESC 0x22 - -/** - * @} - */ + __IO uint8_t hid_suspend_flag; + __IO uint8_t g_u8tx_completed; + uint8_t hid_state; + uint8_t temp; + +}keyboard_type; /** @defgroup USB_hid_class_exported_functions * @{ */ extern usbd_class_handler keyboard_class_handler; -extern __IO uint8_t g_u8tx_completed; -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); +usb_sts_type usb_keyboard_class_send_report(void *udev, uint8_t *report, uint16_t len); void usb_hid_keyboard_send_char(void *udev, uint8_t ascii_code); /** * @} diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.c b/middlewares/usbd_class/keyboard/keyboard_desc.c index 9a3e6f6f..fa4efb39 100644 --- a/middlewares/usbd_class/keyboard/keyboard_desc.c +++ b/middlewares/usbd_class/keyboard/keyboard_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -41,18 +41,18 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -80,7 +80,7 @@ usbd_desc_handler keyboard_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -90,10 +90,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_KEYBOARD_VENDOR_ID), /* idVendor */ + HBYTE(USBD_KEYBOARD_VENDOR_ID), /* idVendor */ + LBYTE(USBD_KEYBOARD_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_KEYBOARD_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -108,17 +108,17 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_KEYBOARD_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_KEYBOARD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_KEYBOARD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x01, /* bNumInterfaces: 1 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing the configuration */ - 0xE0, /* bmAttributes: self powered ans support remote wakeup*/ + 0xE0, /* bmAttributes: self powered and support remote wakeup*/ 0x32, /* MaxPower 100 mA: this current is used for detecting vbus */ USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ @@ -133,21 +133,21 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(KEYBOARD_BCD_NUM), + HBYTE(KEYBOARD_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_keyboard_report)), + HBYTE(sizeof(g_usbd_keyboard_report)), /* wDescriptorLength: total length of reprot descriptor */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_KEYBOARD_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_KEYBOARD_IN_MAXPACKET_SIZE), + HBYTE(USBD_KEYBOARD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + KEYBOARD_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -156,7 +156,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_usbd_keyboard_report[USBD_KEYBOARD_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x05, 0x01, // USAGE_PAGE (Generic Desktop) 0x09, 0x06, // USAGE (Keyboard) @@ -198,17 +198,17 @@ ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_keyboard_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(KEYBOARD_BCD_NUM), + HBYTE(KEYBOARD_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_keyboard_report)), + HBYTE(sizeof(g_usbd_keyboard_report)), /* wDescriptorLength: total length of reprot descriptor */ }; @@ -218,9 +218,9 @@ ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_KEYBOARD_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_KEYBOARD_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -232,42 +232,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_KEYBOARD_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_KEYBOARD_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_KEYBOARD_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_KEYBOARD_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_KEYBOARD_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -275,7 +275,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -349,7 +349,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -359,7 +359,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -369,7 +369,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -379,7 +379,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -389,7 +389,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -400,9 +400,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_KEYBOARD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -412,9 +412,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_KEYBOARD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -424,7 +424,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -435,9 +435,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_KEYBOARD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -447,9 +447,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_KEYBOARD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.h b/middlewares/usbd_class/keyboard/keyboard_desc.h index 58df7c7a..048a136c 100644 --- a/middlewares/usbd_class/keyboard/keyboard_desc.h +++ b/middlewares/usbd_class/keyboard/keyboard_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file keyboard_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -50,41 +50,34 @@ extern "C" { /** * @brief usb bcd number define */ -#define HID_BCD_NUM 0x0110 - -/** - * @brief usb hid class descriptor define - */ -#define HID_CLASS_DESC_HID 0x21 -#define HID_CLASS_DESC_REPORT 0x22 -#define HID_CLASS_DESC_PHYSICAL 0x23 +#define KEYBOARD_BCD_NUM 0x0110 /** * @brief usb vendor id and product id define */ -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x6040 +#define USBD_KEYBOARD_VENDOR_ID 0x2E3C +#define USBD_KEYBOARD_PRODUCT_ID 0x6040 /** * @brief usb descriptor size define */ -#define USBD_CONFIG_DESC_SIZE 34 -#define USBD_HID_SIZ_REPORT_DESC 63 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_KEYBOARD_CONFIG_DESC_SIZE 34 +#define USBD_KEYBOARD_SIZ_REPORT_DESC 63 +#define USBD_KEYBOARD_SIZ_STRING_LANGID 4 +#define USBD_KEYBOARD_SIZ_STRING_SERIAL 0x1A /** * @brief usb string define(vendor, product configuration, interface) */ -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "Keyboard" -#define USBD_DESC_CONFIGURATION_STRING "Keyboard Config" -#define USBD_DESC_INTERFACE_STRING "Keyboard Interface" +#define USBD_KEYBOARD_DESC_MANUFACTURER_STRING "Artery" +#define USBD_KEYBOARD_DESC_PRODUCT_STRING "Keyboard" +#define USBD_KEYBOARD_DESC_CONFIGURATION_STRING "Keyboard Config" +#define USBD_KEYBOARD_DESC_INTERFACE_STRING "Keyboard Interface" /** * @brief usb hid endpoint interval define */ -#define HID_BINTERVAL_TIME 0x0A +#define KEYBOARD_BINTERVAL_TIME 0x0A /** * @brief usb mcu id address deine @@ -96,11 +89,8 @@ extern "C" { /** * @} */ - -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; -extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; -extern uint8_t g_hid_usb_desc[9]; +extern uint8_t g_usbd_keyboard_report[USBD_KEYBOARD_SIZ_REPORT_DESC]; +extern uint8_t g_keyboard_usb_desc[9]; extern usbd_desc_handler keyboard_desc_handler; /** @@ -110,10 +100,10 @@ extern usbd_desc_handler keyboard_desc_handler; /** * @} */ - #ifdef __cplusplus } #endif #endif + diff --git a/middlewares/usbd_class/mouse/mouse_class.c b/middlewares/usbd_class/mouse/mouse_class.c index e0a06914..6c41c90d 100644 --- a/middlewares/usbd_class/mouse/mouse_class.c +++ b/middlewares/usbd_class/mouse/mouse_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid mouse class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,23 +40,17 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -/* hid static variable */ -static uint32_t hid_protocol = 0; -static uint32_t hid_set_idle = 0; -static uint32_t alt_setting = 0; -static uint8_t hid_state; -__IO uint8_t hid_suspend_flag = 0; -uint8_t hid_set_report[64]; +mouse_type mouse_struct; /* usb device class handler */ usbd_class_handler mouse_class_handler = @@ -70,6 +64,7 @@ usbd_class_handler mouse_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &mouse_struct }; /** @@ -77,19 +72,18 @@ usbd_class_handler mouse_class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; #ifndef USB_EPT_AUTO_MALLOC_BUFFER /* use user define buffer address */ - usbd_ept_buf_custom_define(pudev, USBD_HID_IN_EPT, EPT1_TX_ADDR); - usbd_ept_buf_custom_define(pudev, USBD_HID_OUT_EPT, EPT1_RX_ADDR); + usbd_ept_buf_custom_define(pudev, USBD_MOUSE_IN_EPT, EPT1_TX_ADDR); #endif /* open hid in endpoint */ - usbd_ept_open(pudev, USBD_HID_IN_EPT, EPT_INT_TYPE, USBD_IN_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_MOUSE_IN_EPT, EPT_INT_TYPE, USBD_MOUSE_IN_MAXPACKET_SIZE); return status; } @@ -99,13 +93,13 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; /* close hid in endpoint */ - usbd_ept_close(pudev, USBD_HID_IN_EPT); + usbd_ept_close(pudev, USBD_MOUSE_IN_EPT); return status; } @@ -116,10 +110,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -130,20 +125,20 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case HID_REQ_SET_PROTOCOL: - hid_protocol = (uint8_t)setup->wValue; + pmouse->hid_protocol = (uint8_t)setup->wValue; break; case HID_REQ_GET_PROTOCOL: - usbd_ctrl_send(pudev, (uint8_t *)&hid_protocol, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pmouse->hid_protocol, 1); break; case HID_REQ_SET_IDLE: - hid_set_idle = (uint8_t)(setup->wValue >> 8); + pmouse->hid_set_idle = (uint8_t)(setup->wValue >> 8); break; case HID_REQ_GET_IDLE: - usbd_ctrl_send(pudev, (uint8_t *)&hid_set_idle, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pmouse->hid_set_idle, 1); break; case HID_REQ_SET_REPORT: - hid_state = HID_REQ_SET_REPORT; - usbd_ctrl_recv(pudev, hid_set_report, setup->wLength); + pmouse->hid_state = HID_REQ_SET_REPORT; + usbd_ctrl_recv(pudev, pmouse->hid_set_report, setup->wLength); break; default: usbd_ctrl_unsupport(pudev); @@ -157,21 +152,21 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) case USB_STD_REQ_GET_DESCRIPTOR: if(setup->wValue >> 8 == HID_REPORT_DESC) { - len = MIN(USBD_HID_SIZ_REPORT_DESC, setup->wLength); - buf = (uint8_t *)g_usbd_hid_report; + len = MIN(USBD_MOUSE_SIZ_REPORT_DESC, setup->wLength); + buf = (uint8_t *)g_usbd_mouse_report; } else if(setup->wValue >> 8 == HID_DESCRIPTOR_TYPE) { len = MIN(9, setup->wLength); - buf = (uint8_t *)g_hid_usb_desc; + buf = (uint8_t *)g_mouse_usb_desc; } usbd_ctrl_send(pudev, (uint8_t *)buf, len); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pmouse->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + pmouse->alt_setting = setup->wValue; break; default: usbd_ctrl_unsupport(pudev); @@ -190,7 +185,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -204,16 +199,17 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata; uint32_t recv_len = usbd_get_recv_len(pudev, 0); /* ...user code... */ - if( hid_state == HID_REQ_SET_REPORT) + if( pmouse->hid_state == HID_REQ_SET_REPORT) { /* hid buffer process */ - hid_state = 0; + pmouse->hid_state = 0; } return status; @@ -225,7 +221,7 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; @@ -242,7 +238,7 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; @@ -254,7 +250,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -269,9 +265,11 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata; switch(event) { case USBD_RESET_EVENT: @@ -280,7 +278,7 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) break; case USBD_SUSPEND_EVENT: - hid_suspend_flag = 1; + pmouse->hid_suspend_flag = 1; /* ...user code... */ break; @@ -301,13 +299,13 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param len: report length * @retval status of usb_sts_type */ -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) +usb_sts_type usb_mouse_class_send_report(void *udev, uint8_t *report, uint16_t len) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; if(usbd_connect_state_get(pudev) == USB_CONN_STATE_CONFIGURED) - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_ept_send(pudev, USBD_MOUSE_IN_EPT, report, len); return status; } @@ -320,7 +318,8 @@ usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len) */ void usb_hid_mouse_send(void *udev, uint8_t op) { - static uint8_t mouse_buffer[4] = {0, 0, 0, 0}; + usbd_core_type *pudev = (usbd_core_type *)udev; + mouse_type *pmouse = (mouse_type *)pudev->class_handler->pdata; int8_t posx = 0, posy = 0, button = 0; switch(op) { @@ -351,11 +350,11 @@ void usb_hid_mouse_send(void *udev, uint8_t op) default: break; } - mouse_buffer[0] = button; - mouse_buffer[1] = posx; - mouse_buffer[2] = posy; + pmouse->mouse_buffer[0] = button; + pmouse->mouse_buffer[1] = posx; + pmouse->mouse_buffer[2] = posy; - class_send_report(udev, mouse_buffer, 4); + usb_mouse_class_send_report(udev, pmouse->mouse_buffer, 4); } /** diff --git a/middlewares/usbd_class/mouse/mouse_class.h b/middlewares/usbd_class/mouse/mouse_class.h index e025dab4..87049b0d 100644 --- a/middlewares/usbd_class/mouse/mouse_class.h +++ b/middlewares/usbd_class/mouse/mouse_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid mouse header file ************************************************************************** * Copyright notice & Disclaimer @@ -50,12 +50,12 @@ extern "C" { /** * @brief usb hid use endpoint define */ -#define USBD_HID_IN_EPT 0x81 +#define USBD_MOUSE_IN_EPT 0x81 /** * @brief usb hid in and out max packet size define */ -#define USBD_IN_MAXPACKET_SIZE 0x40 +#define USBD_MOUSE_IN_MAXPACKET_SIZE 0x40 /** * @} @@ -65,17 +65,6 @@ extern "C" { * @{ */ -/** - * @brief usb hid class request code define - */ -#define HID_REQ_SET_PROTOCOL 0x0B -#define HID_REQ_GET_PROTOCOL 0x03 -#define HID_REQ_SET_IDLE 0x0A -#define HID_REQ_GET_IDLE 0x02 -#define HID_REQ_SET_REPORT 0x09 -#define HID_REQ_GET_REPORT 0x01 -#define HID_DESCRIPTOR_TYPE 0x21 -#define HID_REPORT_DESC 0x22 /** * @brief usb hid mouse operation @@ -90,6 +79,18 @@ extern "C" { #define UP_MOVE 5 #define DOWN_MOVE 6 +typedef struct +{ + uint32_t hid_protocol; + uint32_t hid_set_idle; + uint32_t alt_setting; + + uint8_t hid_set_report[64]; + uint8_t mouse_buffer[4]; + uint8_t hid_state; + __IO uint8_t hid_suspend_flag; +}mouse_type; + /** * @} */ @@ -98,12 +99,12 @@ extern "C" { * @{ */ extern usbd_class_handler mouse_class_handler; -usb_sts_type class_send_report(void *udev, uint8_t *report, uint16_t len); +usb_sts_type usb_mouse_class_send_report(void *udev, uint8_t *report, uint16_t len); void usb_hid_mouse_send(void *udev, uint8_t op); /** * @} */ - + /** * @} */ diff --git a/middlewares/usbd_class/mouse/mouse_desc.c b/middlewares/usbd_class/mouse/mouse_desc.c index 86498f5f..2f16d5b1 100644 --- a/middlewares/usbd_class/mouse/mouse_desc.c +++ b/middlewares/usbd_class/mouse/mouse_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb hid mouse device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -41,18 +41,18 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -80,7 +80,7 @@ usbd_desc_handler mouse_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -90,10 +90,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_MOUSE_VENDOR_ID), /* idVendor */ + HBYTE(USBD_MOUSE_VENDOR_ID), /* idVendor */ + LBYTE(USBD_MOUSE_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_MOUSE_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -108,17 +108,17 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_MOUSE_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_MOUSE_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_MOUSE_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x01, /* bNumInterfaces: 1 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing the configuration */ - 0xE0, /* bmAttributes: self powered ans support remote wakeup*/ + 0xE0, /* bmAttributes: self powered and support remote wakeup*/ 0x32, /* MaxPower 100 mA: this current is used for detecting vbus */ USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ @@ -133,21 +133,21 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(MOUSE_BCD_NUM), + HBYTE(MOUSE_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_mouse_report)), + HBYTE(sizeof(g_usbd_mouse_report)), /* wDescriptorLength: total length of reprot descriptor */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ - USBD_HID_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USBD_MOUSE_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ - HID_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ + LBYTE(USBD_MOUSE_IN_MAXPACKET_SIZE), + HBYTE(USBD_MOUSE_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + MOUSE_BINTERVAL_TIME, /* bInterval: interval for polling endpoint for data transfers */ }; /** @@ -156,7 +156,7 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_usbd_mouse_report[USBD_MOUSE_SIZ_REPORT_DESC] ALIGNED_TAIL = { 0x05,0x01, 0x09,0x02, @@ -212,17 +212,17 @@ ALIGNED_HEAD uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = +ALIGNED_HEAD uint8_t g_mouse_usb_desc[9] ALIGNED_TAIL = { 0x09, /* bLength: size of HID descriptor in bytes */ HID_CLASS_DESC_HID, /* bDescriptorType: HID descriptor type */ - LBYTE(HID_BCD_NUM), - HBYTE(HID_BCD_NUM), /* bcdHID: HID class specification release number */ + LBYTE(MOUSE_BCD_NUM), + HBYTE(MOUSE_BCD_NUM), /* bcdHID: HID class specification release number */ 0x00, /* bCountryCode: hardware target conutry */ 0x01, /* bNumDescriptors: number of HID class descriptor to follow */ HID_CLASS_DESC_REPORT, /* bDescriptorType: report descriptor type */ - LBYTE(sizeof(g_usbd_hid_report)), - HBYTE(sizeof(g_usbd_hid_report)), /* wDescriptorLength: total length of reprot descriptor */ + LBYTE(sizeof(g_usbd_mouse_report)), + HBYTE(sizeof(g_usbd_mouse_report)), /* wDescriptorLength: total length of reprot descriptor */ }; @@ -232,9 +232,9 @@ ALIGNED_HEAD uint8_t g_hid_usb_desc[9] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_MOUSE_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_MOUSE_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -246,42 +246,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_MOUSE_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_MOUSE_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_MOUSE_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_MOUSE_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_MOUSE_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -289,7 +289,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -363,7 +363,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -373,7 +373,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -383,7 +383,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -393,7 +393,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -403,7 +403,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -414,9 +414,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MOUSE_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -426,9 +426,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MOUSE_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -438,7 +438,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -449,9 +449,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MOUSE_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -461,9 +461,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MOUSE_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/mouse/mouse_desc.h b/middlewares/usbd_class/mouse/mouse_desc.h index fc0d5533..98e29e48 100644 --- a/middlewares/usbd_class/mouse/mouse_desc.h +++ b/middlewares/usbd_class/mouse/mouse_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file mouse_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mouse descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -50,41 +50,34 @@ extern "C" { /** * @brief usb bcd number define */ -#define HID_BCD_NUM 0x0110 - -/** - * @brief usb hid class descriptor define - */ -#define HID_CLASS_DESC_HID 0x21 -#define HID_CLASS_DESC_REPORT 0x22 -#define HID_CLASS_DESC_PHYSICAL 0x23 +#define MOUSE_BCD_NUM 0x0110 /** * @brief usb vendor id and product id define */ -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5710 +#define USBD_MOUSE_VENDOR_ID 0x2E3C +#define USBD_MOUSE_PRODUCT_ID 0x5710 /** * @brief usb descriptor size define */ -#define USBD_CONFIG_DESC_SIZE 34 -#define USBD_HID_SIZ_REPORT_DESC 74 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_MOUSE_CONFIG_DESC_SIZE 34 +#define USBD_MOUSE_SIZ_REPORT_DESC 74 +#define USBD_MOUSE_SIZ_STRING_LANGID 4 +#define USBD_MOUSE_SIZ_STRING_SERIAL 0x1A /** * @brief usb string define(vendor, product configuration, interface) */ -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "Mouse" -#define USBD_DESC_CONFIGURATION_STRING "Mouse Config" -#define USBD_DESC_INTERFACE_STRING "Mouse Interface" +#define USBD_MOUSE_DESC_MANUFACTURER_STRING "Artery" +#define USBD_MOUSE_DESC_PRODUCT_STRING "Mouse" +#define USBD_MOUSE_DESC_CONFIGURATION_STRING "Mouse Config" +#define USBD_MOUSE_DESC_INTERFACE_STRING "Mouse Interface" /** * @brief usb hid endpoint interval define */ -#define HID_BINTERVAL_TIME 0x0A +#define MOUSE_BINTERVAL_TIME 0x0A /** * @brief usb mcu id address deine @@ -96,11 +89,8 @@ extern "C" { /** * @} */ - -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; -extern uint8_t g_usbd_hid_report[USBD_HID_SIZ_REPORT_DESC]; -extern uint8_t g_hid_usb_desc[9]; +extern uint8_t g_usbd_mouse_report[USBD_MOUSE_SIZ_REPORT_DESC]; +extern uint8_t g_mouse_usb_desc[9]; extern usbd_desc_handler mouse_desc_handler; /** @@ -116,3 +106,4 @@ extern usbd_desc_handler mouse_desc_handler; #endif + diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.c b/middlewares/usbd_class/msc/msc_bot_scsi.c index 0be88c1d..6afb6db3 100644 --- a/middlewares/usbd_class/msc/msc_bot_scsi.c +++ b/middlewares/usbd_class/msc/msc_bot_scsi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_bot_scsi.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mass storage bulk-only transport and scsi command ************************************************************************** * Copyright notice & Disclaimer @@ -39,15 +39,6 @@ * @{ */ -msc_type msc_struct; -cbw_type cbw_struct; -csw_type csw_struct = -{ - CSW_DCSWSIGNATURE, - 0x00, - 0x00, - CSW_BCSWSTATUS_PASS, -}; #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 @@ -60,7 +51,6 @@ ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = { 0x00, }; - #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif @@ -114,12 +104,19 @@ ALIGNED_HEAD uint8_t mode_sense10_data[8] ALIGNED_TAIL = void bot_scsi_init(void *udev) { usbd_core_type *pudev = (usbd_core_type *)udev; - msc_struct.msc_state = MSC_STATE_MACHINE_IDLE; - msc_struct.bot_status = MSC_BOT_STATE_IDLE; - msc_struct.max_lun = MSC_SUPPORT_MAX_LUN - 1; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; + pmsc->bot_status = MSC_BOT_STATE_IDLE; + pmsc->max_lun = MSC_SUPPORT_MAX_LUN - 1; + + pmsc->csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; + pmsc->csw_struct.dCSWDataResidue = 0; + pmsc->csw_struct.dCSWSignature = 0; + pmsc->csw_struct.dCSWTag = CSW_BCSWSTATUS_PASS; + /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)&cbw_struct, CBW_CMD_LENGTH); + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); } /** @@ -130,12 +127,13 @@ void bot_scsi_init(void *udev) void bot_scsi_reset(void *udev) { usbd_core_type *pudev = (usbd_core_type *)udev; - msc_struct.msc_state = MSC_STATE_MACHINE_IDLE; - msc_struct.bot_status = MSC_BOT_STATE_RECOVERY; - msc_struct.max_lun = MSC_SUPPORT_MAX_LUN - 1; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; + pmsc->bot_status = MSC_BOT_STATE_RECOVERY; + pmsc->max_lun = MSC_SUPPORT_MAX_LUN - 1; /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)&cbw_struct, CBW_CMD_LENGTH); + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); } /** @@ -146,7 +144,9 @@ void bot_scsi_reset(void *udev) */ void bot_scsi_datain_handler(void *udev, uint8_t ept_num) { - switch(msc_struct.msc_state) + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + switch(pmsc->msc_state) { case MSC_STATE_MACHINE_DATA_IN: if(bot_scsi_cmd_process(udev) != USB_OK) @@ -173,7 +173,9 @@ void bot_scsi_datain_handler(void *udev, uint8_t ept_num) */ void bot_scsi_dataout_handler(void *udev, uint8_t ept_num) { - switch(msc_struct.msc_state) + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + switch(pmsc->msc_state) { case MSC_STATE_MACHINE_IDLE: bot_cbw_decode(udev); @@ -196,18 +198,19 @@ void bot_scsi_dataout_handler(void *udev, uint8_t ept_num) void bot_cbw_decode(void *udev) { usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; - csw_struct.dCSWTag = cbw_struct.dCBWTage; - csw_struct.dCSWDataResidue = cbw_struct.dCBWDataTransferLength; + pmsc->csw_struct.dCSWTag = pmsc->cbw_struct.dCBWTage; + pmsc->csw_struct.dCSWDataResidue = pmsc->cbw_struct.dCBWDataTransferLength; /* check param */ - if((cbw_struct.dCBWSignature != CBW_DCBWSIGNATURE) || + if((pmsc->cbw_struct.dCBWSignature != CBW_DCBWSIGNATURE) || (usbd_get_recv_len(pudev, USBD_MSC_BULK_OUT_EPT) != CBW_CMD_LENGTH) - || (cbw_struct.bCBWLUN > MSC_SUPPORT_MAX_LUN) || - (cbw_struct.bCBWCBLength < 1) || (cbw_struct.bCBWCBLength > 16)) + || (pmsc->cbw_struct.bCBWLUN > MSC_SUPPORT_MAX_LUN) || + (pmsc->cbw_struct.bCBWCBLength < 1) || (pmsc->cbw_struct.bCBWCBLength > 16)) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); - msc_struct.bot_status = MSC_BOT_STATE_ERROR; + pmsc->bot_status = MSC_BOT_STATE_ERROR; bot_scsi_stall(udev); } else @@ -216,17 +219,17 @@ void bot_cbw_decode(void *udev) { bot_scsi_stall(udev); } - else if((msc_struct.msc_state != MSC_STATE_MACHINE_DATA_IN) && - (msc_struct.msc_state != MSC_STATE_MACHINE_DATA_OUT) && - (msc_struct.msc_state != MSC_STATE_MACHINE_LAST_DATA)) + else if((pmsc->msc_state != MSC_STATE_MACHINE_DATA_IN) && + (pmsc->msc_state != MSC_STATE_MACHINE_DATA_OUT) && + (pmsc->msc_state != MSC_STATE_MACHINE_LAST_DATA)) { - if(msc_struct.data_len == 0) + if(pmsc->data_len == 0) { bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); } - else if(msc_struct.data_len > 0) + else if(pmsc->data_len > 0) { - bot_scsi_send_data(udev, msc_struct.data, msc_struct.data_len); + bot_scsi_send_data(udev, pmsc->data, pmsc->data_len); } } } @@ -242,12 +245,13 @@ void bot_cbw_decode(void *udev) void bot_scsi_send_data(void *udev, uint8_t *buffer, uint32_t len) { usbd_core_type *pudev = (usbd_core_type *)udev; - uint32_t data_len = MIN(len, cbw_struct.dCBWDataTransferLength); + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint32_t data_len = MIN(len, pmsc->cbw_struct.dCBWDataTransferLength); - csw_struct.dCSWDataResidue -= data_len; - csw_struct.bCSWStatus = CSW_BCSWSTATUS_PASS; + pmsc->csw_struct.dCSWDataResidue -= data_len; + pmsc->csw_struct.bCSWStatus = CSW_BCSWSTATUS_PASS; - msc_struct.msc_state = MSC_STATE_MACHINE_SEND_DATA; + pmsc->msc_state = MSC_STATE_MACHINE_SEND_DATA; usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, buffer, data_len); @@ -262,16 +266,17 @@ void bot_scsi_send_data(void *udev, uint8_t *buffer, uint32_t len) void bot_scsi_send_csw(void *udev, uint8_t status) { usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; - csw_struct.bCSWStatus = status; - csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; - msc_struct.msc_state = MSC_STATE_MACHINE_IDLE; + pmsc->csw_struct.bCSWStatus = status; + pmsc->csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, - (uint8_t *)&csw_struct, CSW_CMD_LENGTH); + (uint8_t *)&pmsc->csw_struct, CSW_CMD_LENGTH); usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, - (uint8_t *)&cbw_struct, CBW_CMD_LENGTH); + (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); } @@ -299,7 +304,9 @@ void bot_scsi_sense_code(void *udev, uint8_t sense_key, uint8_t asc) */ usb_sts_type bot_scsi_check_address(void *udev, uint8_t lun, uint32_t blk_offset, uint32_t blk_count) { - if((blk_offset + blk_count) > msc_struct.blk_nbr[lun]) + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + if((blk_offset + blk_count) > pmsc->blk_nbr[lun]) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, ADDRESS_OUT_OF_RANGE); return USB_FAIL; @@ -315,18 +322,20 @@ usb_sts_type bot_scsi_check_address(void *udev, uint8_t lun, uint32_t blk_offset void bot_scsi_stall(void *udev) { usbd_core_type *pudev = (usbd_core_type *)udev; - if((cbw_struct.dCBWDataTransferLength != 0) && - (cbw_struct.bmCBWFlags == 0) && - msc_struct.bot_status == MSC_BOT_STATE_IDLE) + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + + if((pmsc->cbw_struct.dCBWDataTransferLength != 0) && + (pmsc->cbw_struct.bmCBWFlags == 0) && + pmsc->bot_status == MSC_BOT_STATE_IDLE) { usbd_set_stall(pudev, USBD_MSC_BULK_OUT_EPT); } usbd_set_stall(pudev, USBD_MSC_BULK_IN_EPT); - if(msc_struct.bot_status == MSC_BOT_STATE_ERROR) + if(pmsc->bot_status == MSC_BOT_STATE_ERROR) { usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, - (uint8_t *)&cbw_struct, CBW_CMD_LENGTH); + (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); } } @@ -339,13 +348,16 @@ void bot_scsi_stall(void *udev) usb_sts_type bot_scsi_test_unit(void *udev, uint8_t lun) { usb_sts_type status = USB_OK; - if(cbw_struct.dCBWDataTransferLength != 0) + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + + if(pmsc->cbw_struct.dCBWDataTransferLength != 0) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); return USB_FAIL; } - msc_struct.data_len = 0; + pmsc->data_len = 0; return status; } @@ -360,8 +372,10 @@ usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun) uint8_t *pdata; uint32_t trans_len = 0; usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; - if(cbw_struct.CBWCB[1] & 0x01) + if(pmsc->cbw_struct.CBWCB[1] & 0x01) { pdata = page00_inquiry_data; trans_len = 5; @@ -369,9 +383,9 @@ usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun) else { pdata = get_inquiry(lun); - if(cbw_struct.dCBWDataTransferLength < SCSI_INQUIRY_DATA_LENGTH) + if(pmsc->cbw_struct.dCBWDataTransferLength < SCSI_INQUIRY_DATA_LENGTH) { - trans_len = cbw_struct.dCBWDataTransferLength; + trans_len = pmsc->cbw_struct.dCBWDataTransferLength; } else { @@ -379,11 +393,11 @@ usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun) } } - msc_struct.data_len = trans_len; + pmsc->data_len = trans_len; while(trans_len) { trans_len --; - msc_struct.data[trans_len] = pdata[trans_len]; + pmsc->data[trans_len] = pdata[trans_len]; } return status; } @@ -396,7 +410,9 @@ usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun) */ usb_sts_type bot_scsi_start_stop(void *udev, uint8_t lun) { - msc_struct.data_len = 0; + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + pmsc->data_len = 0; return USB_OK; } @@ -408,7 +424,9 @@ usb_sts_type bot_scsi_start_stop(void *udev, uint8_t lun) */ usb_sts_type bot_scsi_allow_medium_removal(void *udev, uint8_t lun) { - msc_struct.data_len = 0; + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + pmsc->data_len = 0; return USB_OK; } @@ -421,11 +439,13 @@ usb_sts_type bot_scsi_allow_medium_removal(void *udev, uint8_t lun) usb_sts_type bot_scsi_mode_sense6(void *udev, uint8_t lun) { uint8_t data_len = 8; - msc_struct.data_len = 8; + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + pmsc->data_len = 8; while(data_len) { data_len --; - msc_struct.data[data_len] = mode_sense6_data[data_len]; + pmsc->data[data_len] = mode_sense6_data[data_len]; }; return USB_OK; } @@ -439,11 +459,13 @@ usb_sts_type bot_scsi_mode_sense6(void *udev, uint8_t lun) usb_sts_type bot_scsi_mode_sense10(void *udev, uint8_t lun) { uint8_t data_len = 8; - msc_struct.data_len = 8; + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + pmsc->data_len = 8; while(data_len) { data_len --; - msc_struct.data[data_len] = mode_sense10_data[data_len]; + pmsc->data[data_len] = mode_sense10_data[data_len]; }; return USB_OK; } @@ -456,21 +478,22 @@ usb_sts_type bot_scsi_mode_sense10(void *udev, uint8_t lun) */ usb_sts_type bot_scsi_capacity(void *udev, uint8_t lun) { - uint8_t *pdata = msc_struct.data; - - msc_disk_capacity(lun, &msc_struct.blk_nbr[lun], &msc_struct.blk_size[lun]); + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; + msc_disk_capacity(lun, &pmsc->blk_nbr[lun], &pmsc->blk_size[lun]); - pdata[0] = (uint8_t)((msc_struct.blk_nbr[lun] - 1) >> 24); - pdata[1] = (uint8_t)((msc_struct.blk_nbr[lun] - 1) >> 16); - pdata[2] = (uint8_t)((msc_struct.blk_nbr[lun] - 1) >> 8); - pdata[3] = (uint8_t)((msc_struct.blk_nbr[lun] - 1)); + pdata[0] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 24); + pdata[1] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 16); + pdata[2] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 8); + pdata[3] = (uint8_t)((pmsc->blk_nbr[lun] - 1)); - pdata[4] = (uint8_t)((msc_struct.blk_size[lun]) >> 24); - pdata[5] = (uint8_t)((msc_struct.blk_size[lun]) >> 16); - pdata[6] = (uint8_t)((msc_struct.blk_size[lun]) >> 8); - pdata[7] = (uint8_t)((msc_struct.blk_size[lun])); + pdata[4] = (uint8_t)((pmsc->blk_size[lun]) >> 24); + pdata[5] = (uint8_t)((pmsc->blk_size[lun]) >> 16); + pdata[6] = (uint8_t)((pmsc->blk_size[lun]) >> 8); + pdata[7] = (uint8_t)((pmsc->blk_size[lun])); - msc_struct.data_len = 8; + pmsc->data_len = 8; return USB_OK; } @@ -481,28 +504,30 @@ usb_sts_type bot_scsi_capacity(void *udev, uint8_t lun) * @retval status of usb_sts_type */ usb_sts_type bot_scsi_format_capacity(void *udev, uint8_t lun) -{ - uint8_t *pdata = msc_struct.data; +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; pdata[0] = 0; pdata[1] = 0; pdata[2] = 0; pdata[3] = 0x08; - msc_disk_capacity(lun, &msc_struct.blk_nbr[lun], &msc_struct.blk_size[lun]); + msc_disk_capacity(lun, &pmsc->blk_nbr[lun], &pmsc->blk_size[lun]); - pdata[4] = (uint8_t)((msc_struct.blk_nbr[lun] - 1) >> 24); - pdata[5] = (uint8_t)((msc_struct.blk_nbr[lun] - 1) >> 16); - pdata[6] = (uint8_t)((msc_struct.blk_nbr[lun] - 1) >> 8); - pdata[7] = (uint8_t)((msc_struct.blk_nbr[lun] - 1)); + pdata[4] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 24); + pdata[5] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 16); + pdata[6] = (uint8_t)((pmsc->blk_nbr[lun] - 1) >> 8); + pdata[7] = (uint8_t)((pmsc->blk_nbr[lun] - 1)); pdata[8] = 0x02; - pdata[9] = (uint8_t)((msc_struct.blk_size[lun]) >> 16); - pdata[10] = (uint8_t)((msc_struct.blk_size[lun]) >> 8); - pdata[11] = (uint8_t)((msc_struct.blk_size[lun])); + pdata[9] = (uint8_t)((pmsc->blk_size[lun]) >> 16); + pdata[10] = (uint8_t)((pmsc->blk_size[lun]) >> 8); + pdata[11] = (uint8_t)((pmsc->blk_size[lun])); - msc_struct.data_len = 12; + pmsc->data_len = 12; return USB_OK; } @@ -516,7 +541,9 @@ usb_sts_type bot_scsi_format_capacity(void *udev, uint8_t lun) usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun) { uint32_t trans_len = 0x12; - uint8_t *pdata = msc_struct.data; + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; uint8_t *sdata = (uint8_t *)&sense_data; while(trans_len) @@ -525,13 +552,13 @@ usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun) pdata[trans_len] = sdata[trans_len]; } - if(cbw_struct.dCBWDataTransferLength < REQ_SENSE_STANDARD_DATA_LEN) + if(pmsc->cbw_struct.dCBWDataTransferLength < REQ_SENSE_STANDARD_DATA_LEN) { - msc_struct.data_len = cbw_struct.dCBWDataTransferLength; + pmsc->data_len = pmsc->cbw_struct.dCBWDataTransferLength; } else { - msc_struct.data_len = REQ_SENSE_STANDARD_DATA_LEN; + pmsc->data_len = REQ_SENSE_STANDARD_DATA_LEN; } return USB_OK; } @@ -544,21 +571,23 @@ usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun) */ usb_sts_type bot_scsi_verify(void *udev, uint8_t lun) { - uint8_t *cmd = cbw_struct.CBWCB; - if((cbw_struct.CBWCB[1] & 0x02) == 0x02) + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; + if((pmsc->cbw_struct.CBWCB[1] & 0x02) == 0x02) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_FIELED_IN_COMMAND); return USB_FAIL; } - msc_struct.blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; - msc_struct.blk_len = cmd[7] << 8 | cmd[8]; + pmsc->blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; + pmsc->blk_len = cmd[7] << 8 | cmd[8]; - if(bot_scsi_check_address(udev, lun, msc_struct.blk_addr, msc_struct.blk_len) != USB_OK) + if(bot_scsi_check_address(udev, lun, pmsc->blk_addr, pmsc->blk_len) != USB_OK) { return USB_FAIL; } - msc_struct.data_len = 0; + pmsc->data_len = 0; return USB_OK; } @@ -570,52 +599,53 @@ usb_sts_type bot_scsi_verify(void *udev, uint8_t lun) */ usb_sts_type bot_scsi_read10(void *udev, uint8_t lun) { - uint8_t *cmd = cbw_struct.CBWCB; usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; uint32_t len; - if(msc_struct.msc_state == MSC_STATE_MACHINE_IDLE) + if(pmsc->msc_state == MSC_STATE_MACHINE_IDLE) { - if((cbw_struct.bmCBWFlags & 0x80) != 0x80) + if((pmsc->cbw_struct.bmCBWFlags & 0x80) != 0x80) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); return USB_FAIL; } - msc_struct.blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; - msc_struct.blk_len = cmd[7] << 8 | cmd[8]; + pmsc->blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; + pmsc->blk_len = cmd[7] << 8 | cmd[8]; - if(bot_scsi_check_address(udev, lun, msc_struct.blk_addr, msc_struct.blk_len) != USB_OK) + if(bot_scsi_check_address(udev, lun, pmsc->blk_addr, pmsc->blk_len) != USB_OK) { return USB_FAIL; } - msc_struct.blk_addr *= msc_struct.blk_size[lun]; - msc_struct.blk_len *= msc_struct.blk_size[lun]; + pmsc->blk_addr *= pmsc->blk_size[lun]; + pmsc->blk_len *= pmsc->blk_size[lun]; - if(cbw_struct.dCBWDataTransferLength != msc_struct.blk_len) + if(pmsc->cbw_struct.dCBWDataTransferLength != pmsc->blk_len) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); return USB_FAIL; } - msc_struct.msc_state = MSC_STATE_MACHINE_DATA_IN; + pmsc->msc_state = MSC_STATE_MACHINE_DATA_IN; } - msc_struct.data_len = MSC_MAX_DATA_BUF_LEN; + pmsc->data_len = MSC_MAX_DATA_BUF_LEN; - len = MIN(msc_struct.blk_len, MSC_MAX_DATA_BUF_LEN); - if( msc_disk_read(lun, msc_struct.blk_addr, msc_struct.data, len) != USB_OK) + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + if( msc_disk_read(lun, pmsc->blk_addr, pmsc->data, len) != USB_OK) { bot_scsi_sense_code(udev, SENSE_KEY_HARDWARE_ERROR, MEDIUM_NOT_PRESENT); return USB_FAIL; } - usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, msc_struct.data, len); - msc_struct.blk_addr += len; - msc_struct.blk_len -= len; + usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, pmsc->data, len); + pmsc->blk_addr += len; + pmsc->blk_len -= len; - csw_struct.dCSWDataResidue -= len; - if(msc_struct.blk_len == 0) + pmsc->csw_struct.dCSWDataResidue -= len; + if(pmsc->blk_len == 0) { - msc_struct.msc_state = MSC_STATE_MACHINE_LAST_DATA; + pmsc->msc_state = MSC_STATE_MACHINE_LAST_DATA; } return USB_OK; @@ -630,62 +660,63 @@ usb_sts_type bot_scsi_read10(void *udev, uint8_t lun) */ usb_sts_type bot_scsi_write10(void *udev, uint8_t lun) { - uint8_t *cmd = cbw_struct.CBWCB; usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; uint32_t len; - if(msc_struct.msc_state == MSC_STATE_MACHINE_IDLE) + if(pmsc->msc_state == MSC_STATE_MACHINE_IDLE) { - if((cbw_struct.bmCBWFlags & 0x80) == 0x80) + if((pmsc->cbw_struct.bmCBWFlags & 0x80) == 0x80) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); return USB_FAIL; } - msc_struct.blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; - msc_struct.blk_len = cmd[7] << 8 | cmd[8]; + pmsc->blk_addr = cmd[2] << 24 | cmd[3] << 16 | cmd[4] << 8 | cmd[5]; + pmsc->blk_len = cmd[7] << 8 | cmd[8]; - if(bot_scsi_check_address(udev, lun, msc_struct.blk_addr, msc_struct.blk_len) != USB_OK) + if(bot_scsi_check_address(udev, lun, pmsc->blk_addr, pmsc->blk_len) != USB_OK) { return USB_FAIL; } - msc_struct.blk_addr *= msc_struct.blk_size[lun]; - msc_struct.blk_len *= msc_struct.blk_size[lun]; + pmsc->blk_addr *= pmsc->blk_size[lun]; + pmsc->blk_len *= pmsc->blk_size[lun]; - if(cbw_struct.dCBWDataTransferLength != msc_struct.blk_len) + if(pmsc->cbw_struct.dCBWDataTransferLength != pmsc->blk_len) { bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); return USB_FAIL; } - msc_struct.msc_state = MSC_STATE_MACHINE_DATA_OUT; - len = MIN(msc_struct.blk_len, MSC_MAX_DATA_BUF_LEN); - usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)msc_struct.data, len); + pmsc->msc_state = MSC_STATE_MACHINE_DATA_OUT; + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)pmsc->data, len); } else { - len = MIN(msc_struct.blk_len, MSC_MAX_DATA_BUF_LEN); - if(msc_disk_write(lun, msc_struct.blk_addr, msc_struct.data, len) != USB_OK) + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + if(msc_disk_write(lun, pmsc->blk_addr, pmsc->data, len) != USB_OK) { bot_scsi_sense_code(udev, SENSE_KEY_HARDWARE_ERROR, MEDIUM_NOT_PRESENT); return USB_FAIL; } - msc_struct.blk_addr += len; - msc_struct.blk_len -= len; + pmsc->blk_addr += len; + pmsc->blk_len -= len; - csw_struct.dCSWDataResidue -= len; + pmsc->csw_struct.dCSWDataResidue -= len; - if(msc_struct.blk_len == 0) + if(pmsc->blk_len == 0) { bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); } else { - len = MIN(msc_struct.blk_len, MSC_MAX_DATA_BUF_LEN); - usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)msc_struct.data, len); + len = MIN(pmsc->blk_len, MSC_MAX_DATA_BUF_LEN); + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, (uint8_t *)pmsc->data, len); } } return USB_OK; @@ -700,13 +731,13 @@ usb_sts_type bot_scsi_write10(void *udev, uint8_t lun) void bot_scsi_clear_feature(void *udev, uint8_t ept_num) { usbd_core_type *pudev = (usbd_core_type *)udev; - - if(msc_struct.bot_status == MSC_BOT_STATE_ERROR) + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + if(pmsc->bot_status == MSC_BOT_STATE_ERROR) { usbd_set_stall(pudev, USBD_MSC_BULK_IN_EPT); - msc_struct.bot_status = MSC_BOT_STATE_IDLE; + pmsc->bot_status = MSC_BOT_STATE_IDLE; } - else if(((ept_num & 0x80) == 0x80) && (msc_struct.bot_status != MSC_BOT_STATE_RECOVERY)) + else if(((ept_num & 0x80) == 0x80) && (pmsc->bot_status != MSC_BOT_STATE_RECOVERY)) { bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); } @@ -720,54 +751,56 @@ void bot_scsi_clear_feature(void *udev, uint8_t ept_num) usb_sts_type bot_scsi_cmd_process(void *udev) { usb_sts_type status = USB_FAIL; - switch(cbw_struct.CBWCB[0]) + usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; + switch(pmsc->cbw_struct.CBWCB[0]) { case MSC_CMD_INQUIRY: - status = bot_scsi_inquiry(udev, cbw_struct.bCBWLUN); + status = bot_scsi_inquiry(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_START_STOP: - status = bot_scsi_start_stop(udev, cbw_struct.bCBWLUN); + status = bot_scsi_start_stop(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_MODE_SENSE6: - status = bot_scsi_mode_sense6(udev, cbw_struct.bCBWLUN); + status = bot_scsi_mode_sense6(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_MODE_SENSE10: - status = bot_scsi_mode_sense10(udev, cbw_struct.bCBWLUN); + status = bot_scsi_mode_sense10(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_ALLOW_MEDIUM_REMOVAL: - status = bot_scsi_allow_medium_removal(udev, cbw_struct.bCBWLUN); + status = bot_scsi_allow_medium_removal(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_READ_10: - status = bot_scsi_read10(udev, cbw_struct.bCBWLUN); + status = bot_scsi_read10(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_READ_CAPACITY: - status = bot_scsi_capacity(udev, cbw_struct.bCBWLUN); + status = bot_scsi_capacity(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_REQUEST_SENSE: - status = bot_scsi_request_sense(udev, cbw_struct.bCBWLUN); + status = bot_scsi_request_sense(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_TEST_UNIT: - status = bot_scsi_test_unit(udev, cbw_struct.bCBWLUN); + status = bot_scsi_test_unit(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_VERIFY: - status = bot_scsi_verify(udev, cbw_struct.bCBWLUN); + status = bot_scsi_verify(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_WRITE_10: - status = bot_scsi_write10(udev, cbw_struct.bCBWLUN); + status = bot_scsi_write10(udev, pmsc->cbw_struct.bCBWLUN); break; case MSC_CMD_READ_FORMAT_CAPACITY: - status = bot_scsi_format_capacity(udev, cbw_struct.bCBWLUN); + status = bot_scsi_format_capacity(udev, pmsc->cbw_struct.bCBWLUN); break; default: diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.h b/middlewares/usbd_class/msc/msc_bot_scsi.h index 54c2b609..d66254eb 100644 --- a/middlewares/usbd_class/msc/msc_bot_scsi.h +++ b/middlewares/usbd_class/msc/msc_bot_scsi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_bot_scsi.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mass storage bulk-only transport and scsi command header file ************************************************************************** * Copyright notice & Disclaimer @@ -204,6 +204,12 @@ typedef struct uint32_t data_len; uint8_t data[MSC_MAX_DATA_BUF_LEN]; + + uint32_t alt_setting; + + cbw_type cbw_struct; + csw_type csw_struct; + }msc_type; void bot_scsi_init(void *udev); diff --git a/middlewares/usbd_class/msc/msc_class.c b/middlewares/usbd_class/msc/msc_class.c index 83efb457..eb90a98f 100644 --- a/middlewares/usbd_class/msc/msc_class.c +++ b/middlewares/usbd_class/msc/msc_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -41,22 +41,17 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -/* usb rx and tx buffer */ -static uint32_t alt_setting = 0; - -extern msc_type msc_struct; -extern cbw_type cbw_struct; -extern csw_type csw_struct; +msc_type msc_struct; /* usb device class handler */ usbd_class_handler msc_class_handler = @@ -70,6 +65,7 @@ usbd_class_handler msc_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &msc_struct }; /** @@ -77,7 +73,7 @@ usbd_class_handler msc_class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -98,7 +94,7 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -118,10 +114,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + msc_type *pmsc = (msc_type *)pudev->class_handler->pdata; switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) { /* class request */ @@ -151,10 +148,10 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) usbd_ctrl_unsupport(pudev); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pmsc->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + pmsc->alt_setting = setup->wValue; break; case USB_STD_REQ_CLEAR_FEATURE: usbd_ept_close(pudev, (uint8_t)setup->wIndex); @@ -185,7 +182,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -199,7 +196,7 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -214,7 +211,7 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; @@ -228,7 +225,7 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; bot_scsi_dataout_handler(udev, ept_num); @@ -240,7 +237,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -255,7 +252,7 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; switch(event) diff --git a/middlewares/usbd_class/msc/msc_class.h b/middlewares/usbd_class/msc/msc_class.h index 929c10e5..fd4477c4 100644 --- a/middlewares/usbd_class/msc/msc_class.h +++ b/middlewares/usbd_class/msc/msc_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb msc class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_desc.c b/middlewares/usbd_class/msc/msc_desc.c index 0f028ffa..272b68ac 100644 --- a/middlewares/usbd_class/msc/msc_desc.c +++ b/middlewares/usbd_class/msc/msc_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb msc device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -42,18 +42,18 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -81,7 +81,7 @@ usbd_desc_handler msc_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -91,10 +91,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_MSC_VENDOR_ID), /* idVendor */ + HBYTE(USBD_MSC_VENDOR_ID), /* idVendor */ + LBYTE(USBD_MSC_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_MSC_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -109,12 +109,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_MSC_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_MSC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_MSC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x01, /* bNumInterfaces: 2 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x04, /* iConfiguration: index of string descriptor describing @@ -155,9 +155,9 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_MSC_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_MSC_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -169,42 +169,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_MSC_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_MSC_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_MSC_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_MSC_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_MSC_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -212,7 +212,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -286,7 +286,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -296,7 +296,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -306,7 +306,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -316,7 +316,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -326,7 +326,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -337,9 +337,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MSC_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -349,9 +349,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MSC_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -361,7 +361,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -372,9 +372,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MSC_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -384,9 +384,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_MSC_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/msc/msc_desc.h b/middlewares/usbd_class/msc/msc_desc.h index d489f470..bcc129b1 100644 --- a/middlewares/usbd_class/msc/msc_desc.h +++ b/middlewares/usbd_class/msc/msc_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb msc descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -47,37 +47,24 @@ extern "C" { * @{ */ -#define BCD_NUM 0x0110 +#define MSC_BCD_NUM 0x0110 -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x5720 +#define USBD_MSC_VENDOR_ID 0x2E3C +#define USBD_MSC_PRODUCT_ID 0x5720 -#define USBD_CONFIG_DESC_SIZE 32 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A - -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "AT32 Mass Storage" -#define USBD_DESC_CONFIGURATION_STRING "Mass Storage Config" -#define USBD_DESC_INTERFACE_STRING "Mass Storage Interface" - -#define HID_BINTERVAL_TIME 0xFF - -#define USBD_CDC_CS_INTERFACE 0x24 -#define USBD_CDC_CS_ENDPOINT 0x25 - -#define USBD_CDC_SUBTYPE_HEADER 0x00 -#define USBD_CDC_SUBTYPE_CMF 0x01 -#define USBD_CDC_SUBTYPE_ACM 0x02 -#define USBD_CDC_SUBTYPE_UFD 0x06 +#define USBD_MSC_CONFIG_DESC_SIZE 32 +#define USBD_MSC_SIZ_STRING_LANGID 4 +#define USBD_MSC_SIZ_STRING_SERIAL 0x1A +#define USBD_MSC_DESC_MANUFACTURER_STRING "Artery" +#define USBD_MSC_DESC_PRODUCT_STRING "AT32 Mass Storage" +#define USBD_MSC_DESC_CONFIGURATION_STRING "Mass Storage Config" +#define USBD_MSC_DESC_INTERFACE_STRING "Mass Storage Interface" #define MCU_ID1 (0x1FFFF7E8) #define MCU_ID2 (0x1FFFF7EC) #define MCU_ID3 (0x1FFFF7F0) -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; extern usbd_desc_handler msc_desc_handler; /** @@ -96,4 +83,3 @@ extern usbd_desc_handler msc_desc_handler; #endif #endif - diff --git a/middlewares/usbd_class/printer/printer_class.c b/middlewares/usbd_class/printer/printer_class.c index e471d52e..8619225c 100644 --- a/middlewares/usbd_class/printer/printer_class.c +++ b/middlewares/usbd_class/printer/printer_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_class.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb printer class type ************************************************************************** * Copyright notice & Disclaimer @@ -40,31 +40,25 @@ * @{ */ -usb_sts_type class_init_handler(void *udev); -usb_sts_type class_clear_handler(void *udev); -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); -usb_sts_type class_ept0_tx_handler(void *udev); -usb_sts_type class_ept0_rx_handler(void *udev); -usb_sts_type class_in_handler(void *udev, uint8_t ept_num); -usb_sts_type class_out_handler(void *udev, uint8_t ept_num); -usb_sts_type class_sof_handler(void *udev); -usb_sts_type class_event_handler(void *udev, usbd_event_type event); +static usb_sts_type class_init_handler(void *udev); +static usb_sts_type class_clear_handler(void *udev); +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type class_ept0_tx_handler(void *udev); +static usb_sts_type class_ept0_rx_handler(void *udev); +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num); +static usb_sts_type class_sof_handler(void *udev); +static usb_sts_type class_event_handler(void *udev, usbd_event_type event); -/* usb rx and tx buffer */ -static uint32_t alt_setting = 0; -static uint8_t g_rx_buff[USBD_OUT_MAXPACKET_SIZE]; -static uint16_t g_rxlen; -__IO uint8_t g_tx_completed = 1, g_rx_completed = 0; - -uint8_t PRINTER_DEVICE_ID[PRINTER_DEVICE_ID_LEN] = +ALIGNED_HEAD static uint8_t printer_device_id[PRINTER_DEVICE_ID_LEN] ALIGNED_TAIL= { 0x00, 0x16, 'M', 'F', 'G',':','A','r','t','e', 'r', 'y' ,' ', 'C','M', 'D', ':', 'E', 'S', 'C', 'P', 'O', 'S',' ', }; -static uint32_t g_printer_port_status = 0x18; -uint8_t g_printer_data[USBD_OUT_MAXPACKET_SIZE]; +/* static variable */ +printer_type printer_struct; /* usb device class handler */ usbd_class_handler printer_class_handler = @@ -78,6 +72,7 @@ usbd_class_handler printer_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &printer_struct }; /** @@ -85,21 +80,23 @@ usbd_class_handler printer_class_handler = * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_init_handler(void *udev) +static usb_sts_type class_init_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + printer_type *pprter = (printer_type *)pudev->class_handler->pdata; /* open in endpoint */ - usbd_ept_open(pudev, USBD_PRINTER_BULK_IN_EPT, EPT_BULK_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_PRINTER_BULK_IN_EPT, EPT_BULK_TYPE, USBD_PRINTER_IN_MAXPACKET_SIZE); /* open out endpoint */ - usbd_ept_open(pudev, USBD_PRINTER_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_open(pudev, USBD_PRINTER_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_PRINTER_OUT_MAXPACKET_SIZE); /* set out endpoint to receive status */ - usbd_ept_recv(pudev, USBD_PRINTER_BULK_OUT_EPT, g_rx_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_PRINTER_BULK_OUT_EPT, pprter->g_rx_buff, USBD_PRINTER_OUT_MAXPACKET_SIZE); - g_tx_completed = 1; + pprter->g_tx_completed = 1; + pprter->g_printer_port_status = 0x18; return status; } @@ -109,7 +106,7 @@ usb_sts_type class_init_handler(void *udev) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_clear_handler(void *udev) +static usb_sts_type class_clear_handler(void *udev) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -129,10 +126,11 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; + printer_type *pprter = (printer_type *)pudev->class_handler->pdata; switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) { @@ -141,13 +139,13 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) switch(setup->bRequest) { case PRINTER_REQ_GET_DEVICE_ID: - usbd_ctrl_send(pudev, PRINTER_DEVICE_ID, PRINTER_DEVICE_ID_LEN); + usbd_ctrl_send(pudev, printer_device_id, PRINTER_DEVICE_ID_LEN); break; case PRINTER_REQ_GET_PORT_STATUS: - usbd_ctrl_send(pudev, (uint8_t *)&g_printer_port_status, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pprter->g_printer_port_status, 1); break; case PRINTER_REQ_GET_SOFT_RESET: - usbd_ctrl_recv(pudev, g_printer_data, USBD_OUT_MAXPACKET_SIZE); + usbd_ctrl_recv(pudev, pprter->g_printer_data, USBD_PRINTER_OUT_MAXPACKET_SIZE); break; default: usbd_ctrl_unsupport(pudev); @@ -162,10 +160,10 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) usbd_ctrl_unsupport(pudev); break; case USB_STD_REQ_GET_INTERFACE: - usbd_ctrl_send(pudev, (uint8_t *)&alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&pprter->alt_setting, 1); break; case USB_STD_REQ_SET_INTERFACE: - alt_setting = setup->wValue; + pprter->alt_setting = setup->wValue; break; default: break; @@ -183,7 +181,7 @@ usb_sts_type class_setup_handler(void *udev, usb_setup_type *setup) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_tx_handler(void *udev) +static usb_sts_type class_ept0_tx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -197,7 +195,7 @@ usb_sts_type class_ept0_tx_handler(void *udev) * @param udev: usb device core handler type * @retval status of usb_sts_type */ -usb_sts_type class_ept0_rx_handler(void *udev) +static usb_sts_type class_ept0_rx_handler(void *udev) { usb_sts_type status = USB_OK; @@ -212,14 +210,16 @@ usb_sts_type class_ept0_rx_handler(void *udev) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) { + usbd_core_type *pudev = (usbd_core_type *)udev; + printer_type *pprter = (printer_type *)pudev->class_handler->pdata; usb_sts_type status = USB_OK; /* ...user code... trans next packet data */ - g_tx_completed = 1; + pprter->g_tx_completed = 1; return status; } @@ -230,16 +230,16 @@ usb_sts_type class_in_handler(void *udev, uint8_t ept_num) * @param ept_num: endpoint number * @retval status of usb_sts_type */ -usb_sts_type class_out_handler(void *udev, uint8_t ept_num) +static usb_sts_type class_out_handler(void *udev, uint8_t ept_num) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; - + printer_type *pprter = (printer_type *)pudev->class_handler->pdata; /* get endpoint receive data length */ - g_rxlen = usbd_get_recv_len(pudev, ept_num); + pprter->g_rxlen = usbd_get_recv_len(pudev, ept_num); /*set recv flag*/ - g_rx_completed = 1; + pprter->g_rx_completed = 1; return status; } @@ -249,7 +249,7 @@ usb_sts_type class_out_handler(void *udev, uint8_t ept_num) * @param udev: to the structure of usbd_core_type * @retval status of usb_sts_type */ -usb_sts_type class_sof_handler(void *udev) +static usb_sts_type class_sof_handler(void *udev) { usb_sts_type status = USB_OK; @@ -264,7 +264,7 @@ usb_sts_type class_sof_handler(void *udev) * @param event: usb device event * @retval status of usb_sts_type */ -usb_sts_type class_event_handler(void *udev, usbd_event_type event) +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) { usb_sts_type status = USB_OK; switch(event) @@ -300,20 +300,21 @@ uint16_t usb_printer_get_rxdata(void *udev, uint8_t *recv_data) { uint16_t i_index = 0; usbd_core_type *pudev = (usbd_core_type *)udev; - uint16_t tmp_len = g_rxlen; + printer_type *pprter = (printer_type *)pudev->class_handler->pdata; + uint16_t tmp_len = 0; - if(g_rx_completed == 0) + if(pprter->g_rx_completed == 0) { return 0; } - g_rx_completed = 0; - tmp_len = g_rxlen; - for(i_index = 0; i_index < g_rxlen; i_index ++) + pprter->g_rx_completed = 0; + tmp_len = pprter->g_rxlen; + for(i_index = 0; i_index < pprter->g_rxlen; i_index ++) { - recv_data[i_index] = g_rx_buff[i_index]; + recv_data[i_index] = pprter->g_rx_buff[i_index]; } - usbd_ept_recv(pudev, USBD_PRINTER_BULK_OUT_EPT, g_rx_buff, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_PRINTER_BULK_OUT_EPT, pprter->g_rx_buff, USBD_PRINTER_OUT_MAXPACKET_SIZE); return tmp_len; } @@ -329,9 +330,10 @@ error_status usb_printer_send_data(void *udev, uint8_t *send_data, uint16_t len) { error_status status = SUCCESS; usbd_core_type *pudev = (usbd_core_type *)udev; - if(g_tx_completed) + printer_type *pprter = (printer_type *)pudev->class_handler->pdata; + if(pprter->g_tx_completed) { - g_tx_completed = 0; + pprter->g_tx_completed = 0; usbd_ept_send(pudev, USBD_PRINTER_BULK_IN_EPT, send_data, len); } else diff --git a/middlewares/usbd_class/printer/printer_class.h b/middlewares/usbd_class/printer/printer_class.h index 37ddeba0..05cc685a 100644 --- a/middlewares/usbd_class/printer/printer_class.h +++ b/middlewares/usbd_class/printer/printer_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_class.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb printer class file ************************************************************************** * Copyright notice & Disclaimer @@ -51,8 +51,8 @@ extern "C" { #define USBD_PRINTER_BULK_OUT_EPT 0x01 -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 +#define USBD_PRINTER_IN_MAXPACKET_SIZE 0x40 +#define USBD_PRINTER_OUT_MAXPACKET_SIZE 0x40 #define PRINTER_DEVICE_ID_LEN 24 @@ -64,16 +64,16 @@ typedef enum }printer_req_type; -#define SET_LINE_CODING 0x20 -#define GET_LINE_CODING 0x21 - -typedef struct +typedef struct { - uint32_t bitrate; - uint8_t format; - uint8_t parity; - uint8_t data; -}linecoding_type; + uint32_t alt_setting; + uint32_t g_printer_port_status; + uint8_t g_rx_buff[USBD_PRINTER_OUT_MAXPACKET_SIZE]; + uint8_t g_printer_data[USBD_PRINTER_OUT_MAXPACKET_SIZE]; + __IO uint8_t g_tx_completed; + __IO uint8_t g_rx_completed; + uint32_t g_rxlen; +}printer_type; extern usbd_class_handler printer_class_handler; uint16_t usb_printer_get_rxdata(void *udev, uint8_t *recv_data); diff --git a/middlewares/usbd_class/printer/printer_desc.c b/middlewares/usbd_class/printer/printer_desc.c index 476a2d0b..1731fe1c 100644 --- a/middlewares/usbd_class/printer/printer_desc.c +++ b/middlewares/usbd_class/printer/printer_desc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_desc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb printer device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -42,18 +42,18 @@ * @{ */ -usbd_desc_t *get_device_descriptor(void); -usbd_desc_t *get_device_qualifier(void); -usbd_desc_t *get_device_configuration(void); -usbd_desc_t *get_device_other_speed(void); -usbd_desc_t *get_device_lang_id(void); -usbd_desc_t *get_device_manufacturer_string(void); -usbd_desc_t *get_device_product_string(void); -usbd_desc_t *get_device_serial_string(void); -usbd_desc_t *get_device_interface_string(void); -usbd_desc_t *get_device_config_string(void); +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); static void get_serial_num(void); static uint8_t g_usbd_desc_buffer[256]; @@ -81,7 +81,7 @@ usbd_desc_handler printer_desc_handler = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = { USB_DEVICE_DESC_LEN, /* bLength */ USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ @@ -91,10 +91,10 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = 0x00, /* bDeviceSubClass */ 0x00, /* bDeviceProtocol */ USB_MAX_EP0_SIZE, /* bMaxPacketSize */ - LBYTE(USBD_VENDOR_ID), /* idVendor */ - HBYTE(USBD_VENDOR_ID), /* idVendor */ - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_PRINTER_VENDOR_ID), /* idVendor */ + HBYTE(USBD_PRINTER_VENDOR_ID), /* idVendor */ + LBYTE(USBD_PRINTER_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_PRINTER_PRODUCT_ID), /* idProduct */ 0x00, /* bcdDevice rel. 2.00 */ 0x02, USB_MFC_STRING, /* Index of manufacturer string */ @@ -109,12 +109,12 @@ ALIGNED_HEAD uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_PRINTER_CONFIG_DESC_SIZE] ALIGNED_TAIL = { USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ - LBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ - HBYTE(USBD_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + LBYTE(USBD_PRINTER_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_PRINTER_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ 0x01, /* bNumInterfaces: 1 interface */ 0x01, /* bConfigurationValue: configuration value */ 0x00, /* iConfiguration: index of string descriptor describing @@ -136,16 +136,16 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ USBD_PRINTER_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_IN_MAXPACKET_SIZE), - HBYTE(USBD_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + LBYTE(USBD_PRINTER_IN_MAXPACKET_SIZE), + HBYTE(USBD_PRINTER_IN_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ 0x00, /* bInterval: interval for polling endpoint for data transfers */ USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ USBD_PRINTER_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ - LBYTE(USBD_OUT_MAXPACKET_SIZE), - HBYTE(USBD_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + LBYTE(USBD_PRINTER_OUT_MAXPACKET_SIZE), + HBYTE(USBD_PRINTER_OUT_MAXPACKET_SIZE),/* wMaxPacketSize: maximum packe size this endpoint */ 0x00, /* bInterval: interval for polling endpoint for data transfers */ }; @@ -155,9 +155,9 @@ ALIGNED_HEAD uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_PRINTER_SIZ_STRING_LANGID] ALIGNED_TAIL = { - USBD_SIZ_STRING_LANGID, + USBD_PRINTER_SIZ_STRING_LANGID, USB_DESCIPTOR_TYPE_STRING, 0x09, 0x04, @@ -169,42 +169,42 @@ ALIGNED_HEAD uint8_t g_string_lang_id[USBD_SIZ_STRING_LANGID] ALIGNED_TAIL = #if defined ( __ICCARM__ ) /* iar compiler */ #pragma data_alignment=4 #endif -ALIGNED_HEAD uint8_t g_string_serial[USBD_SIZ_STRING_SERIAL] ALIGNED_TAIL = +ALIGNED_HEAD static uint8_t g_string_serial[USBD_PRINTER_SIZ_STRING_SERIAL] ALIGNED_TAIL = { - USBD_SIZ_STRING_SERIAL, + USBD_PRINTER_SIZ_STRING_SERIAL, USB_DESCIPTOR_TYPE_STRING, }; /* device descriptor */ -usbd_desc_t device_descriptor = +static usbd_desc_t device_descriptor = { USB_DEVICE_DESC_LEN, g_usbd_descriptor }; /* config descriptor */ -usbd_desc_t config_descriptor = +static usbd_desc_t config_descriptor = { - USBD_CONFIG_DESC_SIZE, + USBD_PRINTER_CONFIG_DESC_SIZE, g_usbd_configuration }; /* langid descriptor */ -usbd_desc_t langid_descriptor = +static usbd_desc_t langid_descriptor = { - USBD_SIZ_STRING_LANGID, + USBD_PRINTER_SIZ_STRING_LANGID, g_string_lang_id }; /* serial descriptor */ -usbd_desc_t serial_descriptor = +static usbd_desc_t serial_descriptor = { - USBD_SIZ_STRING_SERIAL, + USBD_PRINTER_SIZ_STRING_SERIAL, g_string_serial }; -usbd_desc_t vp_desc; +static usbd_desc_t vp_desc; /** * @brief standard usb unicode convert @@ -212,7 +212,7 @@ usbd_desc_t vp_desc; * @param unicode_buf: unicode buffer * @retval length */ -uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf) { uint16_t str_len = 0, id_pos = 2; uint8_t *tmp_str = string; @@ -286,7 +286,7 @@ static void get_serial_num(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_descriptor(void) +static usbd_desc_t *get_device_descriptor(void) { return &device_descriptor; } @@ -296,7 +296,7 @@ usbd_desc_t *get_device_descriptor(void) * @param none * @retval usbd_desc */ -usbd_desc_t * get_device_qualifier(void) +static usbd_desc_t * get_device_qualifier(void) { return NULL; } @@ -306,7 +306,7 @@ usbd_desc_t * get_device_qualifier(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_configuration(void) +static usbd_desc_t *get_device_configuration(void) { return &config_descriptor; } @@ -316,7 +316,7 @@ usbd_desc_t *get_device_configuration(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_other_speed(void) +static usbd_desc_t *get_device_other_speed(void) { return NULL; } @@ -326,7 +326,7 @@ usbd_desc_t *get_device_other_speed(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_lang_id(void) +static usbd_desc_t *get_device_lang_id(void) { return &langid_descriptor; } @@ -337,9 +337,9 @@ usbd_desc_t *get_device_lang_id(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_manufacturer_string(void) +static usbd_desc_t *get_device_manufacturer_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_PRINTER_DESC_MANUFACTURER_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -349,9 +349,9 @@ usbd_desc_t *get_device_manufacturer_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_product_string(void) +static usbd_desc_t *get_device_product_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_PRODUCT_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_PRINTER_DESC_PRODUCT_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -361,7 +361,7 @@ usbd_desc_t *get_device_product_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_serial_string(void) +static usbd_desc_t *get_device_serial_string(void) { get_serial_num(); return &serial_descriptor; @@ -372,9 +372,9 @@ usbd_desc_t *get_device_serial_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_interface_string(void) +static usbd_desc_t *get_device_interface_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_INTERFACE_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_PRINTER_DESC_INTERFACE_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } @@ -384,9 +384,9 @@ usbd_desc_t *get_device_interface_string(void) * @param none * @retval usbd_desc */ -usbd_desc_t *get_device_config_string(void) +static usbd_desc_t *get_device_config_string(void) { - vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); + vp_desc.length = usbd_unicode_convert((uint8_t *)USBD_PRINTER_DESC_CONFIGURATION_STRING, g_usbd_desc_buffer); vp_desc.descriptor = g_usbd_desc_buffer; return &vp_desc; } diff --git a/middlewares/usbd_class/printer/printer_desc.h b/middlewares/usbd_class/printer/printer_desc.h index 3a49a322..7c160192 100644 --- a/middlewares/usbd_class/printer/printer_desc.h +++ b/middlewares/usbd_class/printer/printer_desc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file printer_desc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb printer descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -47,33 +47,30 @@ extern "C" { * @{ */ -#define BCD_NUM 0x0110 +#define PRINTER_BCD_NUM 0x0110 -#define USBD_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0x57FF +#define USBD_PRINTER_VENDOR_ID 0x2E3C +#define USBD_PRINTER_PRODUCT_ID 0x57FF -#define USBD_CONFIG_DESC_SIZE 32 -#define USBD_SIZ_STRING_LANGID 4 -#define USBD_SIZ_STRING_SERIAL 0x1A +#define USBD_PRINTER_CONFIG_DESC_SIZE 32 +#define USBD_PRINTER_SIZ_STRING_LANGID 4 +#define USBD_PRINTER_SIZ_STRING_SERIAL 0x1A -#define USBD_DESC_MANUFACTURER_STRING "Artery" -#define USBD_DESC_PRODUCT_STRING "AT32 Printer" -#define USBD_DESC_CONFIGURATION_STRING "Printer Config" -#define USBD_DESC_INTERFACE_STRING "Printer Interface" +#define USBD_PRINTER_DESC_MANUFACTURER_STRING "Artery" +#define USBD_PRINTER_DESC_PRODUCT_STRING "AT32 Printer" +#define USBD_PRINTER_DESC_CONFIGURATION_STRING "Printer Config" +#define USBD_PRINTER_DESC_INTERFACE_STRING "Printer Interface" #define PRINTER_PROTOCOL_UNIDIRECTIONAL 0x01 #define PRINTER_PROTOCOL_BI_DIRECTIONAL 0x02 #define PRINTER_PROTOCOL_1284_4 0x03 #define PRINTER_PROTOCOL_VENDOR_SPECIFIC 0xFF -#define HID_BINTERVAL_TIME 0xFF #define MCU_ID1 (0x1FFFF7E8) #define MCU_ID2 (0x1FFFF7EC) #define MCU_ID3 (0x1FFFF7F0) -extern uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN]; -extern uint8_t g_usbd_configuration[USBD_CONFIG_DESC_SIZE]; extern usbd_desc_handler printer_desc_handler; diff --git a/middlewares/usbd_drivers/inc/usb_std.h b/middlewares/usbd_drivers/inc/usb_std.h index a013106f..43d2f03a 100644 --- a/middlewares/usbd_drivers/inc/usb_std.h +++ b/middlewares/usbd_drivers/inc/usb_std.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_std.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb standard header file ************************************************************************** * Copyright notice & Disclaimer @@ -186,6 +186,56 @@ typedef enum #define USB_EPT_DESC_FD_EPT 0x10 /*!< usb endpoint description fd */ #define USB_EPT_DESC_FDDATA_EPT 0x20 /*!< usb endpoint description fddata */ +/** + * @brief usb cdc class descriptor define + */ +#define USBD_CDC_CS_INTERFACE 0x24 +#define USBD_CDC_CS_ENDPOINT 0x25 + +/** + * @brief usb cdc class sub-type define + */ +#define USBD_CDC_SUBTYPE_HEADER 0x00 +#define USBD_CDC_SUBTYPE_CMF 0x01 +#define USBD_CDC_SUBTYPE_ACM 0x02 +#define USBD_CDC_SUBTYPE_UFD 0x06 + +/** + * @brief usb cdc class request code define + */ +#define SET_LINE_CODING 0x20 +#define GET_LINE_CODING 0x21 + +/** + * @brief usb cdc class set line coding struct + */ +typedef struct +{ + uint32_t bitrate; /* line coding baud rate */ + uint8_t format; /* line coding foramt */ + uint8_t parity; /* line coding parity */ + uint8_t data; /* line coding data bit */ +}linecoding_type; + +/** + * @brief usb hid class descriptor define + */ +#define HID_CLASS_DESC_HID 0x21 +#define HID_CLASS_DESC_REPORT 0x22 +#define HID_CLASS_DESC_PHYSICAL 0x23 + +/** + * @brief usb hid class request code define + */ +#define HID_REQ_SET_PROTOCOL 0x0B +#define HID_REQ_GET_PROTOCOL 0x03 +#define HID_REQ_SET_IDLE 0x0A +#define HID_REQ_GET_IDLE 0x02 +#define HID_REQ_SET_REPORT 0x09 +#define HID_REQ_GET_REPORT 0x01 +#define HID_DESCRIPTOR_TYPE 0x21 +#define HID_REPORT_DESC 0x22 + /** * @brief endpoint 0 max size */ diff --git a/middlewares/usbd_drivers/inc/usbd_core.h b/middlewares/usbd_drivers/inc/usbd_core.h index c927033c..123198af 100644 --- a/middlewares/usbd_drivers/inc/usbd_core.h +++ b/middlewares/usbd_drivers/inc/usbd_core.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_core.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb device core header file ************************************************************************** * Copyright notice & Disclaimer @@ -100,6 +100,7 @@ typedef struct usb_sts_type (*out_handler)(void *udev, uint8_t ept_num); /*!< usb class out transfer complete handler */ usb_sts_type (*sof_handler)(void *udev); /*!< usb class sof handler */ usb_sts_type (*event_handler)(void *udev, usbd_event_type event); /*!< usb class event handler */ + void *pdata; /*!< usb class data pointer */ }usbd_class_handler; /** diff --git a/middlewares/usbd_drivers/inc/usbd_int.h b/middlewares/usbd_drivers/inc/usbd_int.h index 42d94a46..f07fb63e 100644 --- a/middlewares/usbd_drivers/inc/usbd_int.h +++ b/middlewares/usbd_drivers/inc/usbd_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/inc/usbd_sdr.h b/middlewares/usbd_drivers/inc/usbd_sdr.h index d607c742..fab8eec0 100644 --- a/middlewares/usbd_drivers/inc/usbd_sdr.h +++ b/middlewares/usbd_drivers/inc/usbd_sdr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_sdr.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb standard request header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/src/usbd_core.c b/middlewares/usbd_drivers/src/usbd_core.c index 18857703..40f7114b 100644 --- a/middlewares/usbd_drivers/src/usbd_core.c +++ b/middlewares/usbd_drivers/src/usbd_core.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_core.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb driver ************************************************************************** * Copyright notice & Disclaimer @@ -635,7 +635,8 @@ void usbd_ept_defaut_init(usbd_core_type *udev) udev->ept_in[i_index].maxpacket = 0; udev->ept_in[i_index].trans_buf = 0; udev->ept_in[i_index].total_len = 0; - udev->ept_in[i_index].tx_addr = 0; + udev->ept_in[i_index].tx_addr = 0; + udev->ept_in[i_index].rx_addr = 0; } /* init out endpoint info structure */ @@ -648,6 +649,7 @@ void usbd_ept_defaut_init(usbd_core_type *udev) udev->ept_out[i_index].trans_buf = 0; udev->ept_out[i_index].total_len = 0; udev->ept_out[i_index].rx_addr = 0; + udev->ept_out[i_index].tx_addr = 0; } return; } diff --git a/middlewares/usbd_drivers/src/usbd_int.c b/middlewares/usbd_drivers/src/usbd_int.c index 9eb955e2..2e1ae8c4 100644 --- a/middlewares/usbd_drivers/src/usbd_int.c +++ b/middlewares/usbd_drivers/src/usbd_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb interrupt request ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_drivers/src/usbd_sdr.c b/middlewares/usbd_drivers/src/usbd_sdr.c index 11f22312..10165d11 100644 --- a/middlewares/usbd_drivers/src/usbd_sdr.c +++ b/middlewares/usbd_drivers/src/usbd_sdr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_sdr.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb standard device request ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at32f403a_407_board/at32f403a_407_board.c b/project/at32f403a_407_board/at32f403a_407_board.c index 39769ea9..ae7f1291 100644 --- a/project/at32f403a_407_board/at32f403a_407_board.c +++ b/project/at32f403a_407_board/at32f403a_407_board.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_board.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief set of firmware functions to manage leds and push-button. * initialize delay function. ************************************************************************** diff --git a/project/at32f403a_407_board/at32f403a_407_board.h b/project/at32f403a_407_board/at32f403a_407_board.h index 2da1a8ff..8a48cc93 100644 --- a/project/at32f403a_407_board/at32f403a_407_board.h +++ b/project/at32f403a_407_board/at32f403a_407_board.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_board.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file for at-start board. set of firmware functions to * manage leds and push-button. initialize delay function. ************************************************************************** diff --git a/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/acc/calibration/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/acc/calibration/inc/usb_conf.h b/project/at_start_f403a/examples/acc/calibration/inc/usb_conf.h index 322df09d..00a93e2b 100644 --- a/project/at_start_f403a/examples/acc/calibration/inc/usb_conf.h +++ b/project/at_start_f403a/examples/acc/calibration/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/acc/calibration/readme.txt b/project/at_start_f403a/examples/acc/calibration/readme.txt index 0e0fe0fa..579e9f2b 100644 --- a/project/at_start_f403a/examples/acc/calibration/readme.txt +++ b/project/at_start_f403a/examples/acc/calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_int.c b/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_int.c index cb91a6bd..c827d39f 100644 --- a/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/acc/calibration/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/acc/calibration/src/main.c b/project/at_start_f403a/examples/acc/calibration/src/main.c index 6ccee740..bd9eb2bf 100644 --- a/project/at_start_f403a/examples/acc/calibration/src/main.c +++ b/project/at_start_f403a/examples/acc/calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -287,7 +287,7 @@ int main(void) nvic_irq_enable(USBFS_L_CAN1_RX0_IRQn, 1, 0); - usbd_core_init(&usb_core_dev, USB, &class_handler, &desc_handler, 0); + usbd_core_init(&usb_core_dev, USB, &cdc_class_handler, &cdc_desc_handler, 0); usbd_connect(&usb_core_dev); @@ -340,7 +340,7 @@ int main(void) if(data_len == 0) send_zero_packet = 0; - timeout = 50000; + timeout = 5000000; do { /* send data to host */ diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/readme.txt b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/readme.txt index 1f377ef2..2eebecf8 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/readme.txt +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_int.c index be0d27f7..f1f05d8e 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/main.c b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/main.c index 533817f3..d9685b30 100644 --- a/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/main.c +++ b/project/at_start_f403a/examples/adc/combine_mode_ordinary_simult/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f403a/examples/adc/current_vref_value_check/readme.txt index 922c64e9..461b821f 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/readme.txt +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_int.c index 7cf32f9f..ceefcbb8 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/current_vref_value_check/src/main.c b/project/at_start_f403a/examples/adc/current_vref_value_check/src/main.c index 81e5bcf4..7147cb14 100644 --- a/project/at_start_f403a/examples/adc/current_vref_value_check/src/main.c +++ b/project/at_start_f403a/examples/adc/current_vref_value_check/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/readme.txt index 8418915d..f285cef6 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/readme.txt +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_int.c index 6454768d..cc6c3262 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/main.c b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/main.c index 610474bc..7e384f4a 100644 --- a/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/main.c +++ b/project/at_start_f403a/examples/adc/exint_trigger_partitioned/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f403a/examples/adc/internal_temperature_sensor/readme.txt index f3821b99..541ec2cd 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/readme.txt +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_int.c index c55f5481..8e27c65d 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/main.c b/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/main.c index d7e51db0..8b045688 100644 --- a/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/main.c +++ b/project/at_start_f403a/examples/adc/internal_temperature_sensor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f403a/examples/adc/software_trigger_repeat/readme.txt index e618fdd2..bba314f3 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/readme.txt +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_int.c index 5130b912..dbdce610 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/software_trigger_repeat/src/main.c b/project/at_start_f403a/examples/adc/software_trigger_repeat/src/main.c index 1fe7dbd5..235e004e 100644 --- a/project/at_start_f403a/examples/adc/software_trigger_repeat/src/main.c +++ b/project/at_start_f403a/examples/adc/software_trigger_repeat/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/readme.txt index 5221c970..fb6ffab3 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/readme.txt +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_int.c index 025af47e..35e1e0bf 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/main.c b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/main.c index 4fb6e89a..1f9ed405 100644 --- a/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/main.c +++ b/project/at_start_f403a/examples/adc/tmr_trigger_automatic_preempted/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/readme.txt b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/readme.txt index fffb4b6e..d504bf77 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/readme.txt +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_int.c index a2fa09a5..f9f52ff3 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/main.c b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/main.c index 2ec0b166..00e4deb2 100644 --- a/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/main.c +++ b/project/at_start_f403a/examples/adc/triple_adc_synchro_trigger/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f403a/examples/adc/voltage_monitoring/readme.txt index 28ba210d..2dd53fec 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/readme.txt +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_int.c b/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_int.c index 0fb36552..2c8115a1 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/adc/voltage_monitoring/src/main.c b/project/at_start_f403a/examples/adc/voltage_monitoring/src/main.c index 4c7f000f..c3d3be2d 100644 --- a/project/at_start_f403a/examples/adc/voltage_monitoring/src/main.c +++ b/project/at_start_f403a/examples/adc/voltage_monitoring/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/bpr/bpr_data/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/bpr_data/readme.txt b/project/at_start_f403a/examples/bpr/bpr_data/readme.txt index dd788f7a..ca60c357 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/readme.txt +++ b/project/at_start_f403a/examples/bpr/bpr_data/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_int.c b/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_int.c index aaf3b45f..3ffb6af9 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/bpr/bpr_data/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/bpr_data/src/main.c b/project/at_start_f403a/examples/bpr/bpr_data/src/main.c index c757a026..69c20ad7 100644 --- a/project/at_start_f403a/examples/bpr/bpr_data/src/main.c +++ b/project/at_start_f403a/examples/bpr/bpr_data/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/bpr/tamper/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/tamper/readme.txt b/project/at_start_f403a/examples/bpr/tamper/readme.txt index bf8fda38..db4ee28a 100644 --- a/project/at_start_f403a/examples/bpr/tamper/readme.txt +++ b/project/at_start_f403a/examples/bpr/tamper/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_int.c b/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_int.c index e733553d..0116d23a 100644 --- a/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/bpr/tamper/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/bpr/tamper/src/main.c b/project/at_start_f403a/examples/bpr/tamper/src/main.c index abe9f527..c748661c 100644 --- a/project/at_start_f403a/examples/bpr/tamper/src/main.c +++ b/project/at_start_f403a/examples/bpr/tamper/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/can/communication_mode/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/communication_mode/readme.txt b/project/at_start_f403a/examples/can/communication_mode/readme.txt index 4aff2f71..805c61f7 100644 --- a/project/at_start_f403a/examples/can/communication_mode/readme.txt +++ b/project/at_start_f403a/examples/can/communication_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_int.c b/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_int.c index bbed918e..1bf28987 100644 --- a/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/can/communication_mode/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/communication_mode/src/main.c b/project/at_start_f403a/examples/can/communication_mode/src/main.c index 8a262238..ead066de 100644 --- a/project/at_start_f403a/examples/can/communication_mode/src/main.c +++ b/project/at_start_f403a/examples/can/communication_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/can/filter/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/filter/readme.txt b/project/at_start_f403a/examples/can/filter/readme.txt index ae7a88bb..5c8596c6 100644 --- a/project/at_start_f403a/examples/can/filter/readme.txt +++ b/project/at_start_f403a/examples/can/filter/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/can/filter/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/can/filter/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/can/filter/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/can/filter/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/filter/src/at32f403a_407_int.c b/project/at_start_f403a/examples/can/filter/src/at32f403a_407_int.c index 6a91ac7d..db435562 100644 --- a/project/at_start_f403a/examples/can/filter/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/can/filter/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/filter/src/main.c b/project/at_start_f403a/examples/can/filter/src/main.c index 3c198946..fd6b4ebd 100644 --- a/project/at_start_f403a/examples/can/filter/src/main.c +++ b/project/at_start_f403a/examples/can/filter/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/can/loopback_mode/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/loopback_mode/readme.txt b/project/at_start_f403a/examples/can/loopback_mode/readme.txt index 7a907730..3820825d 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f403a/examples/can/loopback_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_int.c b/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_int.c index 37929629..ea730164 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/can/loopback_mode/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/can/loopback_mode/src/main.c b/project/at_start_f403a/examples/can/loopback_mode/src/main.c index 9a38e7ac..965cda96 100644 --- a/project/at_start_f403a/examples/can/loopback_mode/src/main.c +++ b/project/at_start_f403a/examples/can/loopback_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f403a/examples/cortex_m4/bit_band/readme.txt index ebeab4da..7c1b32c0 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/readme.txt +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_int.c b/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_int.c index 69346c49..44ffb501 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/bit_band/src/main.c b/project/at_start_f403a/examples/cortex_m4/bit_band/src/main.c index b8c0add1..105a3ffc 100644 --- a/project/at_start_f403a/examples/cortex_m4/bit_band/src/main.c +++ b/project/at_start_f403a/examples/cortex_m4/bit_band/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/cortex_m4/fpu/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/inc/julia_fpu.h b/project/at_start_f403a/examples/cortex_m4/fpu/inc/julia_fpu.h index 605f5c82..32386fb7 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/inc/julia_fpu.h +++ b/project/at_start_f403a/examples/cortex_m4/fpu/inc/julia_fpu.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file julia_fpu.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief julia_fpu header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/readme.txt b/project/at_start_f403a/examples/cortex_m4/fpu/readme.txt index e49e014c..8c3392da 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/readme.txt +++ b/project/at_start_f403a/examples/cortex_m4/fpu/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_int.c b/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_int.c index 2f693594..cb176666 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/cortex_m4/fpu/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/src/julia_fpu.c b/project/at_start_f403a/examples/cortex_m4/fpu/src/julia_fpu.c index babf57fa..c30b9ca1 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/src/julia_fpu.c +++ b/project/at_start_f403a/examples/cortex_m4/fpu/src/julia_fpu.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file julia_fpu.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief julia_fpu source file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/fpu/src/main.c b/project/at_start_f403a/examples/cortex_m4/fpu/src/main.c index 3ce906b7..5e940e3b 100644 --- a/project/at_start_f403a/examples/cortex_m4/fpu/src/main.c +++ b/project/at_start_f403a/examples/cortex_m4/fpu/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/readme.txt b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/readme.txt index f46d577e..673568af 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/readme.txt +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_int.c b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_int.c index 9834590c..9012916f 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/main.c b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/main.c index d965a348..b800f771 100644 --- a/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/main.c +++ b/project/at_start_f403a/examples/cortex_m4/systick_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/crc/calculation/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crc/calculation/readme.txt b/project/at_start_f403a/examples/crc/calculation/readme.txt index ca3e49ed..3316177b 100644 --- a/project/at_start_f403a/examples/crc/calculation/readme.txt +++ b/project/at_start_f403a/examples/crc/calculation/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_int.c b/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_int.c index d5d23b66..fb044bf5 100644 --- a/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/crc/calculation/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crc/calculation/src/main.c b/project/at_start_f403a/examples/crc/calculation/src/main.c index d389d0bf..706f7956 100644 --- a/project/at_start_f403a/examples/crc/calculation/src/main.c +++ b/project/at_start_f403a/examples/crc/calculation/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/readme.txt b/project/at_start_f403a/examples/crm/clock_failure_detection/readme.txt index 8c52e389..6b06e1bf 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/readme.txt +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_int.c b/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_int.c index 86b89f54..96d4e910 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/clock_failure_detection/src/main.c b/project/at_start_f403a/examples/crm/clock_failure_detection/src/main.c index 7e177bb4..a5be35a7 100644 --- a/project/at_start_f403a/examples/crm/clock_failure_detection/src/main.c +++ b/project/at_start_f403a/examples/crm/clock_failure_detection/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/crm/sysclk_switch/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/readme.txt b/project/at_start_f403a/examples/crm/sysclk_switch/readme.txt index 9f046d43..c66c9654 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/readme.txt +++ b/project/at_start_f403a/examples/crm/sysclk_switch/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_int.c b/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_int.c index b812c5f5..460fd2ad 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/crm/sysclk_switch/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/crm/sysclk_switch/src/main.c b/project/at_start_f403a/examples/crm/sysclk_switch/src/main.c index 1bfaba0f..eb3621c4 100644 --- a/project/at_start_f403a/examples/crm/sysclk_switch/src/main.c +++ b/project/at_start_f403a/examples/crm/sysclk_switch/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/readme.txt b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/readme.txt index 518ff089..c20f9f01 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/readme.txt +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_int.c index b21b8470..10457634 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/main.c b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/main.c index 05011cec..27a1a521 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/main.c +++ b/project/at_start_f403a/examples/dac/double_mode_dma_sinewave/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -37,7 +37,7 @@ gpio_init_type gpio_init_struct = {0}; dma_init_type dma_init_struct = {0}; - +crm_clocks_freq_type crm_clocks_freq_struct = {0}; const uint16_t sine12bit[32] = {2047, 2447, 2831, 3185, 3498, 3750, 3939, 4056, 4095, 4056, 3939, 3750, 3495, 3185, 2831, 2447, 2047, 1647, 1263, 909, 599, 344, 155, 38, @@ -77,8 +77,11 @@ int main(void) gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOA, &gpio_init_struct); - /* tmr2 configuration */ - tmr_base_init(TMR2, 0x19, 0x0); + /* get system clock */ + crm_clocks_freq_get(&crm_clocks_freq_struct); + + /* (systemclock/(systemclock/1000000))/100 = 10KHz */ + tmr_base_init(TMR2, 99, (crm_clocks_freq_struct.sclk_freq/1000000 - 1)); tmr_cnt_dir_set(TMR2, TMR_COUNT_UP); /* primary tmr2 output selection */ diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/readme.txt b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/readme.txt index fe7ccde5..c1c7cbda 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/readme.txt +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_int.c index 1bc0e0b9..392e1a14 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/main.c b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/main.c index 412a71c1..9b3bf4d0 100644 --- a/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/main.c +++ b/project/at_start_f403a/examples/dac/double_mode_dma_squarewave/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -83,8 +83,8 @@ int main(void) dac_wave_generate(DAC1_SELECT, DAC_WAVE_GENERATE_NONE); dac_wave_generate(DAC2_SELECT, DAC_WAVE_GENERATE_NONE); - dac_output_buffer_enable(DAC1_SELECT, FALSE); - dac_output_buffer_enable(DAC2_SELECT, FALSE); + dac_output_buffer_enable(DAC1_SELECT, TRUE); + dac_output_buffer_enable(DAC2_SELECT, TRUE); dac_dma_enable(DAC1_SELECT, TRUE); dac_dma_enable(DAC2_SELECT, TRUE); diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/readme.txt b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/readme.txt index bbc94ab3..a55df44f 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/readme.txt +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_int.c index d4c30f71..81b767e2 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/main.c b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/main.c index d8e94cac..5554cd3b 100644 --- a/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/main.c +++ b/project/at_start_f403a/examples/dac/one_dac_dma_escalator/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -38,7 +38,7 @@ gpio_init_type gpio_init_struct = {0}; dma_init_type dma_init_struct = {0}; - +crm_clocks_freq_type crm_clocks_freq_struct = {0}; const uint8_t escalator8bit[6] = {0x0, 0x33, 0x66, 0x99, 0xCC, 0xFF}; /** @@ -73,8 +73,11 @@ int main(void) gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOA, &gpio_init_struct); - /* tmr2 configuration */ - tmr_base_init(TMR2, 0xff, 0xff); + /* get system clock */ + crm_clocks_freq_get(&crm_clocks_freq_struct); + + /* (systemclock/(systemclock/1000000))/1000 = 1KHz */ + tmr_base_init(TMR2, 999, (crm_clocks_freq_struct.sclk_freq/1000000 - 1)); tmr_cnt_dir_set(TMR2, TMR_COUNT_UP); /* primary tmr2 output selection */ diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/readme.txt b/project/at_start_f403a/examples/dac/one_dac_noisewave/readme.txt index 5bc10b77..aa3652d2 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/readme.txt +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_int.c index d10ffde4..60650ea4 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/one_dac_noisewave/src/main.c b/project/at_start_f403a/examples/dac/one_dac_noisewave/src/main.c index d2b2654b..125ad296 100644 --- a/project/at_start_f403a/examples/dac/one_dac_noisewave/src/main.c +++ b/project/at_start_f403a/examples/dac/one_dac_noisewave/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -77,7 +77,7 @@ int main(void) dac_mask_amplitude_select(DAC1_SELECT, DAC_LSFR_BITB0_AMPLITUDE_4095); - dac_output_buffer_enable(DAC1_SELECT, FALSE); + dac_output_buffer_enable(DAC1_SELECT, TRUE); /* enable dac1: once the dac1 is enabled, pa.04 is automatically connected to the dac converter. */ @@ -86,6 +86,7 @@ int main(void) while(1) { dac_software_trigger_generate(DAC1_SELECT); + delay_us(1); } } diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/readme.txt b/project/at_start_f403a/examples/dac/two_dac_trianglewave/readme.txt index f2ddec1f..d3e78e88 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/readme.txt +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_int.c index 25568e83..57a510a6 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/main.c b/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/main.c index bfe5b723..e296cba9 100644 --- a/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/main.c +++ b/project/at_start_f403a/examples/dac/two_dac_trianglewave/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -37,7 +37,7 @@ */ gpio_init_type gpio_init_struct = {0}; - +crm_clocks_freq_type crm_clocks_freq_struct = {0}; /** * @brief main function. * @param none @@ -69,8 +69,11 @@ int main(void) gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOA, &gpio_init_struct); - /* tmr2 Configuration */ - tmr_base_init(TMR2, 0xf, 0xf); + /* get system clock */ + crm_clocks_freq_get(&crm_clocks_freq_struct); + + /* (systemclock/(systemclock/1000000))/100 = 10KHz */ + tmr_base_init(TMR2, 99, (crm_clocks_freq_struct.sclk_freq/1000000 - 1)); tmr_cnt_dir_set(TMR2, TMR_COUNT_UP); /* primary tmr2 output selection */ diff --git a/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/debug/tmr1/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/debug/tmr1/readme.txt b/project/at_start_f403a/examples/debug/tmr1/readme.txt index d33c1c21..dc7efa6d 100644 --- a/project/at_start_f403a/examples/debug/tmr1/readme.txt +++ b/project/at_start_f403a/examples/debug/tmr1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_int.c b/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_int.c index 80377df1..0de22cd7 100644 --- a/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/debug/tmr1/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/debug/tmr1/src/main.c b/project/at_start_f403a/examples/debug/tmr1/src/main.c index 74c97c02..4583d696 100644 --- a/project/at_start_f403a/examples/debug/tmr1/src/main.c +++ b/project/at_start_f403a/examples/debug/tmr1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/readme.txt b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/readme.txt index 51b464ef..f23d5f88 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/readme.txt +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_int.c index 4f70b873..54dccab1 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/main.c b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/main.c index 8499f0f5..f15448e5 100644 --- a/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/main.c +++ b/project/at_start_f403a/examples/dma/data_to_gpio_flexible/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/dma/flash_to_sram/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/readme.txt b/project/at_start_f403a/examples/dma/flash_to_sram/readme.txt index 60d6e9b5..a29399b6 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/readme.txt +++ b/project/at_start_f403a/examples/dma/flash_to_sram/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_int.c b/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_int.c index cabdc850..706c97a8 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/dma/flash_to_sram/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/dma/flash_to_sram/src/main.c b/project/at_start_f403a/examples/dma/flash_to_sram/src/main.c index b40ca8f4..e488270f 100644 --- a/project/at_start_f403a/examples/dma/flash_to_sram/src/main.c +++ b/project/at_start_f403a/examples/dma/flash_to_sram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/exint/exint_config/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_config/readme.txt b/project/at_start_f403a/examples/exint/exint_config/readme.txt index 68f48a17..e764b2da 100644 --- a/project/at_start_f403a/examples/exint/exint_config/readme.txt +++ b/project/at_start_f403a/examples/exint/exint_config/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_int.c b/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_int.c index 65ffb0c5..3fab93d7 100644 --- a/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/exint/exint_config/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_config/src/main.c b/project/at_start_f403a/examples/exint/exint_config/src/main.c index cc972edc..2cc7a5ce 100644 --- a/project/at_start_f403a/examples/exint/exint_config/src/main.c +++ b/project/at_start_f403a/examples/exint/exint_config/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/readme.txt b/project/at_start_f403a/examples/exint/exint_software_trigger/readme.txt index ffc2cb1b..1d4bf627 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/readme.txt +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_int.c b/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_int.c index 459d0510..c214016f 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/exint/exint_software_trigger/src/main.c b/project/at_start_f403a/examples/exint/exint_software_trigger/src/main.c index 83967df8..2e11f294 100644 --- a/project/at_start_f403a/examples/exint/exint_software_trigger/src/main.c +++ b/project/at_start_f403a/examples/exint/exint_software_trigger/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -75,8 +75,8 @@ static void tmr1_config(void) crm_periph_clock_enable(CRM_TMR1_PERIPH_CLOCK, TRUE); - /* (systemclock / 24000) / 10000 = 1Hz(1s) */ - tmr_base_init(TMR1, 10000, 24000); + /* (systemclock / (system_core_clock/10000)) / 10000 = 1Hz(1s) */ + tmr_base_init(TMR1, 10000-1, system_core_clock/10000-1); tmr_cnt_dir_set(TMR1, TMR_COUNT_UP); tmr_clock_source_div_set(TMR1, TMR_CLOCK_DIV1); tmr_interrupt_enable(TMR1, TMR_OVF_INT, TRUE); @@ -130,7 +130,6 @@ int main(void) at32_led_on(LED3); at32_led_on(LED4); tmr1_config(); - /* configure pa0 in interrupt mode */ exint_line4_config(); tmr_counter_enable(TMR1, TRUE); while(1) diff --git a/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/flash/flash_write_read/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/inc/flash.h b/project/at_start_f403a/examples/flash/flash_write_read/inc/flash.h index c8e1a812..344ca446 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/inc/flash.h +++ b/project/at_start_f403a/examples/flash/flash_write_read/inc/flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/readme.txt b/project/at_start_f403a/examples/flash/flash_write_read/readme.txt index e593bd3a..b57395e5 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/readme.txt +++ b/project/at_start_f403a/examples/flash/flash_write_read/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_int.c b/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_int.c index 7f54242b..11f55ba8 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/flash/flash_write_read/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/src/flash.c b/project/at_start_f403a/examples/flash/flash_write_read/src/flash.c index ffa36f92..53a0ed7c 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/src/flash.c +++ b/project/at_start_f403a/examples/flash/flash_write_read/src/flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief flash program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/flash_write_read/src/main.c b/project/at_start_f403a/examples/flash/flash_write_read/src/main.c index 2af433bb..d640240f 100644 --- a/project/at_start_f403a/examples/flash/flash_write_read/src/main.c +++ b/project/at_start_f403a/examples/flash/flash_write_read/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/flash/operate_spim/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/inc/operate_spim.h b/project/at_start_f403a/examples/flash/operate_spim/inc/operate_spim.h index 8c83a385..3b6e5de8 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/inc/operate_spim.h +++ b/project/at_start_f403a/examples/flash/operate_spim/inc/operate_spim.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file operate_spim.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief operate_spim header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/readme.txt b/project/at_start_f403a/examples/flash/operate_spim/readme.txt index 328ac1d8..e4bdc8cc 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/readme.txt +++ b/project/at_start_f403a/examples/flash/operate_spim/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_clock.c index 969d5fa0..637bf8be 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_int.c b/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_int.c index 97537e81..4d7821dc 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/flash/operate_spim/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/src/main.c b/project/at_start_f403a/examples/flash/operate_spim/src/main.c index 40ffd35a..9da6d4e9 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/src/main.c +++ b/project/at_start_f403a/examples/flash/operate_spim/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/operate_spim/src/operate_spim.c b/project/at_start_f403a/examples/flash/operate_spim/src/operate_spim.c index e136a1e2..ead41b44 100644 --- a/project/at_start_f403a/examples/flash/operate_spim/src/operate_spim.c +++ b/project/at_start_f403a/examples/flash/operate_spim/src/operate_spim.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file operate_spim.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief operate spim program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/flash/run_in_spim/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/inc/run_in_spim.h b/project/at_start_f403a/examples/flash/run_in_spim/inc/run_in_spim.h index ed8f7a86..77c0e563 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/inc/run_in_spim.h +++ b/project/at_start_f403a/examples/flash/run_in_spim/inc/run_in_spim.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file run_in_spim.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief run_in_spim header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx b/project/at_start_f403a/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx index c9611e70..cc5a5b6e 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx +++ b/project/at_start_f403a/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx @@ -10,7 +10,7 @@ run_in_spim 0x4 ARM-ADS - 5060061::V5.06 update 1 (build 61)::ARMCC + 5060960::V5.06 update 7 (build 960)::ARMCC 0 @@ -259,8 +259,8 @@ 1 - 0x8500000 - 0x700000 + 0x0 + 0x0 1 diff --git a/project/at_start_f403a/examples/flash/run_in_spim/readme.txt b/project/at_start_f403a/examples/flash/run_in_spim/readme.txt index 581b5ef8..697440b8 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/readme.txt +++ b/project/at_start_f403a/examples/flash/run_in_spim/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_clock.c index 969d5fa0..637bf8be 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_int.c b/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_int.c index 98d7a24c..a1a437e1 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/flash/run_in_spim/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/src/main.c b/project/at_start_f403a/examples/flash/run_in_spim/src/main.c index d8ece4e2..048511ba 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/src/main.c +++ b/project/at_start_f403a/examples/flash/run_in_spim/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/flash/run_in_spim/src/run_in_spim.c b/project/at_start_f403a/examples/flash/run_in_spim/src/run_in_spim.c index 346e3d64..3a8269a3 100644 --- a/project/at_start_f403a/examples/flash/run_in_spim/src/run_in_spim.c +++ b/project/at_start_f403a/examples/flash/run_in_spim/src/run_in_spim.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file run_in_spim.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief run in spim program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/gpio/led_toggle/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/led_toggle/readme.txt b/project/at_start_f403a/examples/gpio/led_toggle/readme.txt index efe7c330..6405c8b7 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/readme.txt +++ b/project/at_start_f403a/examples/gpio/led_toggle/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_int.c b/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_int.c index 89f17f39..d286ec6d 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/gpio/led_toggle/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/led_toggle/src/main.c b/project/at_start_f403a/examples/gpio/led_toggle/src/main.c index 085ecdee..b2cc2dae 100644 --- a/project/at_start_f403a/examples/gpio/led_toggle/src/main.c +++ b/project/at_start_f403a/examples/gpio/led_toggle/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/readme.txt b/project/at_start_f403a/examples/gpio/swjtag_remap/readme.txt index 0ed032df..9eef5ba2 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/readme.txt +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_int.c b/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_int.c index c8bf9410..a1d00a01 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/gpio/swjtag_remap/src/main.c b/project/at_start_f403a/examples/gpio/swjtag_remap/src/main.c index 2f2685d6..6641c31a 100644 --- a/project/at_start_f403a/examples/gpio/swjtag_remap/src/main.c +++ b/project/at_start_f403a/examples/gpio/swjtag_remap/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2c/communication_dma/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_dma/readme.txt b/project/at_start_f403a/examples/i2c/communication_dma/readme.txt index 935887ca..f70b9c78 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/readme.txt +++ b/project/at_start_f403a/examples/i2c/communication_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communicationdma/readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_int.c index 129fbec7..2af0b310 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2c/communication_dma/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_dma/src/main.c b/project/at_start_f403a/examples/i2c/communication_dma/src/main.c index 1d933af6..d2793199 100644 --- a/project/at_start_f403a/examples/i2c/communication_dma/src/main.c +++ b/project/at_start_f403a/examples/i2c/communication_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2c/communication_int/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_int/readme.txt b/project/at_start_f403a/examples/i2c/communication_int/readme.txt index d9a5c448..71720cb4 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/readme.txt +++ b/project/at_start_f403a/examples/i2c/communication_int/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communicationint/readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_int.c index 9843e72e..01af48e6 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2c/communication_int/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_int/src/main.c b/project/at_start_f403a/examples/i2c/communication_int/src/main.c index dbb46b90..f0f5c57e 100644 --- a/project/at_start_f403a/examples/i2c/communication_int/src/main.c +++ b/project/at_start_f403a/examples/i2c/communication_int/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2c/communication_poll/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_poll/readme.txt b/project/at_start_f403a/examples/i2c/communication_poll/readme.txt index 3331b215..95326674 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/readme.txt +++ b/project/at_start_f403a/examples/i2c/communication_poll/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communication_poll/readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_int.c index f8a7f142..98ac1194 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2c/communication_poll/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/communication_poll/src/main.c b/project/at_start_f403a/examples/i2c/communication_poll/src/main.c index cc0178e4..64372af3 100644 --- a/project/at_start_f403a/examples/i2c/communication_poll/src/main.c +++ b/project/at_start_f403a/examples/i2c/communication_poll/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2c/eeprom/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/eeprom/readme.txt b/project/at_start_f403a/examples/i2c/eeprom/readme.txt index ae7bafbe..ff1d64d4 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/readme.txt +++ b/project/at_start_f403a/examples/i2c/eeprom/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file eeprom/readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_int.c index 4f6bf1fc..4b949c43 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2c/eeprom/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2c/eeprom/src/main.c b/project/at_start_f403a/examples/i2c/eeprom/src/main.c index fcd63127..4aa6da08 100644 --- a/project/at_start_f403a/examples/i2c/eeprom/src/main.c +++ b/project/at_start_f403a/examples/i2c/eeprom/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/readme.txt b/project/at_start_f403a/examples/i2s/fullduplex_dma/readme.txt index 79a0ac0d..a5fb2284 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/readme.txt +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_int.c index 181f6799..729cbd7a 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/fullduplex_dma/src/main.c b/project/at_start_f403a/examples/i2s/fullduplex_dma/src/main.c index 84d2dade..1e6fa536 100644 --- a/project/at_start_f403a/examples/i2s/fullduplex_dma/src/main.c +++ b/project/at_start_f403a/examples/i2s/fullduplex_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/readme.txt b/project/at_start_f403a/examples/i2s/halfduplex_dma/readme.txt index 4fe09aad..f2edf4f9 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/readme.txt +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_int.c index 7c253ddc..ff34a6d1 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_dma/src/main.c b/project/at_start_f403a/examples/i2s/halfduplex_dma/src/main.c index cc771a30..197d0503 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_dma/src/main.c +++ b/project/at_start_f403a/examples/i2s/halfduplex_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/readme.txt b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/readme.txt index b01a83f2..4c9bbd7e 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/readme.txt +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_int.c index f992fe05..6eabda4b 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/main.c b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/main.c index 2937ebd0..6cb8aecb 100644 --- a/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/main.c +++ b/project/at_start_f403a/examples/i2s/halfduplex_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt index 15161277..bc9cb6bc 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_int.c b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_int.c index be3d5e37..e8c083a1 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c index a80ed796..c8e1efee 100644 --- a/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c +++ b/project/at_start_f403a/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/readme.txt b/project/at_start_f403a/examples/pwc/deepsleep_rtc/readme.txt index 76577be4..cb6707eb 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/readme.txt +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_int.c b/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_int.c index 63ad55c8..f25a5594 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/main.c b/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/main.c index e3f507d1..90da9c6e 100644 --- a/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/main.c +++ b/project/at_start_f403a/examples/pwc/deepsleep_rtc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/readme.txt b/project/at_start_f403a/examples/pwc/power_voltage_monitor/readme.txt index 8f768027..877e26f6 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/readme.txt +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_int.c b/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_int.c index ad648ede..a63344ab 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/main.c b/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/main.c index 2e32c8eb..8db8707d 100644 --- a/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/main.c +++ b/project/at_start_f403a/examples/pwc/power_voltage_monitor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/readme.txt b/project/at_start_f403a/examples/pwc/sleep_tmr2/readme.txt index 8d1b7a0e..7d06a98d 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/readme.txt +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_int.c b/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_int.c index 54094243..205f4e0f 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_tmr2/src/main.c b/project/at_start_f403a/examples/pwc/sleep_tmr2/src/main.c index 1f997224..a3988599 100644 --- a/project/at_start_f403a/examples/pwc/sleep_tmr2/src/main.c +++ b/project/at_start_f403a/examples/pwc/sleep_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -43,11 +43,16 @@ */ void tmr2_config(void) { + crm_clocks_freq_type crm_clocks_freq_struct = {0}; + /* enable tmr 2 clock */ crm_periph_clock_enable(CRM_TMR2_PERIPH_CLOCK, TRUE); - /* config the period value and divider value */ - tmr_base_init(TMR2, 65535, 5860); + /* get system clock */ + crm_clocks_freq_get(&crm_clocks_freq_struct); + + /* (systemclock/(systemclock/10000))/10000 = 1Hz(1s) */ + tmr_base_init(TMR2, 9999, (crm_clocks_freq_struct.sclk_freq/10000 - 1)); /* config the counting direction */ tmr_cnt_dir_set(TMR2, TMR_COUNT_UP); diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/readme.txt b/project/at_start_f403a/examples/pwc/sleep_usart1/readme.txt index 2bb48beb..9cb531b6 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/readme.txt +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_int.c b/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_int.c index bfac80f2..de7ab982 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/sleep_usart1/src/main.c b/project/at_start_f403a/examples/pwc/sleep_usart1/src/main.c index 3649ea19..3caf0ec5 100644 --- a/project/at_start_f403a/examples/pwc/sleep_usart1/src/main.c +++ b/project/at_start_f403a/examples/pwc/sleep_usart1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/pwc/standby_rtc/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/readme.txt b/project/at_start_f403a/examples/pwc/standby_rtc/readme.txt index 31521fa3..c2a87f94 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/readme.txt +++ b/project/at_start_f403a/examples/pwc/standby_rtc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_int.c b/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_int.c index 4c05c64e..0a3905a8 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/pwc/standby_rtc/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_rtc/src/main.c b/project/at_start_f403a/examples/pwc/standby_rtc/src/main.c index 611161a9..4d0bbdaa 100644 --- a/project/at_start_f403a/examples/pwc/standby_rtc/src/main.c +++ b/project/at_start_f403a/examples/pwc/standby_rtc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/readme.txt b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/readme.txt index a8158a1a..1249d0db 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/readme.txt +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_int.c b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_int.c index eccae903..667e2d47 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/main.c b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/main.c index 1921acbe..b3cf82ac 100644 --- a/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/main.c +++ b/project/at_start_f403a/examples/pwc/standby_wakeup_pin/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/rtc/calendar/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/inc/rtc.h b/project/at_start_f403a/examples/rtc/calendar/inc/rtc.h index b5a76f29..e26ed2ed 100644 --- a/project/at_start_f403a/examples/rtc/calendar/inc/rtc.h +++ b/project/at_start_f403a/examples/rtc/calendar/inc/rtc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file rtc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file provides template for calendar api. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/readme.txt b/project/at_start_f403a/examples/rtc/calendar/readme.txt index ed5ee92a..68570eb0 100644 --- a/project/at_start_f403a/examples/rtc/calendar/readme.txt +++ b/project/at_start_f403a/examples/rtc/calendar/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_int.c b/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_int.c index 03406755..41f1aca5 100644 --- a/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/rtc/calendar/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/src/main.c b/project/at_start_f403a/examples/rtc/calendar/src/main.c index da61e0a2..5b0df1ec 100644 --- a/project/at_start_f403a/examples/rtc/calendar/src/main.c +++ b/project/at_start_f403a/examples/rtc/calendar/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/calendar/src/rtc.c b/project/at_start_f403a/examples/rtc/calendar/src/rtc.c index 76475cb5..e7f224c9 100644 --- a/project/at_start_f403a/examples/rtc/calendar/src/rtc.c +++ b/project/at_start_f403a/examples/rtc/calendar/src/rtc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file rtc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file provides template for calendar api. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/rtc/lick_calibration/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/readme.txt b/project/at_start_f403a/examples/rtc/lick_calibration/readme.txt index 84e84f49..c85e5efe 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/readme.txt +++ b/project/at_start_f403a/examples/rtc/lick_calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_int.c b/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_int.c index 455b69f8..1719f2f0 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/rtc/lick_calibration/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/rtc/lick_calibration/src/main.c b/project/at_start_f403a/examples/rtc/lick_calibration/src/main.c index c0ca38ee..d0c16c6b 100644 --- a/project/at_start_f403a/examples/rtc/lick_calibration/src/main.c +++ b/project/at_start_f403a/examples/rtc/lick_calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32_sdio.h b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32_sdio.h index a892135f..ff5b4054 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32_sdio.h +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file contains all the functions prototypes for the sd/mmc * card at32_sdio driver firmware library. ************************************************************************** diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/readme.txt b/project/at_start_f403a/examples/sdio/sd_mmc_card/readme.txt index 502b3020..aebc5f00 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/readme.txt +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32_sdio.c b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32_sdio.c index 2714f0ee..e1ec7321 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32_sdio.c +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file provides a set of functions needed to manage the * sdio/mmc card memory. ************************************************************************** diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_int.c b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_int.c index 72036953..9d9926f1 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/main.c b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/main.c index 36203ea6..13c388c8 100644 --- a/project/at_start_f403a/examples/sdio/sd_mmc_card/src/main.c +++ b/project/at_start_f403a/examples/sdio/sd_mmc_card/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32_sdio.h b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32_sdio.h index 06cd7271..83636fed 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32_sdio.h +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file contains all the functions prototypes for the sd/mmc * card at32_sdio driver firmware library. ************************************************************************** diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/readme.txt b/project/at_start_f403a/examples/sdio/sdio_fatfs/readme.txt index 1d18cd4c..ccf673d3 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/readme.txt +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32_sdio.c b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32_sdio.c index 9c33f950..7f799476 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32_sdio.c +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file provides a set of functions needed to manage the * sdio/mmc card memory. ************************************************************************** diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_int.c b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_int.c index c7059349..637a5f89 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/main.c b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/main.c index 12d31199..1d59812f 100644 --- a/project/at_start_f403a/examples/sdio/sdio_fatfs/src/main.c +++ b/project/at_start_f403a/examples/sdio/sdio_fatfs/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/readme.txt b/project/at_start_f403a/examples/spi/crc_transfer_polling/readme.txt index 307570e5..a8fe70da 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/readme.txt +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_int.c index 14eb9a95..afb5a22d 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/crc_transfer_polling/src/main.c b/project/at_start_f403a/examples/spi/crc_transfer_polling/src/main.c index 727f6eb4..c802731c 100644 --- a/project/at_start_f403a/examples/spi/crc_transfer_polling/src/main.c +++ b/project/at_start_f403a/examples/spi/crc_transfer_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,6 +26,7 @@ #include "at32f403a_407_board.h" #include "at32f403a_407_clock.h" +#include /** @addtogroup AT32F403A_periph_examples * @{ @@ -175,8 +176,9 @@ int main(void) /* transfer procedure:the "BUFFER_SIZE-1" data transfer */ while(tx_index < BUFFER_SIZE - 1) { - while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); + while(spi_i2s_flag_get(SPI2, SPI_I2S_TDBE_FLAG) == RESET); spi_i2s_data_transmit(SPI2, spi2_tx_buffer[tx_index]); + while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); spi_i2s_data_transmit(SPI1, spi1_tx_buffer[tx_index++]); while(spi_i2s_flag_get(SPI2, SPI_I2S_RDBF_FLAG) == RESET); spi2_rx_buffer[rx_index] = spi_i2s_data_receive(SPI2); diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/readme.txt b/project/at_start_f403a/examples/spi/fullduplex_polling/readme.txt index c075756b..0a97b0f2 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/readme.txt +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_int.c index d00ec346..3ee8f963 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/fullduplex_polling/src/main.c b/project/at_start_f403a/examples/spi/fullduplex_polling/src/main.c index 883ca7f8..cbabe87d 100644 --- a/project/at_start_f403a/examples/spi/fullduplex_polling/src/main.c +++ b/project/at_start_f403a/examples/spi/fullduplex_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,6 +26,7 @@ #include "at32f403a_407_board.h" #include "at32f403a_407_clock.h" +#include /** @addtogroup AT32F403A_periph_examples * @{ @@ -211,8 +212,9 @@ int main(void) /* transfer procedure:the "BUFFER_SIZE" data transfer */ while(tx_index < BUFFER_SIZE) { - while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); + while(spi_i2s_flag_get(SPI2, SPI_I2S_TDBE_FLAG) == RESET); spi_i2s_data_transmit(SPI2, spi2_tx_buffer[tx_index]); + while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); spi_i2s_data_transmit(SPI1, spi1_tx_buffer[tx_index++]); while(spi_i2s_flag_get(SPI2, SPI_I2S_RDBF_FLAG) == RESET); spi2_rx_buffer[rx_index] = spi_i2s_data_receive(SPI2); @@ -247,8 +249,9 @@ int main(void) /* transfer procedure:the "BUFFER_SIZE" data transfer */ while(tx_index < BUFFER_SIZE) { - while(spi_i2s_flag_get(SPI2, SPI_I2S_TDBE_FLAG) == RESET); + while(spi_i2s_flag_get(SPI1, SPI_I2S_TDBE_FLAG) == RESET); spi_i2s_data_transmit(SPI1, spi1_tx_buffer[tx_index]); + while(spi_i2s_flag_get(SPI2, SPI_I2S_TDBE_FLAG) == RESET); spi_i2s_data_transmit(SPI2, spi2_tx_buffer[tx_index++]); while(spi_i2s_flag_get(SPI1, SPI_I2S_RDBF_FLAG) == RESET); spi1_rx_buffer[rx_index] = spi_i2s_data_receive(SPI1); diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/readme.txt b/project/at_start_f403a/examples/spi/halfduplex_interrupt/readme.txt index d057d1f0..1a4a2a83 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/readme.txt +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_int.c index b37e516b..9f9b7537 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/main.c b/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/main.c index 949eb002..feb788f6 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/main.c +++ b/project/at_start_f403a/examples/spi/halfduplex_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/readme.txt b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/readme.txt index 0c0f4ed9..5cea30e7 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/readme.txt +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_int.c index 7054a88a..98ae6b5c 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/main.c b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/main.c index d72af4f8..011af517 100644 --- a/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/main.c +++ b/project/at_start_f403a/examples/spi/halfduplex_transceiver_switch/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/readme.txt b/project/at_start_f403a/examples/spi/only_receive_mode_polling/readme.txt index 1cbfb1b6..1fe63876 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/readme.txt +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_int.c index 233970f3..a4420ae6 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/main.c b/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/main.c index a2541af6..811968b7 100644 --- a/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/main.c +++ b/project/at_start_f403a/examples/spi/only_receive_mode_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt index 8430342d..f3a7e47b 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_int.c index ecb60127..e5c14435 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c index b644dc2c..e91b6520 100644 --- a/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c +++ b/project/at_start_f403a/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/spi/w25q_flash/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/inc/spi_flash.h b/project/at_start_f403a/examples/spi/w25q_flash/inc/spi_flash.h index 9b87d093..cd01ab7e 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/inc/spi_flash.h +++ b/project/at_start_f403a/examples/spi/w25q_flash/inc/spi_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file spi_flash.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of spi_flash ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/readme.txt b/project/at_start_f403a/examples/spi/w25q_flash/readme.txt index a3ec24b2..116d59df 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/readme.txt +++ b/project/at_start_f403a/examples/spi/w25q_flash/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_int.c b/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_int.c index 4a9c0c83..96b98ad7 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/spi/w25q_flash/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/src/main.c b/project/at_start_f403a/examples/spi/w25q_flash/src/main.c index 50d74f5d..561de22a 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/src/main.c +++ b/project/at_start_f403a/examples/spi/w25q_flash/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/spi/w25q_flash/src/spi_flash.c b/project/at_start_f403a/examples/spi/w25q_flash/src/spi_flash.c index 27ecc3e5..b95f13f0 100644 --- a/project/at_start_f403a/examples/spi/w25q_flash/src/spi_flash.c +++ b/project/at_start_f403a/examples/spi/w25q_flash/src/spi_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file spi_flash.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief spi_flash source code ************************************************************************** * Copyright notice & Disclaimer @@ -62,13 +62,13 @@ void spiflash_init(void) gpio_initstructure.gpio_pins = GPIO_PINS_5; gpio_init(GPIOA, &gpio_initstructure); - /* mosi */ + /* miso */ gpio_initstructure.gpio_pull = GPIO_PULL_UP; gpio_initstructure.gpio_mode = GPIO_MODE_INPUT; gpio_initstructure.gpio_pins = GPIO_PINS_6; gpio_init(GPIOA, &gpio_initstructure); - /* miso */ + /* mosi */ gpio_initstructure.gpio_pull = GPIO_PULL_UP; gpio_initstructure.gpio_mode = GPIO_MODE_MUX; gpio_initstructure.gpio_pins = GPIO_PINS_7; @@ -323,7 +323,7 @@ void spi_bytes_write(uint8_t *pbuffer, uint32_t length) dma_init_struct.buffer_size = length; dma_init_struct.direction = DMA_DIR_MEMORY_TO_PERIPHERAL; - dma_init_struct.memory_base_addr = (uint32_t)&pbuffer; + dma_init_struct.memory_base_addr = (uint32_t)pbuffer; dma_init_struct.memory_data_width = DMA_MEMORY_DATA_WIDTH_BYTE; dma_init_struct.memory_inc_enable = TRUE; dma_init_struct.peripheral_base_addr = (uint32_t)(&SPI1->dt); diff --git a/project/at_start_f403a/examples/sram/extend_sram/iar_v8.2/startup_at32f403a_407_ext_ram.s b/project/at_start_f403a/examples/sram/extend_sram/iar_v8.2/startup_at32f403a_407_ext_ram.s index 00993bbd..eba4bfce 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/iar_v8.2/startup_at32f403a_407_ext_ram.s +++ b/project/at_start_f403a/examples/sram/extend_sram/iar_v8.2/startup_at32f403a_407_ext_ram.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.6 -;* @date 2021-12-31 +;* @version v2.0.7 +;* @date 2022-02-11 ;* @brief at32f403a_407 startup file for IAR Systems ;************************************************************************** diff --git a/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/sram/extend_sram/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sram/extend_sram/mdk_v5/startup_at32f403a_407_ext_ram.s b/project/at_start_f403a/examples/sram/extend_sram/mdk_v5/startup_at32f403a_407_ext_ram.s index 3b953332..39f20d47 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/mdk_v5/startup_at32f403a_407_ext_ram.s +++ b/project/at_start_f403a/examples/sram/extend_sram/mdk_v5/startup_at32f403a_407_ext_ram.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.6 -;* @date 2021-12-31 +;* @version v2.0.7 +;* @date 2022-02-11 ;* @brief at32f403a_407 startup file for keil ;************************************************************************** ; diff --git a/project/at_start_f403a/examples/sram/extend_sram/readme.txt b/project/at_start_f403a/examples/sram/extend_sram/readme.txt index ffd4a39b..d54eae3e 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/readme.txt +++ b/project/at_start_f403a/examples/sram/extend_sram/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_int.c b/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_int.c index 42e6b406..18bfc6ce 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/sram/extend_sram/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/sram/extend_sram/src/main.c b/project/at_start_f403a/examples/sram/extend_sram/src/main.c index 9c97e251..cb595696 100644 --- a/project/at_start_f403a/examples/sram/extend_sram/src/main.c +++ b/project/at_start_f403a/examples/sram/extend_sram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/6_steps/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/6_steps/readme.txt b/project/at_start_f403a/examples/tmr/6_steps/readme.txt index fc332832..3ab91970 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/readme.txt +++ b/project/at_start_f403a/examples/tmr/6_steps/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_int.c index 5c079c34..a12e06bd 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/6_steps/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/6_steps/src/main.c b/project/at_start_f403a/examples/tmr/6_steps/src/main.c index c108cd50..3b4eae5e 100644 --- a/project/at_start_f403a/examples/tmr/6_steps/src/main.c +++ b/project/at_start_f403a/examples/tmr/6_steps/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/readme.txt b/project/at_start_f403a/examples/tmr/7_pwm_output/readme.txt index dd241466..204f2056 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/readme.txt +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_int.c index b4a164a3..9273559a 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/7_pwm_output/src/main.c b/project/at_start_f403a/examples/tmr/7_pwm_output/src/main.c index 3cf076f2..552e41f2 100644 --- a/project/at_start_f403a/examples/tmr/7_pwm_output/src/main.c +++ b/project/at_start_f403a/examples/tmr/7_pwm_output/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/readme.txt b/project/at_start_f403a/examples/tmr/cascade_synchro/readme.txt index 008c4f8d..d2708607 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/readme.txt +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_int.c index 0bb83dfa..56e9ebc6 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/cascade_synchro/src/main.c b/project/at_start_f403a/examples/tmr/cascade_synchro/src/main.c index b6fc51e8..3790e64b 100644 --- a/project/at_start_f403a/examples/tmr/cascade_synchro/src/main.c +++ b/project/at_start_f403a/examples/tmr/cascade_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/complementary_signals/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/readme.txt b/project/at_start_f403a/examples/tmr/complementary_signals/readme.txt index beb529f2..9112121c 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/readme.txt +++ b/project/at_start_f403a/examples/tmr/complementary_signals/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_int.c index 8588205e..aaa32914 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/complementary_signals/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/complementary_signals/src/main.c b/project/at_start_f403a/examples/tmr/complementary_signals/src/main.c index e9784281..ceccbc3b 100644 --- a/project/at_start_f403a/examples/tmr/complementary_signals/src/main.c +++ b/project/at_start_f403a/examples/tmr/complementary_signals/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/dma/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma/readme.txt b/project/at_start_f403a/examples/tmr/dma/readme.txt index 470da8af..0a392f6c 100644 --- a/project/at_start_f403a/examples/tmr/dma/readme.txt +++ b/project/at_start_f403a/examples/tmr/dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_int.c index 8fe28831..9fabbfb8 100644 --- a/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/dma/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma/src/main.c b/project/at_start_f403a/examples/tmr/dma/src/main.c index fa2a605c..3ff7e7cc 100644 --- a/project/at_start_f403a/examples/tmr/dma/src/main.c +++ b/project/at_start_f403a/examples/tmr/dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/dma_burst/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma_burst/readme.txt b/project/at_start_f403a/examples/tmr/dma_burst/readme.txt index bc0f142a..c1bf552a 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/readme.txt +++ b/project/at_start_f403a/examples/tmr/dma_burst/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_int.c index 2e92d56d..f6cd1e73 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/dma_burst/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/dma_burst/src/main.c b/project/at_start_f403a/examples/tmr/dma_burst/src/main.c index c56db821..23fc9b9c 100644 --- a/project/at_start_f403a/examples/tmr/dma_burst/src/main.c +++ b/project/at_start_f403a/examples/tmr/dma_burst/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/readme.txt b/project/at_start_f403a/examples/tmr/encoder_tmr2/readme.txt index 159f6792..3a45d60c 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/readme.txt +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_int.c index 758c8a33..7268234b 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/encoder_tmr2/src/main.c b/project/at_start_f403a/examples/tmr/encoder_tmr2/src/main.c index cea45a49..8bd1570d 100644 --- a/project/at_start_f403a/examples/tmr/encoder_tmr2/src/main.c +++ b/project/at_start_f403a/examples/tmr/encoder_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/external_clock/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/external_clock/readme.txt b/project/at_start_f403a/examples/tmr/external_clock/readme.txt index a30ab318..161f2888 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/readme.txt +++ b/project/at_start_f403a/examples/tmr/external_clock/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_int.c index d1100d8c..320dbed5 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/external_clock/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/external_clock/src/main.c b/project/at_start_f403a/examples/tmr/external_clock/src/main.c index 0d5e1bfc..1dc5e0d9 100644 --- a/project/at_start_f403a/examples/tmr/external_clock/src/main.c +++ b/project/at_start_f403a/examples/tmr/external_clock/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/readme.txt b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/readme.txt index 1b868cf6..dc3227d9 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/readme.txt +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_int.c index 51e726a9..d042cae5 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/main.c b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/main.c index dd6aed23..e62cc653 100644 --- a/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/main.c +++ b/project/at_start_f403a/examples/tmr/hall_xor_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/hang_mode/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hang_mode/readme.txt b/project/at_start_f403a/examples/tmr/hang_mode/readme.txt index 084f55e7..6ec76eb9 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/readme.txt +++ b/project/at_start_f403a/examples/tmr/hang_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_int.c index 2c0d785f..9fb80a76 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/hang_mode/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/hang_mode/src/main.c b/project/at_start_f403a/examples/tmr/hang_mode/src/main.c index b490ae0e..68cf5271 100644 --- a/project/at_start_f403a/examples/tmr/hang_mode/src/main.c +++ b/project/at_start_f403a/examples/tmr/hang_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/input_capture/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/input_capture/readme.txt b/project/at_start_f403a/examples/tmr/input_capture/readme.txt index 591118b7..5813bc85 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/readme.txt +++ b/project/at_start_f403a/examples/tmr/input_capture/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_int.c index 7dd6e104..081edb7f 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/input_capture/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/input_capture/src/main.c b/project/at_start_f403a/examples/tmr/input_capture/src/main.c index cc7749af..1db4ee11 100644 --- a/project/at_start_f403a/examples/tmr/input_capture/src/main.c +++ b/project/at_start_f403a/examples/tmr/input_capture/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/oc_high/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_high/readme.txt b/project/at_start_f403a/examples/tmr/oc_high/readme.txt index 557539cc..a5bc333e 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/readme.txt +++ b/project/at_start_f403a/examples/tmr/oc_high/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_int.c index cf2fb06c..77d5053a 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/oc_high/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_high/src/main.c b/project/at_start_f403a/examples/tmr/oc_high/src/main.c index b1631ea6..f2bfe312 100644 --- a/project/at_start_f403a/examples/tmr/oc_high/src/main.c +++ b/project/at_start_f403a/examples/tmr/oc_high/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/oc_low/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_low/readme.txt b/project/at_start_f403a/examples/tmr/oc_low/readme.txt index bbf40207..428be9b2 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/readme.txt +++ b/project/at_start_f403a/examples/tmr/oc_low/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_int.c index 68817732..23b0fe6b 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/oc_low/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_low/src/main.c b/project/at_start_f403a/examples/tmr/oc_low/src/main.c index bca7416d..a0fc4532 100644 --- a/project/at_start_f403a/examples/tmr/oc_low/src/main.c +++ b/project/at_start_f403a/examples/tmr/oc_low/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/readme.txt b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/readme.txt index 758972a1..d09e0e83 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/readme.txt +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_int.c index 8991bd9e..60d5c9fa 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/main.c b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/main.c index 87d29db8..ec51e0bf 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/main.c +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/readme.txt b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/readme.txt index ab3fd358..4bc1c5fe 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/readme.txt +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_int.c index 878b0d86..163723e5 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/main.c b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/main.c index 0242b372..8c0a12f6 100644 --- a/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/main.c +++ b/project/at_start_f403a/examples/tmr/oc_toggle_tmr9/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/one_cycle/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/one_cycle/readme.txt b/project/at_start_f403a/examples/tmr/one_cycle/readme.txt index 29b80526..45041cd9 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/readme.txt +++ b/project/at_start_f403a/examples/tmr/one_cycle/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_int.c index 1af0282b..2e48d579 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/one_cycle/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/one_cycle/src/main.c b/project/at_start_f403a/examples/tmr/one_cycle/src/main.c index c214471d..c0d8e435 100644 --- a/project/at_start_f403a/examples/tmr/one_cycle/src/main.c +++ b/project/at_start_f403a/examples/tmr/one_cycle/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/readme.txt b/project/at_start_f403a/examples/tmr/parallel_synchro/readme.txt index c26272d4..fd3a7628 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/readme.txt +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_int.c index 94bf889f..ec9c9dea 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/parallel_synchro/src/main.c b/project/at_start_f403a/examples/tmr/parallel_synchro/src/main.c index cb3dffc7..9f0b3459 100644 --- a/project/at_start_f403a/examples/tmr/parallel_synchro/src/main.c +++ b/project/at_start_f403a/examples/tmr/parallel_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/pwm_input/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input/readme.txt b/project/at_start_f403a/examples/tmr/pwm_input/readme.txt index f9b2f77e..ddfa5453 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/readme.txt +++ b/project/at_start_f403a/examples/tmr/pwm_input/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_int.c index 8c0b8079..952c6d76 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/pwm_input/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input/src/main.c b/project/at_start_f403a/examples/tmr/pwm_input/src/main.c index 597cc0cf..20fdb4df 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input/src/main.c +++ b/project/at_start_f403a/examples/tmr/pwm_input/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/readme.txt b/project/at_start_f403a/examples/tmr/pwm_input_dma/readme.txt index 1d4cf383..29954543 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/readme.txt +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_int.c index 1893a979..a67627d7 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_input_dma/src/main.c b/project/at_start_f403a/examples/tmr/pwm_input_dma/src/main.c index 0c71cd5c..6dea6905 100644 --- a/project/at_start_f403a/examples/tmr/pwm_input_dma/src/main.c +++ b/project/at_start_f403a/examples/tmr/pwm_input_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/readme.txt b/project/at_start_f403a/examples/tmr/pwm_output_simulate/readme.txt index ee0b9187..c2139341 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/readme.txt +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_int.c index de6c9cd4..8369f354 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/main.c b/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/main.c index 3d34e621..11687b62 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/main.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_simulate/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/readme.txt b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/readme.txt index ad6ca402..67f91439 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/readme.txt +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_int.c index 82590296..ca31b8eb 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/main.c b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/main.c index 19c942c4..2c05a2f6 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/main.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr10/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/readme.txt b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/readme.txt index f60f4edd..08fc4dbf 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/readme.txt +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_int.c index 4acd5a07..234dcb47 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/main.c b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/main.c index 57d9c582..a8e25df9 100644 --- a/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/main.c +++ b/project/at_start_f403a/examples/tmr/pwm_output_tmr3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/timer_base/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/timer_base/readme.txt b/project/at_start_f403a/examples/tmr/timer_base/readme.txt index 61b25aa7..378c6eb7 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/readme.txt +++ b/project/at_start_f403a/examples/tmr/timer_base/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_int.c index 95faf5c6..da36d5fa 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/timer_base/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/timer_base/src/main.c b/project/at_start_f403a/examples/tmr/timer_base/src/main.c index 93bd8d95..cae9a99f 100644 --- a/project/at_start_f403a/examples/tmr/timer_base/src/main.c +++ b/project/at_start_f403a/examples/tmr/timer_base/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/readme.txt b/project/at_start_f403a/examples/tmr/tmr1_synchro/readme.txt index 00c3a047..f6d1288a 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/readme.txt +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_int.c index 8ddd17d5..ccba8b0c 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr1_synchro/src/main.c b/project/at_start_f403a/examples/tmr/tmr1_synchro/src/main.c index f952b9ea..5ff9e048 100644 --- a/project/at_start_f403a/examples/tmr/tmr1_synchro/src/main.c +++ b/project/at_start_f403a/examples/tmr/tmr1_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/readme.txt b/project/at_start_f403a/examples/tmr/tmr2_32bit/readme.txt index d0106e96..9c406fa7 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/readme.txt +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_int.c b/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_int.c index 382a47a8..f23e87cf 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/tmr/tmr2_32bit/src/main.c b/project/at_start_f403a/examples/tmr/tmr2_32bit/src/main.c index 5d2732bf..d1961b7c 100644 --- a/project/at_start_f403a/examples/tmr/tmr2_32bit/src/main.c +++ b/project/at_start_f403a/examples/tmr/tmr2_32bit/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/half_duplex/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/half_duplex/readme.txt b/project/at_start_f403a/examples/usart/half_duplex/readme.txt index d9187d48..6c582b7b 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/readme.txt +++ b/project/at_start_f403a/examples/usart/half_duplex/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_int.c index db06007b..501ff179 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/half_duplex/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/half_duplex/src/main.c b/project/at_start_f403a/examples/usart/half_duplex/src/main.c index 605d56e5..e7aa2bcc 100644 --- a/project/at_start_f403a/examples/usart/half_duplex/src/main.c +++ b/project/at_start_f403a/examples/usart/half_duplex/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/hw_flow_control/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/readme.txt b/project/at_start_f403a/examples/usart/hw_flow_control/readme.txt index b06d2ea8..abcbc75f 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/readme.txt +++ b/project/at_start_f403a/examples/usart/hw_flow_control/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_int.c index 25d70d1d..3127fed6 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/hw_flow_control/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/hw_flow_control/src/main.c b/project/at_start_f403a/examples/usart/hw_flow_control/src/main.c index 182b5f51..586d5e97 100644 --- a/project/at_start_f403a/examples/usart/hw_flow_control/src/main.c +++ b/project/at_start_f403a/examples/usart/hw_flow_control/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/idle_detection/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/idle_detection/readme.txt b/project/at_start_f403a/examples/usart/idle_detection/readme.txt index 4a32a65c..c4807018 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/readme.txt +++ b/project/at_start_f403a/examples/usart/idle_detection/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_int.c index ad6c32ee..4669150d 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/idle_detection/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/idle_detection/src/main.c b/project/at_start_f403a/examples/usart/idle_detection/src/main.c index 08612ee6..647e5a20 100644 --- a/project/at_start_f403a/examples/usart/idle_detection/src/main.c +++ b/project/at_start_f403a/examples/usart/idle_detection/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/interrupt/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/interrupt/readme.txt b/project/at_start_f403a/examples/usart/interrupt/readme.txt index 1ad179c2..45ec6f0b 100644 --- a/project/at_start_f403a/examples/usart/interrupt/readme.txt +++ b/project/at_start_f403a/examples/usart/interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_int.c index af948a7c..63751da6 100644 --- a/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/interrupt/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/interrupt/src/main.c b/project/at_start_f403a/examples/usart/interrupt/src/main.c index 65c84f06..1ca8fefa 100644 --- a/project/at_start_f403a/examples/usart/interrupt/src/main.c +++ b/project/at_start_f403a/examples/usart/interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/irda/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/irda/readme.txt b/project/at_start_f403a/examples/usart/irda/readme.txt index 1ed6690d..bb9245ea 100644 --- a/project/at_start_f403a/examples/usart/irda/readme.txt +++ b/project/at_start_f403a/examples/usart/irda/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_int.c index d8701fef..20bd77ce 100644 --- a/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/irda/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/irda/src/main.c b/project/at_start_f403a/examples/usart/irda/src/main.c index 71eae690..1c501341 100644 --- a/project/at_start_f403a/examples/usart/irda/src/main.c +++ b/project/at_start_f403a/examples/usart/irda/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/polling/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/polling/readme.txt b/project/at_start_f403a/examples/usart/polling/readme.txt index 1d0812d3..1e2e21bb 100644 --- a/project/at_start_f403a/examples/usart/polling/readme.txt +++ b/project/at_start_f403a/examples/usart/polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_int.c index a11239ec..81e84c68 100644 --- a/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/polling/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/polling/src/main.c b/project/at_start_f403a/examples/usart/polling/src/main.c index c1c35a4e..0acbb5a3 100644 --- a/project/at_start_f403a/examples/usart/polling/src/main.c +++ b/project/at_start_f403a/examples/usart/polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/printf/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/printf/readme.txt b/project/at_start_f403a/examples/usart/printf/readme.txt index 0d3c5c3d..a64f5d0f 100644 --- a/project/at_start_f403a/examples/usart/printf/readme.txt +++ b/project/at_start_f403a/examples/usart/printf/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_int.c index 508b433a..24aafb54 100644 --- a/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/printf/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/printf/src/main.c b/project/at_start_f403a/examples/usart/printf/src/main.c index 03d7e0f5..6c17c937 100644 --- a/project/at_start_f403a/examples/usart/printf/src/main.c +++ b/project/at_start_f403a/examples/usart/printf/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/receiver_mute/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/receiver_mute/readme.txt b/project/at_start_f403a/examples/usart/receiver_mute/readme.txt index d228bd83..bc5f4b00 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/readme.txt +++ b/project/at_start_f403a/examples/usart/receiver_mute/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_int.c index efd3cf2a..7eda2e1d 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/receiver_mute/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/receiver_mute/src/main.c b/project/at_start_f403a/examples/usart/receiver_mute/src/main.c index f6fe300c..fce4cba1 100644 --- a/project/at_start_f403a/examples/usart/receiver_mute/src/main.c +++ b/project/at_start_f403a/examples/usart/receiver_mute/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/smartcard/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/inc/smartcard_config.h b/project/at_start_f403a/examples/usart/smartcard/inc/smartcard_config.h index 1d73259a..d82ee160 100644 --- a/project/at_start_f403a/examples/usart/smartcard/inc/smartcard_config.h +++ b/project/at_start_f403a/examples/usart/smartcard/inc/smartcard_config.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file smartcard_config.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/readme.txt b/project/at_start_f403a/examples/usart/smartcard/readme.txt index 594243f9..4d4460d7 100644 --- a/project/at_start_f403a/examples/usart/smartcard/readme.txt +++ b/project/at_start_f403a/examples/usart/smartcard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_int.c index c667b345..0692cf20 100644 --- a/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/smartcard/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/smartcard/src/main.c b/project/at_start_f403a/examples/usart/smartcard/src/main.c index 348f4528..b9dc1b9c 100644 --- a/project/at_start_f403a/examples/usart/smartcard/src/main.c +++ b/project/at_start_f403a/examples/usart/smartcard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/synchronous/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/synchronous/readme.txt b/project/at_start_f403a/examples/usart/synchronous/readme.txt index 1b6b37e1..3d45b969 100644 --- a/project/at_start_f403a/examples/usart/synchronous/readme.txt +++ b/project/at_start_f403a/examples/usart/synchronous/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_int.c index b08e29eb..74231d01 100644 --- a/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/synchronous/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/synchronous/src/main.c b/project/at_start_f403a/examples/usart/synchronous/src/main.c index 0ba96c8d..cd89e0db 100644 --- a/project/at_start_f403a/examples/usart/synchronous/src/main.c +++ b/project/at_start_f403a/examples/usart/synchronous/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/readme.txt b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/readme.txt index 13b5d4b9..04510855 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/readme.txt +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_int.c index f6d39ec3..39c39f92 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/main.c b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/main.c index ac2d16ca..fdf25ed4 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/main.c +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/readme.txt b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/readme.txt index 1ffeab1d..b1c741ae 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/readme.txt +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_int.c index 2ff1e48f..d6e2dfd0 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/main.c b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/main.c index 19f8ef15..9da67e50 100644 --- a/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/main.c +++ b/project/at_start_f403a/examples/usart/transfer_by_dma_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/audio/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/inc/audio_codec.h b/project/at_start_f403a/examples/usb_device/audio/inc/audio_codec.h index 2b674712..7292c819 100644 --- a/project/at_start_f403a/examples/usb_device/audio/inc/audio_codec.h +++ b/project/at_start_f403a/examples/usb_device/audio/inc/audio_codec.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/audio/inc/usb_conf.h index ee15b662..7dadbeb7 100644 --- a/project/at_start_f403a/examples/usb_device/audio/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/audio/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/readme.txt b/project/at_start_f403a/examples/usb_device/audio/readme.txt index 2d4b1a43..238ae1fe 100644 --- a/project/at_start_f403a/examples/usb_device/audio/readme.txt +++ b/project/at_start_f403a/examples/usb_device/audio/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_int.c index a2d61677..48f3ac04 100644 --- a/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/audio/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/src/audio_codec.c b/project/at_start_f403a/examples/usb_device/audio/src/audio_codec.c index a6d48ebf..027eda2b 100644 --- a/project/at_start_f403a/examples/usb_device/audio/src/audio_codec.c +++ b/project/at_start_f403a/examples/usb_device/audio/src/audio_codec.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/audio/src/main.c b/project/at_start_f403a/examples/usb_device/audio/src/main.c index 72081875..6f2e577c 100644 --- a/project/at_start_f403a/examples/usb_device/audio/src/main.c +++ b/project/at_start_f403a/examples/usb_device/audio/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/audio_codec.h b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/audio_codec.h index 7873a4f4..9026feda 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/audio_codec.h +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/audio_codec.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/usb_conf.h index 96681e12..27370712 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/readme.txt b/project/at_start_f403a/examples/usb_device/composite_audio_hid/readme.txt index 550a3899..8df81cd8 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/readme.txt +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_int.c index 4c92d830..f97c51ad 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/audio_codec.c b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/audio_codec.c index 51d1008f..d3b74153 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/audio_codec.c +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/audio_codec.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/main.c b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/main.c index cccab517..0eca3285 100644 --- a/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/main.c +++ b/project/at_start_f403a/examples/usb_device/composite_audio_hid/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -43,7 +43,7 @@ /* usb global struct define */ usbd_core_type usb_core_dev; -uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; +uint8_t report_buf[USBD_AUHID_IN_MAXPACKET_SIZE]; /** * @brief usb 48M clock select @@ -154,7 +154,7 @@ int main(void) { report_buf[0] = HID_REPORT_ID_5; report_buf[1] = (~report_buf[1]) & 0x1; - class_send_report(&usb_core_dev, report_buf, USBD_IN_MAXPACKET_SIZE); + audio_hid_class_send_report(&usb_core_dev, report_buf, USBD_AUHID_IN_MAXPACKET_SIZE); } delay_ms(100); } diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h index e493f041..89fc4f23 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/readme.txt b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/readme.txt index 50a3ac64..27d12cc4 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/readme.txt +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_int.c index 298a808d..45394470 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/main.c b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/main.c index 369d10b2..6b76e005 100644 --- a/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/main.c +++ b/project/at_start_f403a/examples/usb_device/composite_vcp_keyboard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -41,8 +41,7 @@ usbd_core_type usb_core_dev; uint8_t usb_buffer[256]; - -void keyboard_send_string(uint8_t *string, uint8_t len); +void keyboard_send_string(void *udev, uint8_t *string, uint8_t len); /** * @brief usb 48M clock select @@ -118,27 +117,29 @@ void usb_clock48m_select(usb_clk48_s clk_s) * @param len: send string length * @retval none */ -void keyboard_send_string(uint8_t *string, uint8_t len) +void keyboard_send_string(void *udev, uint8_t *string, uint8_t len) { - __IO uint8_t index = 0; + uint8_t index = 0; + usbd_core_type *pudev = (usbd_core_type *)udev; + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; for(index = 0; index < len; index ++) { while(1) { - if(g_keyboard_tx_completed == 1) + if(vcpkybrd->g_keyboard_tx_completed == 1) { - g_keyboard_tx_completed = 0; - usb_hid_keyboard_send_char(&usb_core_dev, string[index]); + vcpkybrd->g_keyboard_tx_completed = 0; + usb_vcpkybrd_keyboard_send_char(&usb_core_dev, string[index]); break; } } /* send 0x00 */ while(1) { - if(g_keyboard_tx_completed == 1) + if(vcpkybrd->g_keyboard_tx_completed == 1) { - g_keyboard_tx_completed = 0; - usb_hid_keyboard_send_char(&usb_core_dev, 0x00); + vcpkybrd->g_keyboard_tx_completed = 0; + usb_vcpkybrd_keyboard_send_char(&usb_core_dev, 0x00); break; } } @@ -184,7 +185,7 @@ int main(void) while(1) { /* get usb vcp receive data */ - data_len = usb_vcp_get_rxdata(&usb_core_dev, usb_buffer); + data_len = usb_vcpkybrd_vcp_get_rxdata(&usb_core_dev, usb_buffer); if(data_len > 0 || send_zero_packet == 1) { @@ -198,11 +199,11 @@ int main(void) if(data_len == 0) send_zero_packet = 0; - timeout = 50000; + timeout = 5000000; do { /* send data to host */ - if(usb_vcp_send_data(&usb_core_dev, usb_buffer, data_len) == SUCCESS) + if(usb_vcpkybrd_vcp_send_data(&usb_core_dev, usb_buffer, data_len) == SUCCESS) { break; } @@ -211,7 +212,7 @@ int main(void) if(at32_button_press() == USER_BUTTON) { - keyboard_send_string((uint8_t *)" Keyboard Demo\r\n", 16); + keyboard_send_string(&usb_core_dev, (uint8_t *)" Keyboard Demo\r\n", 16); } } } diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/custom_hid/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/custom_hid/inc/usb_conf.h index 80e3c372..6021045b 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/custom_hid/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/readme.txt b/project/at_start_f403a/examples/usb_device/custom_hid/readme.txt index 437d978f..091b65a4 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/readme.txt +++ b/project/at_start_f403a/examples/usb_device/custom_hid/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_int.c index 0b30ec36..188d9c41 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/custom_hid/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/custom_hid/src/main.c b/project/at_start_f403a/examples/usb_device/custom_hid/src/main.c index 7a03f242..e308cbc9 100644 --- a/project/at_start_f403a/examples/usb_device/custom_hid/src/main.c +++ b/project/at_start_f403a/examples/usb_device/custom_hid/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -40,7 +40,7 @@ */ usbd_core_type usb_core_dev; -uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; +uint8_t report_buf[USBD_CUSTOM_IN_MAXPACKET_SIZE]; /** * @brief usb 48M clock select @@ -134,7 +134,7 @@ int main(void) nvic_irq_enable(USBFS_L_CAN1_RX0_IRQn, 0, 0); /* usb core init */ - usbd_core_init(&usb_core_dev, USB, &custom_hid_class_handler, &hid_desc_handler, 0); + usbd_core_init(&usb_core_dev, USB, &custom_hid_class_handler, &custom_hid_desc_handler, 0); /* enable usb pull-up */ usbd_connect(&usb_core_dev); @@ -145,7 +145,7 @@ int main(void) { report_buf[1] = (~report_buf[1]) & 0x1; report_buf[0] = HID_REPORT_ID_5; - class_send_report(&usb_core_dev, report_buf, USBD_IN_MAXPACKET_SIZE); + custom_hid_class_send_report(&usb_core_dev, report_buf, USBD_CUSTOM_IN_MAXPACKET_SIZE); } } diff --git a/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/keyboard/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/keyboard/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/keyboard/inc/usb_conf.h index 5643007a..b22707ff 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/keyboard/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/keyboard/readme.txt b/project/at_start_f403a/examples/usb_device/keyboard/readme.txt index 6f888966..a40972e4 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/readme.txt +++ b/project/at_start_f403a/examples/usb_device/keyboard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_int.c index 6ef0defe..d22e1f1a 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/keyboard/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/keyboard/src/main.c b/project/at_start_f403a/examples/usb_device/keyboard/src/main.c index 5d712d5e..68f4c3fb 100644 --- a/project/at_start_f403a/examples/usb_device/keyboard/src/main.c +++ b/project/at_start_f403a/examples/usb_device/keyboard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -41,7 +41,7 @@ usbd_core_type usb_core_dev; extern __IO uint8_t hid_suspend_flag; -void keyboard_send_string(uint8_t *string, uint8_t len); +void keyboard_send_string(void *udev, uint8_t *string, uint8_t len); void system_clock_recover(void); void button_exint_init(void); void usb_low_power_wakeup_config(void); @@ -52,26 +52,29 @@ void usb_low_power_wakeup_config(void); * @param len: send string length * @retval none */ -void keyboard_send_string(uint8_t *string, uint8_t len) +void keyboard_send_string(void *udev, uint8_t *string, uint8_t len) { - __IO uint8_t index = 0; + uint8_t index = 0; + usbd_core_type *pudev = (usbd_core_type *)udev; + keyboard_type *pkeyboard = (keyboard_type *)pudev->class_handler->pdata; for(index = 0; index < len; index ++) { while(1) { - if(g_u8tx_completed == 1) + if(pkeyboard->g_u8tx_completed == 1) { - g_u8tx_completed = 0; - usb_hid_keyboard_send_char(&usb_core_dev, string[index]); + pkeyboard->g_u8tx_completed = 0; + usb_hid_keyboard_send_char(udev, string[index]); break; } } + /* send 0x00 */ while(1) { - if(g_u8tx_completed == 1) + if(pkeyboard->g_u8tx_completed == 1) { - g_u8tx_completed = 0; - usb_hid_keyboard_send_char(&usb_core_dev, 0x00); + pkeyboard->g_u8tx_completed = 0; + usb_hid_keyboard_send_char(udev, 0x00); break; } } @@ -188,7 +191,7 @@ int main(void) { if(usbd_connect_state_get(&usb_core_dev) == USB_CONN_STATE_CONFIGURED) { - keyboard_send_string((uint8_t *)" KKKeyboard Demo\r\n", 16); + keyboard_send_string(&usb_core_dev, (uint8_t *)" Keyboard Demo\r\n", 16); } /* remote wakeup */ if(usbd_connect_state_get(&usb_core_dev) == USB_CONN_STATE_SUSPENDED @@ -199,7 +202,7 @@ int main(void) } #ifdef USB_LOW_POWER_WAKUP /* enter deep sleep */ - if(hid_suspend_flag == 1) + if(((keyboard_type *)(usb_core_dev.class_handler->pdata))->hid_suspend_flag == 1) { at32_led_off(LED2); at32_led_off(LED3); @@ -212,7 +215,7 @@ int main(void) /* wait clock stable */ system_clock_recover(); - hid_suspend_flag = 0; + ((keyboard_type *)(usb_core_dev.class_handler->pdata))->hid_suspend_flag = 0; at32_led_on(LED2); at32_led_on(LED3); at32_led_on(LED4); diff --git a/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/mouse/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/mouse/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/mouse/inc/usb_conf.h index 559b2300..dce8d823 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/mouse/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/mouse/readme.txt b/project/at_start_f403a/examples/usb_device/mouse/readme.txt index b662f13a..0608eec2 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/readme.txt +++ b/project/at_start_f403a/examples/usb_device/mouse/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_int.c index 7f1fdace..a1531159 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/mouse/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/mouse/src/main.c b/project/at_start_f403a/examples/usb_device/mouse/src/main.c index ae05ca10..b5c5cd73 100644 --- a/project/at_start_f403a/examples/usb_device/mouse/src/main.c +++ b/project/at_start_f403a/examples/usb_device/mouse/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -42,7 +42,7 @@ usbd_core_type usb_core_dev; __IO uint8_t press_mouse = 0; extern __IO uint8_t hid_suspend_flag; -uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; +uint8_t report_buf[USBD_MOUSE_IN_MAXPACKET_SIZE]; void system_clock_recover(void); void button_exint_init(void); void usb_low_power_wakeup_config(void); @@ -175,7 +175,7 @@ int main(void) } #ifdef USB_LOW_POWER_WAKUP /* enter deep sleep */ - if(hid_suspend_flag == 1) + if(((mouse_type *)(usb_core_dev.class_handler->pdata))->hid_suspend_flag == 1) { at32_led_off(LED2); at32_led_off(LED3); @@ -188,7 +188,7 @@ int main(void) /* wait clock stable */ system_clock_recover(); - hid_suspend_flag = 0; + ((mouse_type *)(usb_core_dev.class_handler->pdata))->hid_suspend_flag = 0; at32_led_on(LED2); at32_led_on(LED3); at32_led_on(LED4); diff --git a/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/msc/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/inc/msc_diskio.h b/project/at_start_f403a/examples/usb_device/msc/inc/msc_diskio.h index 3064a82a..cfbf148e 100644 --- a/project/at_start_f403a/examples/usb_device/msc/inc/msc_diskio.h +++ b/project/at_start_f403a/examples/usb_device/msc/inc/msc_diskio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mass storage disk interface header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/msc/inc/usb_conf.h index 77138083..d8578128 100644 --- a/project/at_start_f403a/examples/usb_device/msc/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/msc/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/readme.txt b/project/at_start_f403a/examples/usb_device/msc/readme.txt index b5059183..055a691d 100644 --- a/project/at_start_f403a/examples/usb_device/msc/readme.txt +++ b/project/at_start_f403a/examples/usb_device/msc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_int.c index aaecbea5..bf15c7e3 100644 --- a/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/msc/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/src/main.c b/project/at_start_f403a/examples/usb_device/msc/src/main.c index 2f1f3a72..17d99806 100644 --- a/project/at_start_f403a/examples/usb_device/msc/src/main.c +++ b/project/at_start_f403a/examples/usb_device/msc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/msc/src/msc_diskio.c b/project/at_start_f403a/examples/usb_device/msc/src/msc_diskio.c index 6bc62735..32e23098 100644 --- a/project/at_start_f403a/examples/usb_device/msc/src/msc_diskio.c +++ b/project/at_start_f403a/examples/usb_device/msc/src/msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/printer/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/printer/inc/usb_conf.h index e520c8ae..9f59a427 100644 --- a/project/at_start_f403a/examples/usb_device/printer/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/printer/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/readme.txt b/project/at_start_f403a/examples/usb_device/printer/readme.txt index 39c04b10..e29640cd 100644 --- a/project/at_start_f403a/examples/usb_device/printer/readme.txt +++ b/project/at_start_f403a/examples/usb_device/printer/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_int.c index 6f0af9fc..34f9e095 100644 --- a/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/printer/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/printer/src/main.c b/project/at_start_f403a/examples/usb_device/printer/src/main.c index 75b9bdb1..5ba338dd 100644 --- a/project/at_start_f403a/examples/usb_device/printer/src/main.c +++ b/project/at_start_f403a/examples/usb_device/printer/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/usb_conf.h index 5124bbb7..795c0cd7 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/readme.txt b/project/at_start_f403a/examples/usb_device/vcp_loopback/readme.txt index fe4c0fc0..5ae5c005 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/readme.txt +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_int.c index 8776478d..b5de084f 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/vcp_loopback/src/main.c b/project/at_start_f403a/examples/usb_device/vcp_loopback/src/main.c index 83e17487..fb6ba21c 100644 --- a/project/at_start_f403a/examples/usb_device/vcp_loopback/src/main.c +++ b/project/at_start_f403a/examples/usb_device/vcp_loopback/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -140,7 +140,7 @@ int main(void) nvic_irq_enable(USBFS_L_CAN1_RX0_IRQn, 0, 0); /* usb core init */ - usbd_core_init(&usb_core_dev, USB, &class_handler, &desc_handler, 0); + usbd_core_init(&usb_core_dev, USB, &cdc_class_handler, &cdc_desc_handler, 0); /* enable usb pull-up */ usbd_connect(&usb_core_dev); @@ -163,7 +163,7 @@ int main(void) if(data_len == 0) send_zero_packet = 0; - timeout = 50000; + timeout = 5000000; do { /* send data to host */ diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_clock.h new file mode 100644 index 00000000..3c5e402e --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_clock.h @@ -0,0 +1,46 @@ +/** + ************************************************************************** + * @file at32f403a_407_clock.h + * @version v2.0.7 + * @date 2022-02-11 + * @brief header file of clock program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F403A_407_CLOCK_H +#define __AT32F403A_407_CLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f403a_407.h" + +/* exported functions ------------------------------------------------------- */ +void system_clock_config(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F403A_407_CLOCK_H */ + diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_conf.h new file mode 100644 index 00000000..e6784841 --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_conf.h @@ -0,0 +1,163 @@ +/** + ************************************************************************** + * @file at32f403a_407_conf.h + * @version v2.0.7 + * @date 2022-02-11 + * @brief at32f403a_407 config header file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F403A_407_CONF_H +#define __AT32F403A_407_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + + +/** + * @brief in the following line adjust the value of high speed exernal crystal (hext) + * used in your application + * + * tip: to avoid modifying this file each time you need to use different hext, you + * can define the hext value in your toolchain compiler preprocessor. + * + */ +#if !defined HEXT_VALUE +#define HEXT_VALUE ((uint32_t)8000000) /*!< value of the high speed exernal crystal in hz */ +#endif + +/** + * @brief in the following line adjust the high speed exernal crystal (hext) startup + * timeout value + */ +#define HEXT_STARTUP_TIMEOUT ((uint16_t)0x3000) /*!< time out for hext start up */ +#define HICK_VALUE ((uint32_t)8000000) /*!< value of the high speed internal clock in hz */ + +/* module define -------------------------------------------------------------*/ +#define CRM_MODULE_ENABLED +#define TMR_MODULE_ENABLED +#define RTC_MODULE_ENABLED +#define BPR_MODULE_ENABLED +#define GPIO_MODULE_ENABLED +#define I2C_MODULE_ENABLED +#define USART_MODULE_ENABLED +#define PWC_MODULE_ENABLED +#define CAN_MODULE_ENABLED +#define ADC_MODULE_ENABLED +#define DAC_MODULE_ENABLED +#define SPI_MODULE_ENABLED +#define DMA_MODULE_ENABLED +#define DEBUG_MODULE_ENABLED +#define FLASH_MODULE_ENABLED +#define CRC_MODULE_ENABLED +#define WWDT_MODULE_ENABLED +#define WDT_MODULE_ENABLED +#define EXINT_MODULE_ENABLED +#define SDIO_MODULE_ENABLED +#define XMC_MODULE_ENABLED +#define USB_MODULE_ENABLED +#define ACC_MODULE_ENABLED +#define MISC_MODULE_ENABLED +#define EMAC_MODULE_ENABLED + +/* includes ------------------------------------------------------------------*/ +#ifdef CRM_MODULE_ENABLED +#include "at32f403a_407_crm.h" +#endif +#ifdef TMR_MODULE_ENABLED +#include "at32f403a_407_tmr.h" +#endif +#ifdef RTC_MODULE_ENABLED +#include "at32f403a_407_rtc.h" +#endif +#ifdef BPR_MODULE_ENABLED +#include "at32f403a_407_bpr.h" +#endif +#ifdef GPIO_MODULE_ENABLED +#include "at32f403a_407_gpio.h" +#endif +#ifdef I2C_MODULE_ENABLED +#include "at32f403a_407_i2c.h" +#endif +#ifdef USART_MODULE_ENABLED +#include "at32f403a_407_usart.h" +#endif +#ifdef PWC_MODULE_ENABLED +#include "at32f403a_407_pwc.h" +#endif +#ifdef CAN_MODULE_ENABLED +#include "at32f403a_407_can.h" +#endif +#ifdef ADC_MODULE_ENABLED +#include "at32f403a_407_adc.h" +#endif +#ifdef DAC_MODULE_ENABLED +#include "at32f403a_407_dac.h" +#endif +#ifdef SPI_MODULE_ENABLED +#include "at32f403a_407_spi.h" +#endif +#ifdef DMA_MODULE_ENABLED +#include "at32f403a_407_dma.h" +#endif +#ifdef DEBUG_MODULE_ENABLED +#include "at32f403a_407_debug.h" +#endif +#ifdef FLASH_MODULE_ENABLED +#include "at32f403a_407_flash.h" +#endif +#ifdef CRC_MODULE_ENABLED +#include "at32f403a_407_crc.h" +#endif +#ifdef WWDT_MODULE_ENABLED +#include "at32f403a_407_wwdt.h" +#endif +#ifdef WDT_MODULE_ENABLED +#include "at32f403a_407_wdt.h" +#endif +#ifdef EXINT_MODULE_ENABLED +#include "at32f403a_407_exint.h" +#endif +#ifdef SDIO_MODULE_ENABLED +#include "at32f403a_407_sdio.h" +#endif +#ifdef XMC_MODULE_ENABLED +#include "at32f403a_407_xmc.h" +#endif +#ifdef ACC_MODULE_ENABLED +#include "at32f403a_407_acc.h" +#endif +#ifdef MISC_MODULE_ENABLED +#include "at32f403a_407_misc.h" +#endif +#ifdef USB_MODULE_ENABLED +#include "at32f403a_407_usb.h" +#endif +#ifdef EMAC_MODULE_ENABLED +#include "at32f403a_407_emac.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_int.h new file mode 100644 index 00000000..047fcae0 --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/at32f403a_407_int.h @@ -0,0 +1,58 @@ +/** + ************************************************************************** + * @file at32f403a_407_int.h + * @version v2.0.7 + * @date 2022-02-11 + * @brief header file of main interrupt service routines. + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __AT32F403A_407_INT_H +#define __AT32F403A_407_INT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f403a_407.h" + +/* exported types ------------------------------------------------------------*/ +/* exported constants --------------------------------------------------------*/ +/* exported macro ------------------------------------------------------------*/ +/* exported functions ------------------------------------------------------- */ + +void NMI_Handler(void); +void HardFault_Handler(void); +void MemManage_Handler(void); +void BusFault_Handler(void); +void UsageFault_Handler(void); +void SVC_Handler(void); +void DebugMon_Handler(void); +void PendSV_Handler(void); +void SysTick_Handler(void); + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/usb_conf.h new file mode 100644 index 00000000..ea495257 --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/inc/usb_conf.h @@ -0,0 +1,121 @@ +/** + ************************************************************************** + * @file usb_conf.h + * @version v2.0.7 + * @date 2022-02-11 + * @brief usb config header file + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* define to prevent recursive inclusion -------------------------------------*/ +#ifndef __USB_CONF_H +#define __USB_CONF_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "at32f403a_407.h" +#include "at32f403a_407_board.h" +#include "stdio.h" + +/** @addtogroup AT32F403A_periph_examples + * @{ + */ + +/** @addtogroup 403A_USB_device_vcp_loopback + * @{ + */ + +/** + * @brief usb endpoint max num define + */ +#ifndef USB_EPT_MAX_NUM +#define USB_EPT_MAX_NUM 8 /*!< usb device support endpoint number */ +#endif + +/** + * @brief usb buffer extend to 768-1280 bytes + */ +//#define USB_BUFFER_SIZE_EX /*!< usb enable extend buffer */ + + +/** + * @brief auto malloc usb endpoint buffer + */ +//#define USB_EPT_AUTO_MALLOC_BUFFER /*!< usb auto malloc endpoint tx and rx buffer */ + +/** + * @brief usb virtual comport + */ +#define USB_VIRTUAL_COMPORT + + +#ifndef USB_EPT_AUTO_MALLOC_BUFFER +/** + * @brief user custom endpoint buffer + * EPTn_TX_ADDR, EPTn_RX_ADDR must less than usb buffer size + */ + +/* ept0 tx start address 0x40, size 0x40, + so rx start address is 0x40 + 0x40 = 0x80 */ +#define EPT0_TX_ADDR 0x40 /*!< usb endpoint 0 tx buffer address offset */ +#define EPT0_RX_ADDR 0x80 /*!< usb endpoint 0 rx buffer address offset */ + +#define EPT1_TX_ADDR 0xC0 /*!< usb endpoint 1 tx buffer address offset */ +#define EPT1_RX_ADDR 0x100 /*!< usb endpoint 1 rx buffer address offset */ + +#define EPT2_TX_ADDR 0x140 /*!< usb endpoint 2 tx buffer address offset */ +#define EPT2_RX_ADDR 0x180 /*!< usb endpoint 2 rx buffer address offset */ + +#define EPT3_TX_ADDR 0x00 /*!< usb endpoint 3 tx buffer address offset */ +#define EPT3_RX_ADDR 0x00 /*!< usb endpoint 3 rx buffer address offset */ + +#define EPT4_TX_ADDR 0x00 /*!< usb endpoint 4 tx buffer address offset */ +#define EPT4_RX_ADDR 0x00 /*!< usb endpoint 4 rx buffer address offset */ + +#define EPT5_TX_ADDR 0x00 /*!< usb endpoint 5 tx buffer address offset */ +#define EPT5_RX_ADDR 0x00 /*!< usb endpoint 5 rx buffer address offset */ + +#define EPT6_TX_ADDR 0x00 /*!< usb endpoint 6 tx buffer address offset */ +#define EPT6_RX_ADDR 0x00 /*!< usb endpoint 6 rx buffer address offset */ + +#define EPT7_TX_ADDR 0x00 /*!< usb endpoint 7 tx buffer address offset */ +#define EPT7_RX_ADDR 0x00 /*!< usb endpoint 7 rx buffer address offset */ + +#endif + +void usb_delay_ms(uint32_t ms); +void usb_delay_us(uint32_t us); + +/** + * @} + */ + +/** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif + diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx b/project/at_start_f403a/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx new file mode 100644 index 00000000..ce6b4c23 --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx @@ -0,0 +1,672 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + virtual_comport + 0x4 + ARM-ADS + + 12000000 + + 0 + 1 + 0 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + .\listings\ + + + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 0 + 0 + 0 + 0 + + + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + + + 0 + 0 + 1 + + 0 + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + + + + + + + + + + + BIN\CMSIS_AGDI.dll + + + + 0 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F403A_1024 -FS08000000 -FL0100000 -FP0($$Device:-AT32F403AVGT7$Flash\AT32F403A_1024.FLM)) + + + + + 0 + + + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + 0 + 0 + 0 + + + + + + + + + + + + + user + 0 + 0 + 0 + 0 + + 1 + 1 + 1 + 0 + 0 + 0 + ..\src\at32f403a_407_clock.c + at32f403a_407_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f403a_407_int.c + at32f403a_407_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 4 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f403a_407_board\at32f403a_407_board.c + at32f403a_407_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_acc.c + at32f403a_407_acc.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_adc.c + at32f403a_407_adc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_bpr.c + at32f403a_407_bpr.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_can.c + at32f403a_407_can.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_crc.c + at32f403a_407_crc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_crm.c + at32f403a_407_crm.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_dac.c + at32f403a_407_dac.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_debug.c + at32f403a_407_debug.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_dma.c + at32f403a_407_dma.c + 0 + 0 + + + 3 + 14 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_emac.c + at32f403a_407_emac.c + 0 + 0 + + + 3 + 15 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_exint.c + at32f403a_407_exint.c + 0 + 0 + + + 3 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_flash.c + at32f403a_407_flash.c + 0 + 0 + + + 3 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_gpio.c + at32f403a_407_gpio.c + 0 + 0 + + + 3 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_i2c.c + at32f403a_407_i2c.c + 0 + 0 + + + 3 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_misc.c + at32f403a_407_misc.c + 0 + 0 + + + 3 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_pwc.c + at32f403a_407_pwc.c + 0 + 0 + + + 3 + 21 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_rtc.c + at32f403a_407_rtc.c + 0 + 0 + + + 3 + 22 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_sdio.c + at32f403a_407_sdio.c + 0 + 0 + + + 3 + 23 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_spi.c + at32f403a_407_spi.c + 0 + 0 + + + 3 + 24 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_tmr.c + at32f403a_407_tmr.c + 0 + 0 + + + 3 + 25 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_usart.c + at32f403a_407_usart.c + 0 + 0 + + + 3 + 26 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_usb.c + at32f403a_407_usb.c + 0 + 0 + + + 3 + 27 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_wdt.c + at32f403a_407_wdt.c + 0 + 0 + + + 3 + 28 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_wwdt.c + at32f403a_407_wwdt.c + 0 + 0 + + + 3 + 29 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_xmc.c + at32f403a_407_xmc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 30 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f403a_407.c + system_at32f403a_407.c + 0 + 0 + + + 4 + 31 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f403a_407.s + startup_at32f403a_407.s + 0 + 0 + + + + + usbd_drivers + 0 + 0 + 0 + 0 + + 5 + 32 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_core.c + usbd_core.c + 0 + 0 + + + 5 + 33 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_int.c + usbd_int.c + 0 + 0 + + + 5 + 34 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_sdr.c + usbd_sdr.c + 0 + 0 + + + + + usbd_class + 0 + 0 + 0 + 0 + + 6 + 35 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_class.c + cdc_class.c + 0 + 0 + + + 6 + 36 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_desc.c + cdc_desc.c + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 7 + 37 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx b/project/at_start_f403a/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx new file mode 100644 index 00000000..2ef51ba4 --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx @@ -0,0 +1,627 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + virtual_comport + 0x4 + ARM-ADS + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 + + + -AT32F403AVGT7 + ArteryTek + ArteryTek.AT32F403A_407_DFP.2.0.2 + IRAM(0x20000000,0x38000) IROM(0x08000000,0x100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F403A_1024 -FS08000000 -FL0100000 -FP0($$Device:-AT32F403AVGT7$Flash\AT32F403A_1024.FLM)) + 0 + $$Device:-AT32F403AVGT7$Device\Include\at32f40x.h + + + + + + + + + + $$Device:-AT32F403AVGT7$SVD\AT32F403Axx_v2.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + .\objects\ + virtual_comport + 1 + 0 + 1 + 1 + 1 + .\listings\ + 1 + 0 + 0 + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + + 0 + 0 + + + 0 + 0 + 0 + 0 + + 0 + + + + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 3 + + + 0 + + + SARMCM3.DLL + -REMAP -MPU + DCM.DLL + -pCM4 + SARMCM3.DLL + -MPU + TCM.DLL + -pCM4 + + + + 1 + 0 + 0 + 0 + 16 + + + + + 1 + 0 + 0 + 1 + 1 + 4096 + + 1 + BIN\UL2CM3.DLL + + + + + + 0 + + + + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 0 + 1 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 0 + "Cortex-M4" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 8 + 0 + 0 + 0 + 0 + 3 + 3 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 1 + 0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x38000 + + + 1 + 0x8000000 + 0x100000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x100000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x38000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 1 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 0 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + + + AT32F403AVGT7,USE_STDPERIPH_DRIVER,AT_START_F403A_V1 + + ..\inc;..\..\..\..\..\at32f403a_407_board;..\..\..\..\..\..\libraries\drivers\inc;..\..\..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\..\..\libraries\cmsis\cm4\device_support;..\..\..\..\..\..\middlewares\usbd_drivers\inc;..\..\..\..\..\..\middlewares\usbd_class\cdc + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 4 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + user + + + at32f403a_407_clock.c + 1 + ..\src\at32f403a_407_clock.c + + + at32f403a_407_int.c + 1 + ..\src\at32f403a_407_int.c + + + main.c + 1 + ..\src\main.c + + + + + bsp + + + at32f403a_407_board.c + 1 + ..\..\..\..\..\at32f403a_407_board\at32f403a_407_board.c + + + + + firmware + + + at32f403a_407_acc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_acc.c + + + at32f403a_407_adc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_adc.c + + + at32f403a_407_bpr.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_bpr.c + + + at32f403a_407_can.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_can.c + + + at32f403a_407_crc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_crc.c + + + at32f403a_407_crm.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_crm.c + + + at32f403a_407_dac.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_dac.c + + + at32f403a_407_debug.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_debug.c + + + at32f403a_407_dma.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_dma.c + + + at32f403a_407_emac.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_emac.c + + + at32f403a_407_exint.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_exint.c + + + at32f403a_407_flash.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_flash.c + + + at32f403a_407_gpio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_gpio.c + + + at32f403a_407_i2c.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_i2c.c + + + at32f403a_407_misc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_misc.c + + + at32f403a_407_pwc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_pwc.c + + + at32f403a_407_rtc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_rtc.c + + + at32f403a_407_sdio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_sdio.c + + + at32f403a_407_spi.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_spi.c + + + at32f403a_407_tmr.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_tmr.c + + + at32f403a_407_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_usart.c + + + at32f403a_407_usb.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_usb.c + + + at32f403a_407_wdt.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_wdt.c + + + at32f403a_407_wwdt.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_wwdt.c + + + at32f403a_407_xmc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f403a_407_xmc.c + + + + + cmsis + + + system_at32f403a_407.c + 1 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f403a_407.c + + + startup_at32f403a_407.s + 2 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f403a_407.s + + + + + usbd_drivers + + + usbd_core.c + 1 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_core.c + + + usbd_int.c + 1 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_int.c + + + usbd_sdr.c + 1 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_sdr.c + + + + + usbd_class + + + cdc_class.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_class.c + + + cdc_desc.c + 1 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_desc.c + + + + + readme + + + readme.txt + 5 + ..\readme.txt + + + + + + + + + + + + + + + + + <Project Info> + + + + + + 0 + 1 + + + + +
diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/readme.txt b/project/at_start_f403a/examples/usb_device/virtual_comport/readme.txt new file mode 100644 index 00000000..d9a9116f --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/readme.txt @@ -0,0 +1,12 @@ +/** + ************************************************************************** + * @file readme.txt + * @version v2.0.7 + * @date 2022-02-11 + * @brief readme + ************************************************************************** + */ + + this demo is based on the at-start board, in this demo, show how to build + a device of usb virtual comport,when use this demo,please connect usart2 + tx pin(pa2) and rx pin(pa3). diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/virtual_comport/src/at32f403a_407_clock.c new file mode 100644 index 00000000..87353fd9 --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/src/at32f403a_407_clock.c @@ -0,0 +1,100 @@ +/** + ************************************************************************** + * @file at32f403a_407_clock.c + * @version v2.0.7 + * @date 2022-02-11 + * @brief system clock config program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f403a_407_clock.h" + +/** + * @brief system clock config program + * @note the system clock is configured as follow: + * - system clock = hext / 2 * pll_mult + * - system clock source = pll (hext) + * - hext = 8000000 + * - sclk = 192000000 + * - ahbdiv = 1 + * - ahbclk = 192000000 + * - apb2div = 2 + * - apb2clk = 96000000 + * - apb1div = 2 + * - apb1clk = 96000000 + * - pll_mult = 48 + * - pll_range = GT72MHZ (greater than 72 mhz) + * @param none + * @retval none + */ +void system_clock_config(void) +{ + /* reset crm */ + crm_reset(); + + crm_clock_source_enable(CRM_CLOCK_SOURCE_HEXT, TRUE); + + /* wait till hext is ready */ + while(crm_hext_stable_wait() == ERROR) + { + } + + /* config pll clock resource */ + crm_pll_config(CRM_PLL_SOURCE_HEXT_DIV, CRM_PLL_MULT_48, CRM_PLL_OUTPUT_RANGE_GT72MHZ); + + /* config hext division */ + crm_hext_clock_div_set(CRM_HEXT_DIV_2); + + /* enable pll */ + crm_clock_source_enable(CRM_CLOCK_SOURCE_PLL, TRUE); + + /* wait till pll is ready */ + while(crm_flag_get(CRM_PLL_STABLE_FLAG) != SET) + { + } + + /* config ahbclk */ + crm_ahb_div_set(CRM_AHB_DIV_1); + + /* config apb2clk */ + crm_apb2_div_set(CRM_APB2_DIV_2); + + /* config apb1clk */ + crm_apb1_div_set(CRM_APB1_DIV_2); + + /* enable auto step mode */ + crm_auto_step_mode_enable(TRUE); + + /* select pll as system clock source */ + crm_sysclk_switch(CRM_SCLK_PLL); + + /* wait till pll is used as system clock source */ + while(crm_sysclk_switch_status_get() != CRM_SCLK_PLL) + { + } + + /* disable auto step mode */ + crm_auto_step_mode_enable(FALSE); + + /* update system_core_clock global variable */ + system_core_clock_update(); +} + diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/virtual_comport/src/at32f403a_407_int.c new file mode 100644 index 00000000..b5de084f --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/src/at32f403a_407_int.c @@ -0,0 +1,143 @@ +/** + ************************************************************************** + * @file at32f403a_407_int.c + * @version v2.0.7 + * @date 2022-02-11 + * @brief main interrupt service routines. + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +/* includes ------------------------------------------------------------------*/ +#include "at32f403a_407_int.h" + +/** @addtogroup AT32F403A_periph_examples + * @{ + */ + +/** @addtogroup 403A_USB_device_vcp_loopback + * @{ + */ + +/** + * @brief this function handles nmi exception. + * @param none + * @retval none + */ +void NMI_Handler(void) +{ +} + +/** + * @brief this function handles hard fault exception. + * @param none + * @retval none + */ +void HardFault_Handler(void) +{ + /* go to infinite loop when hard fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles memory manage exception. + * @param none + * @retval none + */ +void MemManage_Handler(void) +{ + /* go to infinite loop when memory manage exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles bus fault exception. + * @param none + * @retval none + */ +void BusFault_Handler(void) +{ + /* go to infinite loop when bus fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles usage fault exception. + * @param none + * @retval none + */ +void UsageFault_Handler(void) +{ + /* go to infinite loop when usage fault exception occurs */ + while(1) + { + } +} + +/** + * @brief this function handles svcall exception. + * @param none + * @retval none + */ +void SVC_Handler(void) +{ +} + +/** + * @brief this function handles debug monitor exception. + * @param none + * @retval none + */ +void DebugMon_Handler(void) +{ +} + +/** + * @brief this function handles pendsv_handler exception. + * @param none + * @retval none + */ +void PendSV_Handler(void) +{ +} + +/** + * @brief this function handles systick handler. + * @param none + * @retval none + */ +void SysTick_Handler(void) +{ +} + +/** + * @} + */ + +/** + * @} + */ + + diff --git a/project/at_start_f403a/examples/usb_device/virtual_comport/src/main.c b/project/at_start_f403a/examples/usb_device/virtual_comport/src/main.c new file mode 100644 index 00000000..47fd3baa --- /dev/null +++ b/project/at_start_f403a/examples/usb_device/virtual_comport/src/main.c @@ -0,0 +1,439 @@ +/** + ************************************************************************** + * @file main.c + * @version v2.0.7 + * @date 2022-02-11 + * @brief main program + ************************************************************************** + * Copyright notice & Disclaimer + * + * The software Board Support Package (BSP) that is made available to + * download from Artery official website is the copyrighted work of Artery. + * Artery authorizes customers to use, copy, and distribute the BSP + * software and its related documentation for the purpose of design and + * development in conjunction with Artery microcontrollers. Use of the + * software is governed by this copyright notice and the following disclaimer. + * + * THIS SOFTWARE IS PROVIDED ON "AS IS" BASIS WITHOUT WARRANTIES, + * GUARANTEES OR REPRESENTATIONS OF ANY KIND. ARTERY EXPRESSLY DISCLAIMS, + * TO THE FULLEST EXTENT PERMITTED BY LAW, ALL EXPRESS, IMPLIED OR + * STATUTORY OR OTHER WARRANTIES, GUARANTEES OR REPRESENTATIONS, + * INCLUDING BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY, + * FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. + * + ************************************************************************** + */ + +#include "at32f403a_407_board.h" +#include "at32f403a_407_clock.h" +#include "usbd_core.h" +#include "cdc_class.h" +#include "cdc_desc.h" +#include "usbd_int.h" + +/** @addtogroup AT32F403A_periph_examples + * @{ + */ + +/** @addtogroup 403A_USB_device_vcp_loopback USB_device_vcp_loopback + * @{ + */ + +usbd_core_type usb_core_dev; +uint8_t usb_buffer[256]; + +/* usart global struct define */ +extern linecoding_type linecoding; +void usb_usart_config(linecoding_type linecoding); +void usart_gpio_config(void); +#define usart_buffer_size 2048 +uint8_t usart_rx_buffer[usart_buffer_size]; +uint16_t hw_usart_rx_index = 0; +uint16_t hw_usart_read_index = 0; +uint16_t usart_rx_data_len = 0; +uint16_t ov_cnt = 0; +void usart_send_data(uint8_t *send_data, uint16_t len); +uint16_t usart_receive_data(void); + +/** + * @brief usb 48M clock select + * @param clk_s:USB_CLK_HICK, USB_CLK_HEXT + * @retval none + */ +void usb_clock48m_select(usb_clk48_s clk_s) +{ + if(clk_s == USB_CLK_HICK) + { + crm_usb_clock_source_select(CRM_USB_CLOCK_SOURCE_HICK); + + /* enable the acc calibration ready interrupt */ + crm_periph_clock_enable(CRM_ACC_PERIPH_CLOCK, TRUE); + + /* update the c1\c2\c3 value */ + acc_write_c1(7980); + acc_write_c2(8000); + acc_write_c3(8020); + + /* open acc calibration */ + acc_calibration_mode_enable(ACC_CAL_HICKTRIM, TRUE); + } + else + { + switch(system_core_clock) + { + /* 48MHz */ + case 48000000: + crm_usb_clock_div_set(CRM_USB_DIV_1); + break; + + /* 72MHz */ + case 72000000: + crm_usb_clock_div_set(CRM_USB_DIV_1_5); + break; + + /* 96MHz */ + case 96000000: + crm_usb_clock_div_set(CRM_USB_DIV_2); + break; + + /* 120MHz */ + case 120000000: + crm_usb_clock_div_set(CRM_USB_DIV_2_5); + break; + + /* 144MHz */ + case 144000000: + crm_usb_clock_div_set(CRM_USB_DIV_3); + break; + + /* 168MHz */ + case 168000000: + crm_usb_clock_div_set(CRM_USB_DIV_3_5); + break; + + /* 192MHz */ + case 192000000: + crm_usb_clock_div_set(CRM_USB_DIV_4); + break; + + default: + break; + + } + } +} + +/** + * @brief main function. + * @param none + * @retval none + */ +int main(void) +{ + uint16_t data_len; + + uint32_t timeout; + + uint8_t send_zero_packet = 0; + + /* config nvic priority group */ + nvic_priority_group_config(NVIC_PRIORITY_GROUP_4); + + system_clock_config(); + + at32_board_init(); + + /* usart gpio config */ + usart_gpio_config(); + + /* hardware usart config: usart2 */ + usb_usart_config(linecoding); + + /* select usb 48m clcok source */ + usb_clock48m_select(USB_CLK_HEXT); + + /* enable usb clock */ + crm_periph_clock_enable(CRM_USB_PERIPH_CLOCK, TRUE); + + /* enable usb interrupt */ + nvic_irq_enable(USBFS_L_CAN1_RX0_IRQn, 0, 0); + + /* usb core init */ + usbd_core_init(&usb_core_dev, USB, &cdc_class_handler, &cdc_desc_handler, 0); + + /* enable usb pull-up */ + usbd_connect(&usb_core_dev); + + while(1) + { + /* get usb vcp receive data */ + data_len = usb_vcp_get_rxdata(&usb_core_dev, usb_buffer); + + /* send data to hardware usart */ + if(data_len > 0) + { + usart_send_data(usb_buffer, data_len); + } + + /* if hardware usart received data,usb send data to host */ + usart_rx_data_len = usart_receive_data(); + if(usart_rx_data_len || send_zero_packet == 1) + { + if(usart_rx_data_len > 0) + send_zero_packet = 1; + + if(usart_rx_data_len == 0) + send_zero_packet = 0; + + timeout = 50000; + + if((hw_usart_read_index + usart_rx_data_len) < usart_buffer_size) + { + do + { + /* send data to host */ + if(usb_vcp_send_data(&usb_core_dev, &usart_rx_buffer[hw_usart_read_index], usart_rx_data_len) == SUCCESS) + { + hw_usart_read_index = hw_usart_read_index + usart_rx_data_len; + + break; + } + }while(timeout --); + + } + /* process the fifo overflow */ + else + { + do + { + /* send data to host */ + if(usb_vcp_send_data(&usb_core_dev, &usart_rx_buffer[hw_usart_read_index], usart_buffer_size - hw_usart_read_index) == SUCCESS) + { + /* get fifo overflow data count */ + ov_cnt = usart_rx_data_len - (usart_buffer_size - hw_usart_read_index); + hw_usart_read_index = 0; + break; + } + }while(timeout --); + timeout = 50000; + do + { + /* send data to host */ + if(usb_vcp_send_data(&usb_core_dev, &usart_rx_buffer[hw_usart_read_index], ov_cnt) == SUCCESS) + { + hw_usart_read_index = ov_cnt; + break; + } + }while(timeout --); + } + } + } +} + +/** + * @brief this function handles usart2 send data. + * @param send_data: pointer to data + * @param len: data len + * @retval none + */ +void usart_send_data(uint8_t *send_data, uint16_t len) +{ + uint16_t index = 0; + for(index = 0; index < len; index++ ) + { + do + { + ; + }while(usart_flag_get(USART2, USART_TDBE_FLAG) == RESET); + + usart_data_transmit(USART2, send_data[index]); + } +} + +/** + * @brief this function handles usart2 receive data. + * @param none + * @retval the data len + */ +uint16_t usart_receive_data(void) +{ + uint16_t usart_data_len; + if(hw_usart_read_index == hw_usart_rx_index) + { + usart_data_len = 0; + } + else + { + /* whether to process the fifo overflow or not */ + if(hw_usart_rx_index > hw_usart_read_index) + usart_data_len = hw_usart_rx_index - hw_usart_read_index; + else if(hw_usart_rx_index == 0 && hw_usart_rx_index != hw_usart_read_index) + usart_data_len = usart_buffer_size - hw_usart_read_index; + else + usart_data_len = (usart_buffer_size-1) + hw_usart_rx_index - hw_usart_read_index; + } + + return usart_data_len; +} + +/** + * @brief this function handles usart2 handler. + * @param none + * @retval none + */ +void USART2_IRQHandler(void) +{ + if(usart_flag_get(USART2, USART_RDBF_FLAG) != RESET) + { + /* read one byte from the receive data register */ + usart_rx_buffer[hw_usart_rx_index] = usart_data_receive(USART2); + hw_usart_rx_index = ( (hw_usart_rx_index+1) & (usart_buffer_size-1) ); + } +} + +/** + * @brief this function handles usart2 and linecoding config. + * @param linecoding: linecoding value + * @retval none + */ +void usb_usart_config( linecoding_type linecoding) +{ + usart_stop_bit_num_type usart_stop_bit; + usart_data_bit_num_type usart_data_bit; + usart_parity_selection_type usart_parity_select; + + /* enable the usart2 and gpio clock */ + crm_periph_clock_enable(CRM_USART2_PERIPH_CLOCK, FALSE); + crm_periph_clock_enable(CRM_USART2_PERIPH_CLOCK, TRUE); + + /* stop bit */ + switch(linecoding.format) + { + case 0x0: + usart_stop_bit = USART_STOP_1_BIT; + break; + /* to be used when transmitting and receiving data in smartcard mode */ + case 0x1: + usart_stop_bit = USART_STOP_1_5_BIT; + break; + case 0x2: + usart_stop_bit = USART_STOP_2_BIT; + break; + default : + break; + } + /* data bits */ + switch(linecoding.data) + { + /* hardware usart not support data bits for 5/6/7 */ + case 0x5: + case 0x6: + case 0x7: + break; + case 0x8: + usart_data_bit = USART_DATA_8BITS; + break; + /* hardware usart not support data bits for 16 */ + case 0x10: + break; + default : + break; + } + /* parity */ + switch(linecoding.parity) + { + case 0x0: + usart_parity_select = USART_PARITY_NONE; + break; + case 0x1: + usart_parity_select = USART_PARITY_ODD; + break; + case 0x2: + usart_parity_select = USART_PARITY_EVEN; + break; + /* hardware usart not support partiy for mark and space */ + case 0x3: + case 0x4: + break; + default : + break; + } + + nvic_irq_enable(USART2_IRQn, 0, 0); + + /* configure usart2 param */ + usart_init(USART2, linecoding.bitrate, usart_data_bit, usart_stop_bit); + usart_parity_selection_config(USART2, usart_parity_select); + usart_transmitter_enable(USART2, TRUE); + usart_receiver_enable(USART2, TRUE); + + /* enable usart2 interrupt */ + usart_interrupt_enable(USART2, USART_RDBF_INT, TRUE); + usart_enable(USART2, TRUE); +} + +/** + * @brief this function handles usart2 gpio config. + * @param none + * @retval none + */ +void usart_gpio_config(void) +{ + gpio_init_type gpio_init_struct; + crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); + + /* configure the usart2 tx pin */ + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; + gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; + gpio_init_struct.gpio_mode = GPIO_MODE_MUX; + gpio_init_struct.gpio_pins = GPIO_PINS_2; + gpio_init_struct.gpio_pull = GPIO_PULL_NONE; + gpio_init(GPIOA, &gpio_init_struct); + + /* configure the usart2 rx pin */ + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; + gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = GPIO_PINS_3; + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init(GPIOA, &gpio_init_struct); +} + +/** + * @brief this function handles usb interrupt. + * @param none + * @retval none + */ +void USBFS_L_CAN1_RX0_IRQHandler(void) +{ + usbd_irq_handler(&usb_core_dev); +} + +/** + * @brief usb delay millisecond function. + * @param ms: number of millisecond delay + * @retval none + */ +void usb_delay_ms(uint32_t ms) +{ + /* user can define self delay function */ + delay_ms(ms); +} + +/** + * @brief usb delay microsecond function. + * @param us: number of microsecond delay + * @retval none + */ +void usb_delay_us(uint32_t us) +{ + delay_us(us); +} + +/** + * @} + */ + +/** + * @} + */ diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h index a77c9b32..e6236545 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash_fat16.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief fat16 file system header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h index fefe0fb8..f6ac9121 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mass storage disk interface header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/usb_conf.h b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/usb_conf.h index 14134b9d..4ea8b944 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/usb_conf.h +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/readme.txt b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/readme.txt index db70f03d..6ba18d7b 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/readme.txt +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_clock.c index 534e5940..87353fd9 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_int.c b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_int.c index e11de9a5..17ecb513 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/flash_fat16.c b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/flash_fat16.c index 8ffe2be1..94d164a6 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/flash_fat16.c +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/flash_fat16.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash_fat16.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief fat16 file system ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/main.c b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/main.c index de518326..62bc93e6 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/main.c +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -212,7 +212,6 @@ void flash_fat16_loop_status(void) break; case UPGRADE_UNKNOWN: flash_fat16_set_name((const uint8_t *)"Unkown", 6); - flash_iap.msc_up_status = UPGRADE_DONE; break; case UPGRADE_DONE: break; diff --git a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/msc_diskio.c b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/msc_diskio.c index 29cc8b57..1c8451e6 100644 --- a/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/msc_diskio.c +++ b/project/at_start_f403a/examples/usb_device/virtual_msc_iap/src/msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/wdt/wdt_reset/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/readme.txt b/project/at_start_f403a/examples/wdt/wdt_reset/readme.txt index f66fe377..080c0cb7 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/readme.txt +++ b/project/at_start_f403a/examples/wdt/wdt_reset/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file wdt_reset/readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_int.c b/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_int.c index c9d9f1c1..f446e4d5 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/wdt/wdt_reset/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wdt/wdt_reset/src/main.c b/project/at_start_f403a/examples/wdt/wdt_reset/src/main.c index 117f0482..82679cf7 100644 --- a/project/at_start_f403a/examples/wdt/wdt_reset/src/main.c +++ b/project/at_start_f403a/examples/wdt/wdt_reset/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/readme.txt b/project/at_start_f403a/examples/wwdt/wwdt_reset/readme.txt index b50c325e..bee8b855 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/readme.txt +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file wwdt_reset/readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_int.c b/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_int.c index 07ac08b3..e6941b15 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/wwdt/wwdt_reset/src/main.c b/project/at_start_f403a/examples/wwdt/wwdt_reset/src/main.c index 63426cc4..591943fb 100644 --- a/project/at_start_f403a/examples/wwdt/wwdt_reset/src/main.c +++ b/project/at_start_f403a/examples/wwdt/wwdt_reset/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/picture.h b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/picture.h index 7cef5245..fc7e3d1e 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/picture.h +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/picture.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file picture.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file contains all the picture used for lcd display. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/xmc_lcd.h b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/xmc_lcd.h index 401c9f0c..435c74a3 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/inc/xmc_lcd.h +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/inc/xmc_lcd.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file xmc_lcd.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief xmc_lcd header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/readme.txt b/project/at_start_f403a/examples/xmc/lcd_8bit/readme.txt index 25b5cd81..e1638624 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/readme.txt +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_int.c b/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_int.c index a42b10dd..ec3afc4f 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/src/main.c b/project/at_start_f403a/examples/xmc/lcd_8bit/src/main.c index e87c2cb6..edc16b29 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/src/main.c +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_8bit/src/xmc_lcd.c b/project/at_start_f403a/examples/xmc/lcd_8bit/src/xmc_lcd.c index d884e863..f97a56fe 100644 --- a/project/at_start_f403a/examples/xmc/lcd_8bit/src/xmc_lcd.c +++ b/project/at_start_f403a/examples/xmc/lcd_8bit/src/xmc_lcd.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file xmc_lcd.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief xmc_lcd config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/touch.h b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/touch.h index 49fc6706..49aec9f1 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/touch.h +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/touch.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file touch.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file contains all the functions prototypes for the * touch firmware driver. ************************************************************************** @@ -68,10 +68,10 @@ typedef struct #define TDIN_HIGH gpio_bits_set(GPIOB,GPIO_PINS_5) #define TDIN_LOW gpio_bits_reset(GPIOB,GPIO_PINS_5) -#define PEN_HIGH gpio_input_data_bit_read(GPIOB,GPIO_PINS_11) +#define PEN_HIGH gpio_input_data_bit_read(GPIOD,GPIO_PINS_5) -#define TCS_HIGH gpio_bits_set(GPIOB,GPIO_PINS_6) -#define TCS_LOW gpio_bits_reset(GPIOB,GPIO_PINS_6) +#define TCS_HIGH gpio_bits_set(GPIOB,GPIO_PINS_8) +#define TCS_LOW gpio_bits_reset(GPIOB,GPIO_PINS_8) extern touch_dev_type touch_dev_struct; extern touch_dev_type *touch_struct; diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/xmc_lcd.h b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/xmc_lcd.h index dea4d900..c6a3b285 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/xmc_lcd.h +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/inc/xmc_lcd.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file xmc_lcd.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief xmc_lcd program header ************************************************************************** * Copyright notice & Disclaimer @@ -63,8 +63,8 @@ typedef struct */ /* the address of write data & command (xmc_a0) */ -#define XMC_LCD_COMMAND 0x60000000 -#define XMC_LCD_DATA 0x60000002 +#define XMC_LCD_COMMAND 0x6001FFFE +#define XMC_LCD_DATA 0x60020000 /** * @} @@ -75,15 +75,15 @@ typedef struct */ /* the lcd reset line */ -#define LCD_RESET_HIGH gpio_bits_set(GPIOB,GPIO_PINS_9) -#define LCD_RESET_LOW gpio_bits_reset(GPIOB,GPIO_PINS_9) +#define LCD_RESET_HIGH gpio_bits_set(GPIOD,GPIO_PINS_3) +#define LCD_RESET_LOW gpio_bits_reset(GPIOD,GPIO_PINS_3) /** * @} */ -#define LCD_BL_HIGH gpio_bits_set(GPIOB,GPIO_PINS_8) -#define LCD_BL_LOW gpio_bits_reset(GPIOB,GPIO_PINS_8) +#define LCD_BL_HIGH gpio_bits_set(GPIOB,GPIO_PINS_0) +#define LCD_BL_LOW gpio_bits_reset(GPIOB,GPIO_PINS_0) static uint16_t LCD_ID; #define WHITE 0xFFFF #define BLACK 0x0000 diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/readme.txt b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/readme.txt index d7e2d58d..6c3d3560 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/readme.txt +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ @@ -18,11 +18,11 @@ - spi3_sck pb3 ---> spi_sck - spi3_miso pb4 ---> spi_miso - spi3_mosi pb5 ---> spi_mosi - - gpio pb6 ---> lcd_cs - - gpio pb9 ---> lcd_reset - - gpio pb11 ---> lcd_pen - - gpio pb8 ---> lcd_bl - - xmc_a0 pc3 ---> lcd_rs + - gpio pb8 ---> lcd_cs + - gpio pd3 ---> lcd_reset + - gpio pd5 ---> lcd_pen + - gpio pb0 ---> lcd_bl + - xmc_a16 pd11 ---> lcd_rs - xmc_ne1 pd7 ---> lcd_cs - xmc_nwe pd2 ---> lcd_wr - xmc_noe pc5 ---> lcd_rd diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_int.c b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_int.c index ad2c6eb1..c488f5be 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/main.c b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/main.c index bbc26141..ffff3132 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/main.c +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/touch.c b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/touch.c index 4f5967d5..089845a6 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/touch.c +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/touch.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file touch.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief this file contains all the functions prototypes for the * touch firmware driver. ************************************************************************** @@ -76,7 +76,7 @@ void touch_pin_init(void) gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOB, &gpio_init_struct); - gpio_init_struct.gpio_pins = GPIO_PINS_6; + gpio_init_struct.gpio_pins = GPIO_PINS_8; gpio_init_struct.gpio_mode = GPIO_MODE_OUTPUT; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_pull = GPIO_PULL_NONE; @@ -85,7 +85,7 @@ void touch_pin_init(void) gpio_bits_set(GPIOB, GPIO_PINS_3); gpio_bits_set(GPIOB, GPIO_PINS_5); - gpio_bits_set(GPIOB, GPIO_PINS_6); + gpio_bits_set(GPIOB, GPIO_PINS_8); gpio_init_struct.gpio_pins = GPIO_PINS_4; gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; @@ -94,14 +94,14 @@ void touch_pin_init(void) gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOB, &gpio_init_struct); - gpio_init_struct.gpio_pins = GPIO_PINS_11; + gpio_init_struct.gpio_pins = GPIO_PINS_5; gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_pull = GPIO_PULL_UP; gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init(GPIOB, &gpio_init_struct); + gpio_init(GPIOD, &gpio_init_struct); - gpio_bits_set(GPIOB, GPIO_PINS_11); + gpio_bits_set(GPIOD, GPIO_PINS_5); spi_default_para_init(&spi_init_struct); spi_init_struct.transmission_mode = SPI_TRANSMIT_FULL_DUPLEX; @@ -245,7 +245,7 @@ void touch_scan(void) { uint16_t x, y; - if(gpio_input_data_bit_read(GPIOB, GPIO_PINS_11) == 0) + if(gpio_input_data_bit_read(GPIOD, GPIO_PINS_5) == 0) { touch_dev_struct.touch_read_xy(&touch_dev_struct.x_p[1], &touch_dev_struct.y_p[1]); x = (240 * touch_dev_struct.x_p[1]) / (0xed0); diff --git a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/xmc_lcd.c b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/xmc_lcd.c index 2460619d..f0df2d22 100644 --- a/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/xmc_lcd.c +++ b/project/at_start_f403a/examples/xmc/lcd_touch_16bit/src/xmc_lcd.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file xmc_lcd.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief xmc_lcd program file ************************************************************************** * Copyright notice & Disclaimer @@ -111,29 +111,29 @@ void xmc_init(void) gpio_init(GPIOD, &gpio_init_struct); /* lcd reset lines configuration */ - gpio_init_struct.gpio_pins = GPIO_PINS_8; + gpio_init_struct.gpio_pins = GPIO_PINS_0; gpio_init_struct.gpio_mode = GPIO_MODE_OUTPUT; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_pull = GPIO_PULL_NONE; gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOB, &gpio_init_struct); - gpio_init_struct.gpio_pins = GPIO_PINS_9; + gpio_init_struct.gpio_pins = GPIO_PINS_3; gpio_init_struct.gpio_mode = GPIO_MODE_OUTPUT; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_pull = GPIO_PULL_NONE; gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; - gpio_init(GPIOB, &gpio_init_struct); + gpio_init(GPIOD, &gpio_init_struct); /* lcd rs/cs/wr/rd lines configuration */ - gpio_init_struct.gpio_pins = GPIO_PINS_3 | GPIO_PINS_5; + gpio_init_struct.gpio_pins = GPIO_PINS_5; gpio_init_struct.gpio_mode = GPIO_MODE_MUX; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_pull = GPIO_PULL_NONE; gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; gpio_init(GPIOC, &gpio_init_struct); - gpio_init_struct.gpio_pins = GPIO_PINS_2 | GPIO_PINS_7; + gpio_init_struct.gpio_pins = GPIO_PINS_2 | GPIO_PINS_7 | GPIO_PINS_11; gpio_init_struct.gpio_mode = GPIO_MODE_MUX; gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; gpio_init_struct.gpio_pull = GPIO_PULL_NONE; diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/xmc/nand/ecc/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/inc/xmc_ecc.h b/project/at_start_f403a/examples/xmc/nand/ecc/inc/xmc_ecc.h index 973d9ab4..e3e1c547 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/inc/xmc_ecc.h +++ b/project/at_start_f403a/examples/xmc/nand/ecc/inc/xmc_ecc.h @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file xmc_ecc.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file for the nand ecc configuration. ****************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/readme.txt b/project/at_start_f403a/examples/xmc/nand/ecc/readme.txt index 9bcedd94..d2e1a7bb 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/readme.txt +++ b/project/at_start_f403a/examples/xmc/nand/ecc/readme.txt @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ****************************************************************************** */ diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_int.c b/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_int.c index 3f616f98..4b8e4c24 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/xmc/nand/ecc/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/src/main.c b/project/at_start_f403a/examples/xmc/nand/ecc/src/main.c index 411c0010..53cdc8ad 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/src/main.c +++ b/project/at_start_f403a/examples/xmc/nand/ecc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/ecc/src/xmc_ecc.c b/project/at_start_f403a/examples/xmc/nand/ecc/src/xmc_ecc.c index adbac6bb..956c924c 100644 --- a/project/at_start_f403a/examples/xmc/nand/ecc/src/xmc_ecc.c +++ b/project/at_start_f403a/examples/xmc/nand/ecc/src/xmc_ecc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file xmc_ecc.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief nand ecc configuration ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/xmc/nand/nand/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/inc/xmc_nand.h b/project/at_start_f403a/examples/xmc/nand/nand/inc/xmc_nand.h index d8c87a0a..e2248de6 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/inc/xmc_nand.h +++ b/project/at_start_f403a/examples/xmc/nand/nand/inc/xmc_nand.h @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file xmc_nand.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file for the nand configuration. ****************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/readme.txt b/project/at_start_f403a/examples/xmc/nand/nand/readme.txt index 21fc01f7..e53d1972 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/readme.txt +++ b/project/at_start_f403a/examples/xmc/nand/nand/readme.txt @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ****************************************************************************** */ diff --git a/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_int.c b/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_int.c index a79a7fe0..475d04f3 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/xmc/nand/nand/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/src/main.c b/project/at_start_f403a/examples/xmc/nand/nand/src/main.c index e5adccc6..0754124b 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/src/main.c +++ b/project/at_start_f403a/examples/xmc/nand/nand/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/nand/nand/src/xmc_nand.c b/project/at_start_f403a/examples/xmc/nand/nand/src/xmc_nand.c index 681ffe52..6901a7c1 100644 --- a/project/at_start_f403a/examples/xmc/nand/nand/src/xmc_nand.c +++ b/project/at_start_f403a/examples/xmc/nand/nand/src/xmc_nand.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file xmc_nand.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief nand configuration ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_clock.h b/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_conf.h b/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_conf.h index 6a38cd2a..e6784841 100644 --- a/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_int.h b/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/examples/xmc/psram/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/inc/xmc_psram.h b/project/at_start_f403a/examples/xmc/psram/inc/xmc_psram.h index b329a8d7..d5416d6b 100644 --- a/project/at_start_f403a/examples/xmc/psram/inc/xmc_psram.h +++ b/project/at_start_f403a/examples/xmc/psram/inc/xmc_psram.h @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file xmc_psram.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file for the psram configuration. ****************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/readme.txt b/project/at_start_f403a/examples/xmc/psram/readme.txt index 8a2b52a0..c5b5c27a 100644 --- a/project/at_start_f403a/examples/xmc/psram/readme.txt +++ b/project/at_start_f403a/examples/xmc/psram/readme.txt @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ****************************************************************************** */ diff --git a/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_clock.c b/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_clock.c index 168c2f68..4b058102 100644 --- a/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_int.c b/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_int.c index c23d48d6..f4c01a4c 100644 --- a/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_int.c +++ b/project/at_start_f403a/examples/xmc/psram/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/src/main.c b/project/at_start_f403a/examples/xmc/psram/src/main.c index b55daf7c..76df6fe9 100644 --- a/project/at_start_f403a/examples/xmc/psram/src/main.c +++ b/project/at_start_f403a/examples/xmc/psram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/examples/xmc/psram/src/xmc_psram.c b/project/at_start_f403a/examples/xmc/psram/src/xmc_psram.c index 29d896bb..c0c38b0e 100644 --- a/project/at_start_f403a/examples/xmc/psram/src/xmc_psram.c +++ b/project/at_start_f403a/examples/xmc/psram/src/xmc_psram.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file psram.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief psram configuration ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/templates/inc/at32f403a_407_clock.h b/project/at_start_f403a/templates/inc/at32f403a_407_clock.h index f6bfcdc0..3c5e402e 100644 --- a/project/at_start_f403a/templates/inc/at32f403a_407_clock.h +++ b/project/at_start_f403a/templates/inc/at32f403a_407_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/templates/inc/at32f403a_407_conf.h b/project/at_start_f403a/templates/inc/at32f403a_407_conf.h index 2a9f5b81..20a88391 100644 --- a/project/at_start_f403a/templates/inc/at32f403a_407_conf.h +++ b/project/at_start_f403a/templates/inc/at32f403a_407_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_conf.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief at32f403a_407 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/templates/inc/at32f403a_407_int.h b/project/at_start_f403a/templates/inc/at32f403a_407_int.h index b7fef3b4..047fcae0 100644 --- a/project/at_start_f403a/templates/inc/at32f403a_407_int.h +++ b/project/at_start_f403a/templates/inc/at32f403a_407_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.h - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/templates/mdk_v4/template.uvproj b/project/at_start_f403a/templates/mdk_v4/template.uvproj index 56d5bf05..07f531b9 100644 --- a/project/at_start_f403a/templates/mdk_v4/template.uvproj +++ b/project/at_start_f403a/templates/mdk_v4/template.uvproj @@ -362,7 +362,7 @@ AT32F403AVGT7,USE_STDPERIPH_DRIVER,AT_START_F403A_V1 - ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\..\templates\inc;..\..\..\at32f403a_407_board + ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\at32f403a_407_board diff --git a/project/at_start_f403a/templates/mdk_v5/template.uvprojx b/project/at_start_f403a/templates/mdk_v5/template.uvprojx index 43bfd272..8bda08d4 100644 --- a/project/at_start_f403a/templates/mdk_v5/template.uvprojx +++ b/project/at_start_f403a/templates/mdk_v5/template.uvprojx @@ -338,7 +338,7 @@ AT32F403AVGT7,USE_STDPERIPH_DRIVER,AT_START_F403A_V1 - ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\..\templates\inc;..\..\..\at32f403a_407_board + ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\at32f403a_407_board diff --git a/project/at_start_f403a/templates/readme.txt b/project/at_start_f403a/templates/readme.txt index b56a04be..451d3dbf 100644 --- a/project/at_start_f403a/templates/readme.txt +++ b/project/at_start_f403a/templates/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f403a/templates/src/at32f403a_407_clock.c b/project/at_start_f403a/templates/src/at32f403a_407_clock.c index 561bc11d..6d2d9e15 100644 --- a/project/at_start_f403a/templates/src/at32f403a_407_clock.c +++ b/project/at_start_f403a/templates/src/at32f403a_407_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_clock.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/templates/src/at32f403a_407_int.c b/project/at_start_f403a/templates/src/at32f403a_407_int.c index d84b32d4..b83e028d 100644 --- a/project/at_start_f403a/templates/src/at32f403a_407_int.c +++ b/project/at_start_f403a/templates/src/at32f403a_407_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f403a_407_int.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a/templates/src/main.c b/project/at_start_f403a/templates/src/main.c index ec165c5a..e0e44798 100644 --- a/project/at_start_f403a/templates/src/main.c +++ b/project/at_start_f403a/templates/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.6 - * @date 2021-12-31 + * @version v2.0.7 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f403a_Example_list.htm b/project/at_start_f403a_Example_list.htm index dc1fa78e..09908722 100644 --- a/project/at_start_f403a_Example_list.htm +++ b/project/at_start_f403a_Example_list.htm @@ -53,7 +53,7 @@ div.WordSection1
+ style='width:580.0pt;margin-left:-.15pt;border-collapse:collapse'> - + + + + + - + + + + +
@@ -2133,7 +2133,7 @@ div.WordSection1

99

virtual_comport

+
+

USBת´®¿Ú

+
+

109

+
+

virtual_msc_iap

109

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>110

110

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>111

111

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>112

112

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>113

113

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>114

114

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>115

106

virtual_comport

+
+

USBת´®¿Ú

+
+

116

+
+

virtual_msc_iap

116

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>117

117

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>118

118

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>119

119

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>120

120

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>121

121

+ style='font-size:11.0pt;font-family:·ÂËÎ;color:black'>122