diff --git a/AT32F413_periph_lib_V2.0.2.chm b/AT32F413_periph_lib_V2.0.3.chm similarity index 60% rename from AT32F413_periph_lib_V2.0.2.chm rename to AT32F413_periph_lib_V2.0.3.chm index dd820eb..a07d25b 100644 Binary files a/AT32F413_periph_lib_V2.0.2.chm and b/AT32F413_periph_lib_V2.0.3.chm differ diff --git a/document/ReleaseNotes_AT32F413_Firmware_Library.pdf b/document/ReleaseNotes_AT32F413_Firmware_Library.pdf index 35e77ec..9044be1 100644 Binary files a/document/ReleaseNotes_AT32F413_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F413_Firmware_Library.pdf differ diff --git a/libraries/cmsis/cm4/device_support/at32f413.h b/libraries/cmsis/cm4/device_support/at32f413.h index a669d24..15e10f4 100644 --- a/libraries/cmsis/cm4/device_support/at32f413.h +++ b/libraries/cmsis/cm4/device_support/at32f413.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 header file ************************************************************************** * Copyright notice & Disclaimer @@ -87,7 +87,7 @@ extern "C" { */ #define __AT32F413_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F413_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */ -#define __AT32F413_LIBRARY_VERSION_MINOR (0x02) /*!< [15:8] minor version */ +#define __AT32F413_LIBRARY_VERSION_MINOR (0x03) /*!< [15:8] minor version */ #define __AT32F413_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F413_LIBRARY_VERSION ((__AT32F413_LIBRARY_VERSION_MAJOR << 24) | \ (__AT32F413_LIBRARY_VERSION_MIDDLE << 16) | \ diff --git a/libraries/cmsis/cm4/device_support/at32f413_conf_template.h b/libraries/cmsis/cm4/device_support/at32f413_conf_template.h index 4c16bce..7fdd3d1 100644 --- a/libraries/cmsis/cm4/device_support/at32f413_conf_template.h +++ b/libraries/cmsis/cm4/device_support/at32f413_conf_template.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s index 8d0e880..e22ccad 100644 --- a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s +++ b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f413.s @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file startup_at32f413.s - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413xx devices vector table for gcc toolchain. * this module performs: * - set the initial sp diff --git a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s index 5a5c81a..10054d1 100644 --- a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s +++ b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f413.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f413.s -;* @version v2.0.2 -;* @date 2021-12-31 +;* @version v2.0.3 +;* @date 2022-02-11 ;* @brief at32f413 startup file for IAR Systems ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s index c542730..f75513b 100644 --- a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s +++ b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f413.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.2 -;* @date 2021-12-31 +;* @version v2.0.3 +;* @date 2022-02-11 ;* @brief at32f403a_407 startup file for keil ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/system_at32f413.c b/libraries/cmsis/cm4/device_support/system_at32f413.c index b6c7cc9..6afa595 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f413.c +++ b/libraries/cmsis/cm4/device_support/system_at32f413.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f413.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_at32f413.h b/libraries/cmsis/cm4/device_support/system_at32f413.h index 931976a..a4eeaee 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f413.h +++ b/libraries/cmsis/cm4/device_support/system_at32f413.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f413.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief cmsis cortex-m4 system header file. ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_acc.h b/libraries/drivers/inc/at32f413_acc.h index 1342fdb..0956d2c 100644 --- a/libraries/drivers/inc/at32f413_acc.h +++ b/libraries/drivers/inc/at32f413_acc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_acc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 acc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_adc.h b/libraries/drivers/inc/at32f413_adc.h index f1575e7..d51fa6b 100644 --- a/libraries/drivers/inc/at32f413_adc.h +++ b/libraries/drivers/inc/at32f413_adc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_adc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 adc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_bpr.h b/libraries/drivers/inc/at32f413_bpr.h index 549f853..9c5bde6 100644 --- a/libraries/drivers/inc/at32f413_bpr.h +++ b/libraries/drivers/inc/at32f413_bpr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_bpr.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 bpr header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_can.h b/libraries/drivers/inc/at32f413_can.h index 79117db..df3ed93 100644 --- a/libraries/drivers/inc/at32f413_can.h +++ b/libraries/drivers/inc/at32f413_can.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_can.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 can header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_crc.h b/libraries/drivers/inc/at32f413_crc.h index f74317d..db85076 100644 --- a/libraries/drivers/inc/at32f413_crc.h +++ b/libraries/drivers/inc/at32f413_crc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 crc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_crm.h b/libraries/drivers/inc/at32f413_crm.h index 2164a47..53b59d6 100644 --- a/libraries/drivers/inc/at32f413_crm.h +++ b/libraries/drivers/inc/at32f413_crm.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crm.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 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/at32f413_debug.h b/libraries/drivers/inc/at32f413_debug.h index 4dae0ea..afe2a07 100644 --- a/libraries/drivers/inc/at32f413_debug.h +++ b/libraries/drivers/inc/at32f413_debug.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_debug.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 debug header file ************************************************************************** * Copyright notice & Disclaimer @@ -115,14 +115,14 @@ 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 tmr8_pause : 1;/* [17] */ + __IO uint32_t tmr5_pause : 1;/* [18] */ __IO uint32_t reserved2 : 2;/* [20:19] */ __IO uint32_t can2_pause : 1;/* [21] */ __IO uint32_t reserved3 : 6;/* [27:22] */ - __IO uint32_t tim9_pause : 1;/* [28] */ - __IO uint32_t tim10_pause : 1;/* [29] */ - __IO uint32_t tim11_pause : 1;/* [30] */ + __IO uint32_t tmr9_pause : 1;/* [28] */ + __IO uint32_t tmr10_pause : 1;/* [29] */ + __IO uint32_t tmr11_pause : 1;/* [30] */ __IO uint32_t reserved4 : 1;/* [31] */ } ctrl_bit; }; diff --git a/libraries/drivers/inc/at32f413_def.h b/libraries/drivers/inc/at32f413_def.h index 4ed8de0..5dcc52a 100644 --- a/libraries/drivers/inc/at32f413_def.h +++ b/libraries/drivers/inc/at32f413_def.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_def.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 macros header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_dma.h b/libraries/drivers/inc/at32f413_dma.h index 3dad222..802d38f 100644 --- a/libraries/drivers/inc/at32f413_dma.h +++ b/libraries/drivers/inc/at32f413_dma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_dma.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 dma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_exint.h b/libraries/drivers/inc/at32f413_exint.h index ce8dc38..6c6ba0d 100644 --- a/libraries/drivers/inc/at32f413_exint.h +++ b/libraries/drivers/inc/at32f413_exint.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_exint.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 exint header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_flash.h b/libraries/drivers/inc/at32f413_flash.h index 208cc5c..4b93e57 100644 --- a/libraries/drivers/inc/at32f413_flash.h +++ b/libraries/drivers/inc/at32f413_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_flash.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_gpio.h b/libraries/drivers/inc/at32f413_gpio.h index c6d4135..e656ee1 100644 --- a/libraries/drivers/inc/at32f413_gpio.h +++ b/libraries/drivers/inc/at32f413_gpio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_gpio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 gpio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_i2c.h b/libraries/drivers/inc/at32f413_i2c.h index ce02cd8..f58a2e2 100644 --- a/libraries/drivers/inc/at32f413_i2c.h +++ b/libraries/drivers/inc/at32f413_i2c.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_i2c.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 i2c header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_misc.h b/libraries/drivers/inc/at32f413_misc.h index 6a348b7..becf596 100644 --- a/libraries/drivers/inc/at32f413_misc.h +++ b/libraries/drivers/inc/at32f413_misc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_misc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 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/at32f413_pwc.h b/libraries/drivers/inc/at32f413_pwc.h index 1781fbf..c369dde 100644 --- a/libraries/drivers/inc/at32f413_pwc.h +++ b/libraries/drivers/inc/at32f413_pwc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_pwc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 pwc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_rtc.h b/libraries/drivers/inc/at32f413_rtc.h index 53bcd23..1f4f766 100644 --- a/libraries/drivers/inc/at32f413_rtc.h +++ b/libraries/drivers/inc/at32f413_rtc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_rtc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 rtc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_sdio.h b/libraries/drivers/inc/at32f413_sdio.h index 3351283..9c493b1 100644 --- a/libraries/drivers/inc/at32f413_sdio.h +++ b/libraries/drivers/inc/at32f413_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_sdio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 sdio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_spi.h b/libraries/drivers/inc/at32f413_spi.h index 5afdfa8..a8c68a6 100644 --- a/libraries/drivers/inc/at32f413_spi.h +++ b/libraries/drivers/inc/at32f413_spi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_spi.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 spi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_tmr.h b/libraries/drivers/inc/at32f413_tmr.h index 2527b38..0517d2c 100644 --- a/libraries/drivers/inc/at32f413_tmr.h +++ b/libraries/drivers/inc/at32f413_tmr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_tmr.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 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/at32f413_usart.h b/libraries/drivers/inc/at32f413_usart.h index 8f5a66c..9a9e1e4 100644 --- a/libraries/drivers/inc/at32f413_usart.h +++ b/libraries/drivers/inc/at32f413_usart.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usart.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 usart header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_usb.h b/libraries/drivers/inc/at32f413_usb.h index c11c6dd..21a24ec 100644 --- a/libraries/drivers/inc/at32f413_usb.h +++ b/libraries/drivers/inc/at32f413_usb.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usb.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_wdt.h b/libraries/drivers/inc/at32f413_wdt.h index 7ead068..5aec00b 100644 --- a/libraries/drivers/inc/at32f413_wdt.h +++ b/libraries/drivers/inc/at32f413_wdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wdt.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 wdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f413_wwdt.h b/libraries/drivers/inc/at32f413_wwdt.h index 67bdd79..cd50f75 100644 --- a/libraries/drivers/inc/at32f413_wwdt.h +++ b/libraries/drivers/inc/at32f413_wwdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wwdt.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 wwdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_acc.c b/libraries/drivers/src/at32f413_acc.c index 9ddf947..bdb25db 100644 --- a/libraries/drivers/src/at32f413_acc.c +++ b/libraries/drivers/src/at32f413_acc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_acc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the acc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_adc.c b/libraries/drivers/src/at32f413_adc.c index 433b26f..d9f21db 100644 --- a/libraries/drivers/src/at32f413_adc.c +++ b/libraries/drivers/src/at32f413_adc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_adc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the adc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_bpr.c b/libraries/drivers/src/at32f413_bpr.c index 95cf1ec..1f30133 100644 --- a/libraries/drivers/src/at32f413_bpr.c +++ b/libraries/drivers/src/at32f413_bpr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_bpr.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the bpr firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_can.c b/libraries/drivers/src/at32f413_can.c index 942de04..6ea7c08 100644 --- a/libraries/drivers/src/at32f413_can.c +++ b/libraries/drivers/src/at32f413_can.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_can.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the can firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_crc.c b/libraries/drivers/src/at32f413_crc.c index 5b1495b..b041807 100644 --- a/libraries/drivers/src/at32f413_crc.c +++ b/libraries/drivers/src/at32f413_crc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the crc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_crm.c b/libraries/drivers/src/at32f413_crm.c index 3cbaf8d..3fdeadb 100644 --- a/libraries/drivers/src/at32f413_crm.c +++ b/libraries/drivers/src/at32f413_crm.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_crm.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the crm firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -317,6 +317,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 @@ -336,6 +337,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/at32f413_debug.c b/libraries/drivers/src/at32f413_debug.c index e456fe3..4601258 100644 --- a/libraries/drivers/src/at32f413_debug.c +++ b/libraries/drivers/src/at32f413_debug.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_debug.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the debug firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_dma.c b/libraries/drivers/src/at32f413_dma.c index 4d63f1b..8334c7b 100644 --- a/libraries/drivers/src/at32f413_dma.c +++ b/libraries/drivers/src/at32f413_dma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_dma.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the dma firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_exint.c b/libraries/drivers/src/at32f413_exint.c index ca19584..c800700 100644 --- a/libraries/drivers/src/at32f413_exint.c +++ b/libraries/drivers/src/at32f413_exint.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_exint.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the exint firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_flash.c b/libraries/drivers/src/at32f413_flash.c index 060751a..7cf2e30 100644 --- a/libraries/drivers/src/at32f413_flash.c +++ b/libraries/drivers/src/at32f413_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_flash.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the flash firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_gpio.c b/libraries/drivers/src/at32f413_gpio.c index 2a94bb7..413d664 100644 --- a/libraries/drivers/src/at32f413_gpio.c +++ b/libraries/drivers/src/at32f413_gpio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_gpio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the gpio firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_i2c.c b/libraries/drivers/src/at32f413_i2c.c index 81a3eef..0db5daa 100644 --- a/libraries/drivers/src/at32f413_i2c.c +++ b/libraries/drivers/src/at32f413_i2c.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_i2c.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the i2c firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_misc.c b/libraries/drivers/src/at32f413_misc.c index ae04a3a..88130c8 100644 --- a/libraries/drivers/src/at32f413_misc.c +++ b/libraries/drivers/src/at32f413_misc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_misc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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/at32f413_pwc.c b/libraries/drivers/src/at32f413_pwc.c index f233879..97d8dba 100644 --- a/libraries/drivers/src/at32f413_pwc.c +++ b/libraries/drivers/src/at32f413_pwc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_pwc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the pwc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_rtc.c b/libraries/drivers/src/at32f413_rtc.c index 7ee7ab5..1da1728 100644 --- a/libraries/drivers/src/at32f413_rtc.c +++ b/libraries/drivers/src/at32f413_rtc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_rtc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the rtc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_sdio.c b/libraries/drivers/src/at32f413_sdio.c index bf8ead9..38eb545 100644 --- a/libraries/drivers/src/at32f413_sdio.c +++ b/libraries/drivers/src/at32f413_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_sdio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the sdio firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_spi.c b/libraries/drivers/src/at32f413_spi.c index ec2deba..5d30eac 100644 --- a/libraries/drivers/src/at32f413_spi.c +++ b/libraries/drivers/src/at32f413_spi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_spi.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the spi firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_tmr.c b/libraries/drivers/src/at32f413_tmr.c index bfff19c..6b9dd12 100644 --- a/libraries/drivers/src/at32f413_tmr.c +++ b/libraries/drivers/src/at32f413_tmr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_tmr.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the tmr firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_usart.c b/libraries/drivers/src/at32f413_usart.c index 19216a3..7ad0dc4 100644 --- a/libraries/drivers/src/at32f413_usart.c +++ b/libraries/drivers/src/at32f413_usart.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usart.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the usart firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_usb.c b/libraries/drivers/src/at32f413_usb.c index f51b96c..e74eba2 100644 --- a/libraries/drivers/src/at32f413_usb.c +++ b/libraries/drivers/src/at32f413_usb.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_usb.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_wdt.c b/libraries/drivers/src/at32f413_wdt.c index 3a37452..93529c8 100644 --- a/libraries/drivers/src/at32f413_wdt.c +++ b/libraries/drivers/src/at32f413_wdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wdt.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the wdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f413_wwdt.c b/libraries/drivers/src/at32f413_wwdt.c index b203f90..061212e 100644 --- a/libraries/drivers/src/at32f413_wwdt.c +++ b/libraries/drivers/src/at32f413_wwdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_wwdt.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the wwdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/i2c_application_library/i2c_application.c b/middlewares/i2c_application_library/i2c_application.c index a3b7c20..fc65520 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 ff37b7b..d832fe0 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 4e65ffa..d855bba 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 84c6ce3..757d8ad 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 7b8583f..87dac6b 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 effe508..534c2dd 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 154347a..ba98dbb 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 50634e5..66a4df2 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 f17d217..bf90788 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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,26 +445,28 @@ 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)) { - + } return status; @@ -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 7a953ac..8fa3aa1 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 bcfcd9e..647d140 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 01e38ef..f8c3f72 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 08ad56e..ba35afd 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 eaed734..8d4bc13 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 2331886..ad41ca4 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 5b46683..2dab14f 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 45ade0f..46e19d7 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 7547fda..28ab375 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 f0ac52d..01d09df 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 b9eecd6..639192e 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 1349d3c..c02bcc2 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 41f720d..50405f4 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 24b9cce..6b4d715 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 ae987ca..6709521 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 c4b85de..e3410d4 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 35ca748..450926a 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 AT32F413_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 11d76f7..7ca872d 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 AT32F413_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 96fc5ab..0dc0096 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 63542ea..03faffd 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 a08d43c..c0fd6d1 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 f48a4a5..b5715f0 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 468b9b1..2b6b43d 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 e4e6738..33d8624 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 5e62997..1ce5225 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 1a3073e..9cab4dc 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 2bdbd8f..dafc6c2 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 ce09a1c..ce3c340 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 @@ -113,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); } /** @@ -129,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); } /** @@ -145,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) @@ -172,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); @@ -195,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 @@ -215,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); } } } @@ -241,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); @@ -261,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); } @@ -298,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; @@ -314,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); } } @@ -338,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; } @@ -359,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; @@ -368,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 { @@ -378,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; } @@ -395,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; } @@ -407,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; } @@ -420,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; } @@ -438,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; } @@ -455,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; } @@ -480,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; } @@ -515,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) @@ -524,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; } @@ -543,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; } @@ -569,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; @@ -629,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; @@ -699,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); } @@ -719,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 674866b..324cda4 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 edcc369..13b7c14 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 c726fab..aa9b42e 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 6d6a5dd..9a9e2a9 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 b668d85..9c8cbe5 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 1d2f217..216265e 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 c5ec794..5177ac4 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 84095fa..55c19a6 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 b574792..d24c706 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 d0cea88..9c29a18 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 edd31f9..12d5494 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 25bc896..65d4de2 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 73b7f2f..229c068 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 7917578..cfa9665 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb driver ************************************************************************** * Copyright notice & Disclaimer @@ -636,6 +636,7 @@ void usbd_ept_defaut_init(usbd_core_type *udev) 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].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 6b1a3eb..d948cf9 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 d443f8f..ea99f98 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.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb standard device request ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at32f413_board/at32f413_board.c b/project/at32f413_board/at32f413_board.c index f20c0fa..27e87e9 100644 --- a/project/at32f413_board/at32f413_board.c +++ b/project/at32f413_board/at32f413_board.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_board.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief set of firmware functions to manage leds and push-button. * initialize delay function. ************************************************************************** diff --git a/project/at32f413_board/at32f413_board.h b/project/at32f413_board/at32f413_board.h index 2815642..b212b99 100644 --- a/project/at32f413_board/at32f413_board.h +++ b/project/at32f413_board/at32f413_board.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_board.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/acc/calibration/inc/at32f413_clock.h b/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/acc/calibration/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h b/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/acc/calibration/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h b/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h +++ b/project/at_start_f413/examples/acc/calibration/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h b/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h index 09eca4b..9742bf2 100644 --- a/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h +++ b/project/at_start_f413/examples/acc/calibration/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/readme.txt b/project/at_start_f413/examples/acc/calibration/readme.txt index 4cff378..c630c0a 100644 --- a/project/at_start_f413/examples/acc/calibration/readme.txt +++ b/project/at_start_f413/examples/acc/calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c b/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c +++ b/project/at_start_f413/examples/acc/calibration/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c b/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c index 4580dd8..9488a02 100644 --- a/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c +++ b/project/at_start_f413/examples/acc/calibration/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/acc/calibration/src/main.c b/project/at_start_f413/examples/acc/calibration/src/main.c index 11efec6..f7b4729 100644 --- a/project/at_start_f413/examples/acc/calibration/src/main.c +++ b/project/at_start_f413/examples/acc/calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt index 5f869ae..3d5c35a 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c index 33ca8b5..b5fb3bf 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c index 4a536fb..b3df400 100644 --- a/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c +++ b/project/at_start_f413/examples/adc/combine_mode_ordinary_simult/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/current_vref_value_check/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt index 6d1c309..36c060b 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt +++ b/project/at_start_f413/examples/adc/current_vref_value_check/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c index 4ad4b9e..54e82b8 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c b/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c index 7430354..758a0f8 100644 --- a/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c +++ b/project/at_start_f413/examples/adc/current_vref_value_check/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt index 2ee3cd3..c816c87 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c index 7495fe3..58c73b7 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c index ac15851..ea62208 100644 --- a/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c +++ b/project/at_start_f413/examples/adc/exint_trigger_partitioned/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt index c40c8cf..fd593cc 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c index 11fb49f..c8aff47 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c index 9caa370..1f3102f 100644 --- a/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c +++ b/project/at_start_f413/examples/adc/internal_temperature_sensor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt index b263019..7abcb11 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c index d523918..dd8cf4b 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c b/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c index 438eb6a..75e450c 100644 --- a/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c +++ b/project/at_start_f413/examples/adc/software_trigger_repeat/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt index 5a6a7fe..7e54ea9 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c index 3c61d0a..72dafab 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c index 8b426f9..4de97e9 100644 --- a/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c +++ b/project/at_start_f413/examples/adc/tmr_trigger_automatic_preempted/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h +++ b/project/at_start_f413/examples/adc/voltage_monitoring/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt index ba682b7..6cd4ce2 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt +++ b/project/at_start_f413/examples/adc/voltage_monitoring/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c +++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c index e08886b..2bf6931 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c +++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c b/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c index 715e5ef..dfc69fc 100644 --- a/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c +++ b/project/at_start_f413/examples/adc/voltage_monitoring/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h +++ b/project/at_start_f413/examples/bpr/bpr_data/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/readme.txt b/project/at_start_f413/examples/bpr/bpr_data/readme.txt index 1c9008c..3da79f2 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/readme.txt +++ b/project/at_start_f413/examples/bpr/bpr_data/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c +++ b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c index 47d7eb9..10b566d 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c +++ b/project/at_start_f413/examples/bpr/bpr_data/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/bpr_data/src/main.c b/project/at_start_f413/examples/bpr/bpr_data/src/main.c index 9cf6f91..6d0beb9 100644 --- a/project/at_start_f413/examples/bpr/bpr_data/src/main.c +++ b/project/at_start_f413/examples/bpr/bpr_data/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h +++ b/project/at_start_f413/examples/bpr/tamper/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/readme.txt b/project/at_start_f413/examples/bpr/tamper/readme.txt index bd1cbd9..23eca5c 100644 --- a/project/at_start_f413/examples/bpr/tamper/readme.txt +++ b/project/at_start_f413/examples/bpr/tamper/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c b/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c +++ b/project/at_start_f413/examples/bpr/tamper/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c b/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c index 3f6b0d6..2b3a6c3 100644 --- a/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c +++ b/project/at_start_f413/examples/bpr/tamper/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/bpr/tamper/src/main.c b/project/at_start_f413/examples/bpr/tamper/src/main.c index 1500087..c5b9267 100644 --- a/project/at_start_f413/examples/bpr/tamper/src/main.c +++ b/project/at_start_f413/examples/bpr/tamper/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h +++ b/project/at_start_f413/examples/can/communication_mode/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/readme.txt b/project/at_start_f413/examples/can/communication_mode/readme.txt index b595eb9..eb27e14 100644 --- a/project/at_start_f413/examples/can/communication_mode/readme.txt +++ b/project/at_start_f413/examples/can/communication_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c b/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c +++ b/project/at_start_f413/examples/can/communication_mode/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c b/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c index 976b593..741e7fa 100644 --- a/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c +++ b/project/at_start_f413/examples/can/communication_mode/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/communication_mode/src/main.c b/project/at_start_f413/examples/can/communication_mode/src/main.c index c181dbe..3c36792 100644 --- a/project/at_start_f413/examples/can/communication_mode/src/main.c +++ b/project/at_start_f413/examples/can/communication_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h b/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/can/filter/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h b/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/can/filter/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/inc/at32f413_int.h b/project/at_start_f413/examples/can/filter/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/can/filter/inc/at32f413_int.h +++ b/project/at_start_f413/examples/can/filter/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/readme.txt b/project/at_start_f413/examples/can/filter/readme.txt index 5ffdcfc..7bd66ec 100644 --- a/project/at_start_f413/examples/can/filter/readme.txt +++ b/project/at_start_f413/examples/can/filter/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/can/filter/src/at32f413_clock.c b/project/at_start_f413/examples/can/filter/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/can/filter/src/at32f413_clock.c +++ b/project/at_start_f413/examples/can/filter/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/src/at32f413_int.c b/project/at_start_f413/examples/can/filter/src/at32f413_int.c index 3398f44..d5e9aef 100644 --- a/project/at_start_f413/examples/can/filter/src/at32f413_int.c +++ b/project/at_start_f413/examples/can/filter/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/filter/src/main.c b/project/at_start_f413/examples/can/filter/src/main.c index 2e3765f..7899fc0 100644 --- a/project/at_start_f413/examples/can/filter/src/main.c +++ b/project/at_start_f413/examples/can/filter/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h +++ b/project/at_start_f413/examples/can/loopback_mode/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/readme.txt b/project/at_start_f413/examples/can/loopback_mode/readme.txt index b66f3bb..bf36013 100644 --- a/project/at_start_f413/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f413/examples/can/loopback_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c +++ b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c index 1284e85..b331f80 100644 --- a/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c +++ b/project/at_start_f413/examples/can/loopback_mode/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/can/loopback_mode/src/main.c b/project/at_start_f413/examples/can/loopback_mode/src/main.c index 2aa6fa0..78064be 100644 --- a/project/at_start_f413/examples/can/loopback_mode/src/main.c +++ b/project/at_start_f413/examples/can/loopback_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h +++ b/project/at_start_f413/examples/cortex_m4/bit_band/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt index c45bbae..3744742 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt +++ b/project/at_start_f413/examples/cortex_m4/bit_band/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c +++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c index 805b81e..55b8aee 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c +++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c b/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c index 49ce38d..5f4ac85 100644 --- a/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c +++ b/project/at_start_f413/examples/cortex_m4/bit_band/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h b/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h index 79344e4..012e627 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h +++ b/project/at_start_f413/examples/cortex_m4/fpu/inc/julia_fpu.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file julia_fpu.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief julia_fpu header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/readme.txt b/project/at_start_f413/examples/cortex_m4/fpu/readme.txt index 8965339..923ee9c 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/readme.txt +++ b/project/at_start_f413/examples/cortex_m4/fpu/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c index bac2b4c..dbbee5a 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c b/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c index d89040d..3ea4b49 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/julia_fpu.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file julia_fpu.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief julia_fpu source file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/fpu/src/main.c b/project/at_start_f413/examples/cortex_m4/fpu/src/main.c index 6e81563..da6062b 100644 --- a/project/at_start_f413/examples/cortex_m4/fpu/src/main.c +++ b/project/at_start_f413/examples/cortex_m4/fpu/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt b/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt index 6feaa10..376936e 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c index 9423d07..a97d247 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c index 7ef4b83..e8b0e1d 100644 --- a/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c +++ b/project/at_start_f413/examples/cortex_m4/systick_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h b/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/crc/calculation/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h b/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/crc/calculation/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h b/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h +++ b/project/at_start_f413/examples/crc/calculation/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/readme.txt b/project/at_start_f413/examples/crc/calculation/readme.txt index 8b9e029..c44e902 100644 --- a/project/at_start_f413/examples/crc/calculation/readme.txt +++ b/project/at_start_f413/examples/crc/calculation/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c b/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c +++ b/project/at_start_f413/examples/crc/calculation/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c b/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c index 0d77a25..3879a0b 100644 --- a/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c +++ b/project/at_start_f413/examples/crc/calculation/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crc/calculation/src/main.c b/project/at_start_f413/examples/crc/calculation/src/main.c index d1ebd87..b8c3c9f 100644 --- a/project/at_start_f413/examples/crc/calculation/src/main.c +++ b/project/at_start_f413/examples/crc/calculation/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h +++ b/project/at_start_f413/examples/crm/clock_failure_detection/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt b/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt index eea42a5..32394ce 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt +++ b/project/at_start_f413/examples/crm/clock_failure_detection/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c +++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c index b90b75e..ce3f4ac 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c +++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c b/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c index 4b26445..198c94d 100644 --- a/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c +++ b/project/at_start_f413/examples/crm/clock_failure_detection/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h +++ b/project/at_start_f413/examples/crm/sysclk_switch/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/readme.txt b/project/at_start_f413/examples/crm/sysclk_switch/readme.txt index cb845af..af3d8c3 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/readme.txt +++ b/project/at_start_f413/examples/crm/sysclk_switch/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c +++ b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c index ccdc64a..2cb5da0 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c +++ b/project/at_start_f413/examples/crm/sysclk_switch/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/crm/sysclk_switch/src/main.c b/project/at_start_f413/examples/crm/sysclk_switch/src/main.c index 11a43ac..00c1d2d 100644 --- a/project/at_start_f413/examples/crm/sysclk_switch/src/main.c +++ b/project/at_start_f413/examples/crm/sysclk_switch/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h +++ b/project/at_start_f413/examples/debug/tmr1/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/readme.txt b/project/at_start_f413/examples/debug/tmr1/readme.txt index 56ae9eb..728b7b8 100644 --- a/project/at_start_f413/examples/debug/tmr1/readme.txt +++ b/project/at_start_f413/examples/debug/tmr1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c b/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c +++ b/project/at_start_f413/examples/debug/tmr1/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c b/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c index d5252e2..991d290 100644 --- a/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c +++ b/project/at_start_f413/examples/debug/tmr1/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/debug/tmr1/src/main.c b/project/at_start_f413/examples/debug/tmr1/src/main.c index bee754c..cca436a 100644 --- a/project/at_start_f413/examples/debug/tmr1/src/main.c +++ b/project/at_start_f413/examples/debug/tmr1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt b/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt index 4b7a984..14204e5 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c index 55a2393..561c524 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c index ef08774..dc0d035 100644 --- a/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c +++ b/project/at_start_f413/examples/dma/data_to_gpio_flexible/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h +++ b/project/at_start_f413/examples/dma/flash_to_sram/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/readme.txt b/project/at_start_f413/examples/dma/flash_to_sram/readme.txt index d382607..4a25a95 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/readme.txt +++ b/project/at_start_f413/examples/dma/flash_to_sram/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c +++ b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c index 00b749c..a6e70bb 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c +++ b/project/at_start_f413/examples/dma/flash_to_sram/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/dma/flash_to_sram/src/main.c b/project/at_start_f413/examples/dma/flash_to_sram/src/main.c index c227f4f..06fe15e 100644 --- a/project/at_start_f413/examples/dma/flash_to_sram/src/main.c +++ b/project/at_start_f413/examples/dma/flash_to_sram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h +++ b/project/at_start_f413/examples/exint/exint_config/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/readme.txt b/project/at_start_f413/examples/exint/exint_config/readme.txt index d361b1a..af043d6 100644 --- a/project/at_start_f413/examples/exint/exint_config/readme.txt +++ b/project/at_start_f413/examples/exint/exint_config/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c b/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c +++ b/project/at_start_f413/examples/exint/exint_config/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c b/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c index 81b68d3..9b0f67e 100644 --- a/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c +++ b/project/at_start_f413/examples/exint/exint_config/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_config/src/main.c b/project/at_start_f413/examples/exint/exint_config/src/main.c index 9cd036c..751b501 100644 --- a/project/at_start_f413/examples/exint/exint_config/src/main.c +++ b/project/at_start_f413/examples/exint/exint_config/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h +++ b/project/at_start_f413/examples/exint/exint_software_trigger/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx b/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx new file mode 100644 index 0000000..e4a4142 --- /dev/null +++ b/project/at_start_f413/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + exint_software_trigger + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c + at32f413_exint.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt b/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt index b43ade1..497040a 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt +++ b/project/at_start_f413/examples/exint/exint_software_trigger/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c +++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c index 05cfe11..5ef7e5b 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c +++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c b/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c index b27bedd..d989259 100644 --- a/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c +++ b/project/at_start_f413/examples/exint/exint_software_trigger/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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 / 19200) / 10000 = 1Hz(1s) */ - tmr_base_init(TMR1, 10000, 19200); + /* (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_f413/examples/flash/flash_write_read/inc/at32f413_clock.h b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h b/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h index c187535..20129b0 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h +++ b/project/at_start_f413/examples/flash/flash_write_read/inc/flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx b/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx new file mode 100644 index 0000000..8349732 --- /dev/null +++ b/project/at_start_f413/examples/flash/flash_write_read/mdk_v5/flash_write_read.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + flash_write_read + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\flash.c + flash.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c + at32f413_flash.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/flash/flash_write_read/readme.txt b/project/at_start_f413/examples/flash/flash_write_read/readme.txt index ea2c8db..fa488ca 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/readme.txt +++ b/project/at_start_f413/examples/flash/flash_write_read/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c index 4b4cad5..aeaa1b0 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/flash.c b/project/at_start_f413/examples/flash/flash_write_read/src/flash.c index eecd432..9405f0d 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/flash.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief flash program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/flash_write_read/src/main.c b/project/at_start_f413/examples/flash/flash_write_read/src/main.c index 0dd05db..9d65be4 100644 --- a/project/at_start_f413/examples/flash/flash_write_read/src/main.c +++ b/project/at_start_f413/examples/flash/flash_write_read/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h b/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h index 3d00de6..0cfcb2c 100644 --- a/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h +++ b/project/at_start_f413/examples/flash/operate_spim/inc/operate_spim.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file operate_spim.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief operate_spim header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvoptx b/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvoptx new file mode 100644 index 0000000..a202094 --- /dev/null +++ b/project/at_start_f413/examples/flash/operate_spim/mdk_v5/operate_spim.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + operate_spim + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\operate_spim.c + operate_spim.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c + at32f413_flash.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/flash/operate_spim/readme.txt b/project/at_start_f413/examples/flash/operate_spim/readme.txt index 00aac39..333384e 100644 --- a/project/at_start_f413/examples/flash/operate_spim/readme.txt +++ b/project/at_start_f413/examples/flash/operate_spim/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c index 011595a..e010c30 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/src/main.c b/project/at_start_f413/examples/flash/operate_spim/src/main.c index 6df6194..8d80601 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/main.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c b/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c index 9e52cde..0acf075 100644 --- a/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c +++ b/project/at_start_f413/examples/flash/operate_spim/src/operate_spim.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file operate_spim.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief operate spim program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h b/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h index a61d20d..f71933e 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h +++ b/project/at_start_f413/examples/flash/run_in_spim/inc/run_in_spim.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file run_in_spim.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief run_in_spim header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx new file mode 100644 index 0000000..030cf5b --- /dev/null +++ b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + run_in_spim + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\run_in_spim.c + run_in_spim.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c + at32f413_flash.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx index 8269793..a1cb481 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx +++ b/project/at_start_f413/examples/flash/run_in_spim/mdk_v5/run_in_spim.uvprojx @@ -259,8 +259,8 @@ 1 - 0x8500000 - 0x700000 + 0x0 + 0x0 1 diff --git a/project/at_start_f413/examples/flash/run_in_spim/readme.txt b/project/at_start_f413/examples/flash/run_in_spim/readme.txt index 490f4dc..250f6a6 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/readme.txt +++ b/project/at_start_f413/examples/flash/run_in_spim/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c index a60da3d..bf498e9 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/main.c b/project/at_start_f413/examples/flash/run_in_spim/src/main.c index 407d5f8..0e60b31 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/main.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c b/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c index cc46b05..6d236a1 100644 --- a/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c +++ b/project/at_start_f413/examples/flash/run_in_spim/src/run_in_spim.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file run_in_spim.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief run in spim program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h +++ b/project/at_start_f413/examples/gpio/led_toggle/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx b/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx new file mode 100644 index 0000000..64bd6d8 --- /dev/null +++ b/project/at_start_f413/examples/gpio/led_toggle/mdk_v5/led_toggle.uvoptx @@ -0,0 +1,344 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + led_toggle + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 11 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/gpio/led_toggle/readme.txt b/project/at_start_f413/examples/gpio/led_toggle/readme.txt index 9dc3168..eeaea81 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/readme.txt +++ b/project/at_start_f413/examples/gpio/led_toggle/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c +++ b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c index d04f40d..376f39d 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c +++ b/project/at_start_f413/examples/gpio/led_toggle/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/led_toggle/src/main.c b/project/at_start_f413/examples/gpio/led_toggle/src/main.c index bdb1999..a5dc948 100644 --- a/project/at_start_f413/examples/gpio/led_toggle/src/main.c +++ b/project/at_start_f413/examples/gpio/led_toggle/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h +++ b/project/at_start_f413/examples/gpio/swjtag_remap/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx b/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx new file mode 100644 index 0000000..e871e88 --- /dev/null +++ b/project/at_start_f413/examples/gpio/swjtag_remap/mdk_v5/swjtag_remap.uvoptx @@ -0,0 +1,344 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + swjtag_remap + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 11 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt b/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt index f398d72..2cf5e27 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt +++ b/project/at_start_f413/examples/gpio/swjtag_remap/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c +++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c index 633c8c3..2a934e1 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c +++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c b/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c index 2088523..108f6f0 100644 --- a/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c +++ b/project/at_start_f413/examples/gpio/swjtag_remap/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/communication_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx b/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx new file mode 100644 index 0000000..478fc88 --- /dev/null +++ b/project/at_start_f413/examples/i2c/communication_dma/mdk_v5/communication_dma.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + communication_dma + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c + i2c_application.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c + at32f413_i2c.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2c/communication_dma/readme.txt b/project/at_start_f413/examples/i2c/communication_dma/readme.txt index d1d6aca..949f5bc 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/readme.txt +++ b/project/at_start_f413/examples/i2c/communication_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communicationdma/readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c index 2d79258..4d4492a 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/communication_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_dma/src/main.c b/project/at_start_f413/examples/i2c/communication_dma/src/main.c index 9b75543..e26f982 100644 --- a/project/at_start_f413/examples/i2c/communication_dma/src/main.c +++ b/project/at_start_f413/examples/i2c/communication_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/communication_int/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx b/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx new file mode 100644 index 0000000..c2ecbc0 --- /dev/null +++ b/project/at_start_f413/examples/i2c/communication_int/mdk_v5/communication_int.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + communication_int + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c + i2c_application.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c + at32f413_i2c.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2c/communication_int/readme.txt b/project/at_start_f413/examples/i2c/communication_int/readme.txt index 87909c9..402c548 100644 --- a/project/at_start_f413/examples/i2c/communication_int/readme.txt +++ b/project/at_start_f413/examples/i2c/communication_int/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communicationint/readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c index 9d67ec6..c98b4b4 100644 --- a/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/communication_int/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_int/src/main.c b/project/at_start_f413/examples/i2c/communication_int/src/main.c index 6b5bbbf..d7cafe4 100644 --- a/project/at_start_f413/examples/i2c/communication_int/src/main.c +++ b/project/at_start_f413/examples/i2c/communication_int/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/communication_poll/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx b/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx new file mode 100644 index 0000000..dd4852d --- /dev/null +++ b/project/at_start_f413/examples/i2c/communication_poll/mdk_v5/communication_poll.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + communication_poll + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c + i2c_application.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c + at32f413_i2c.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2c/communication_poll/readme.txt b/project/at_start_f413/examples/i2c/communication_poll/readme.txt index ba25a3f..28b5a3e 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/readme.txt +++ b/project/at_start_f413/examples/i2c/communication_poll/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file communication_poll/readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c index 4718dd3..afe1c0d 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/communication_poll/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/communication_poll/src/main.c b/project/at_start_f413/examples/i2c/communication_poll/src/main.c index 318d708..2a7b944 100644 --- a/project/at_start_f413/examples/i2c/communication_poll/src/main.c +++ b/project/at_start_f413/examples/i2c/communication_poll/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2c/eeprom/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx b/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx new file mode 100644 index 0000000..752e9e9 --- /dev/null +++ b/project/at_start_f413/examples/i2c/eeprom/mdk_v5/eeprom.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + eeprom + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\i2c_application_library\i2c_application.c + i2c_application.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_i2c.c + at32f413_i2c.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2c/eeprom/readme.txt b/project/at_start_f413/examples/i2c/eeprom/readme.txt index c75a358..f23faa9 100644 --- a/project/at_start_f413/examples/i2c/eeprom/readme.txt +++ b/project/at_start_f413/examples/i2c/eeprom/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file eeprom/readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c index 411d869..c35d8f7 100644 --- a/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2c/eeprom/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2c/eeprom/src/main.c b/project/at_start_f413/examples/i2c/eeprom/src/main.c index 9435e5e..ac6f084 100644 --- a/project/at_start_f413/examples/i2c/eeprom/src/main.c +++ b/project/at_start_f413/examples/i2c/eeprom/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx b/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx new file mode 100644 index 0000000..366d813 --- /dev/null +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/mdk_v5/halfduplex_dma.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + halfduplex_dma + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt b/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt index d60c785..23c4a81 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c index eb86be8..210a6a0 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c b/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c index 85be895..2ba97b9 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c +++ b/project/at_start_f413/examples/i2s/halfduplex_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx b/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx new file mode 100644 index 0000000..3b1296e --- /dev/null +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + halfduplex_interrupt + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt b/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt index db9c299..b640d69 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c index a01b033..f7839a4 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c index 40d946e..4a7e26f 100644 --- a/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c +++ b/project/at_start_f413/examples/i2s/halfduplex_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx new file mode 100644 index 0000000..52bc97a --- /dev/null +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/mdk_v5/spii2s_switch_halfduplex_polling.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + spii2s_switch_halfduplex_polling + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt index 2c8b6cc..0294cb1 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c index c84f7b7..7f05898 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c index 9b6f326..11803ae 100644 --- a/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c +++ b/project/at_start_f413/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvoptx b/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvoptx new file mode 100644 index 0000000..d6bd7a7 --- /dev/null +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/mdk_v5/deepsleep_rtc.uvoptx @@ -0,0 +1,392 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + deepsleep_rtc + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c + at32f413_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c + at32f413_bpr.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c + at32f413_rtc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 14 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 15 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt b/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt index 68a7f65..c0b3d6a 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c index 8c37c21..b5a9263 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c index b660727..063999b 100644 --- a/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c +++ b/project/at_start_f413/examples/pwc/deepsleep_rtc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx b/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx new file mode 100644 index 0000000..7d100f6 --- /dev/null +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/mdk_v5/power_voltage_monitor.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + power_voltage_monitor + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c + at32f413_exint.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt b/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt index 0bd388b..4ee1342 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c index 0c28515..61de37f 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c index 2f8c83a..e3fae1a 100644 --- a/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c +++ b/project/at_start_f413/examples/pwc/power_voltage_monitor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx b/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx new file mode 100644 index 0000000..a95265c --- /dev/null +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/mdk_v5/sleep_tmr2.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + sleep_tmr2 + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt b/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt index 0d07257..9b8bedd 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c index 8fdc823..7b49897 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c b/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c index 697c4bb..ae9723e 100644 --- a/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c +++ b/project/at_start_f413/examples/pwc/sleep_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -44,11 +44,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_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/sleep_usart1/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvoptx b/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvoptx new file mode 100644 index 0000000..1b6b285 --- /dev/null +++ b/project/at_start_f413/examples/pwc/sleep_usart1/mdk_v5/sleep_usart1.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + sleep_usart1 + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt b/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt index a2f6c1c..3d3b122 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt +++ b/project/at_start_f413/examples/pwc/sleep_usart1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c index 0925b2f..b7c3aeb 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c b/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c index e81ff1e..624b7dc 100644 --- a/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c +++ b/project/at_start_f413/examples/pwc/sleep_usart1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/standby_rtc/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvoptx b/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvoptx new file mode 100644 index 0000000..efbf1f0 --- /dev/null +++ b/project/at_start_f413/examples/pwc/standby_rtc/mdk_v5/standby_rtc.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + standby_rtc + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c + at32f413_bpr.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c + at32f413_rtc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/pwc/standby_rtc/readme.txt b/project/at_start_f413/examples/pwc/standby_rtc/readme.txt index 36b9a74..7777d6e 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/readme.txt +++ b/project/at_start_f413/examples/pwc/standby_rtc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c index abf8298..15ac196 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/standby_rtc/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_rtc/src/main.c b/project/at_start_f413/examples/pwc/standby_rtc/src/main.c index 5d03e87..dab5773 100644 --- a/project/at_start_f413/examples/pwc/standby_rtc/src/main.c +++ b/project/at_start_f413/examples/pwc/standby_rtc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx b/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx new file mode 100644 index 0000000..a62c2b6 --- /dev/null +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/mdk_v5/standby_wakeup_pin.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + standby_wakeup_pin + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt b/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt index aa05617..4e70cc0 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c index 9d934e7..b53b9d7 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c index 3d20b81..6a3bc15 100644 --- a/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c +++ b/project/at_start_f413/examples/pwc/standby_wakeup_pin/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/inc/rtc.h b/project/at_start_f413/examples/rtc/calendar/inc/rtc.h index b965e34..5442ac5 100644 --- a/project/at_start_f413/examples/rtc/calendar/inc/rtc.h +++ b/project/at_start_f413/examples/rtc/calendar/inc/rtc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file rtc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief this file provides template for calendar api. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/mdk_v5/calendar.uvoptx b/project/at_start_f413/examples/rtc/calendar/mdk_v5/calendar.uvoptx new file mode 100644 index 0000000..473d2f6 --- /dev/null +++ b/project/at_start_f413/examples/rtc/calendar/mdk_v5/calendar.uvoptx @@ -0,0 +1,392 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + calendar + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\rtc.c + rtc.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c + at32f413_rtc.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c + at32f413_bpr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 14 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 15 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/rtc/calendar/readme.txt b/project/at_start_f413/examples/rtc/calendar/readme.txt index 45b8159..1691e59 100644 --- a/project/at_start_f413/examples/rtc/calendar/readme.txt +++ b/project/at_start_f413/examples/rtc/calendar/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c b/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c +++ b/project/at_start_f413/examples/rtc/calendar/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c b/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c index ed0bf5b..7699453 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c +++ b/project/at_start_f413/examples/rtc/calendar/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/src/main.c b/project/at_start_f413/examples/rtc/calendar/src/main.c index 6ae50cd..991f87b 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/main.c +++ b/project/at_start_f413/examples/rtc/calendar/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/calendar/src/rtc.c b/project/at_start_f413/examples/rtc/calendar/src/rtc.c index 43c1628..db6f4c6 100644 --- a/project/at_start_f413/examples/rtc/calendar/src/rtc.c +++ b/project/at_start_f413/examples/rtc/calendar/src/rtc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file rtc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief this file provides template for calendar api. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h +++ b/project/at_start_f413/examples/rtc/lick_calibration/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/mdk_v5/lick_calibration.uvoptx b/project/at_start_f413/examples/rtc/lick_calibration/mdk_v5/lick_calibration.uvoptx new file mode 100644 index 0000000..98a01f2 --- /dev/null +++ b/project/at_start_f413/examples/rtc/lick_calibration/mdk_v5/lick_calibration.uvoptx @@ -0,0 +1,392 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + lick_calibration + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_rtc.c + at32f413_rtc.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_bpr.c + at32f413_bpr.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 14 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 15 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/rtc/lick_calibration/readme.txt b/project/at_start_f413/examples/rtc/lick_calibration/readme.txt index 7ca7003..3520495 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/readme.txt +++ b/project/at_start_f413/examples/rtc/lick_calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c +++ b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c index 62255bd..0b98cfa 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c +++ b/project/at_start_f413/examples/rtc/lick_calibration/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/rtc/lick_calibration/src/main.c b/project/at_start_f413/examples/rtc/lick_calibration/src/main.c index 0bdcab9..3339a3b 100644 --- a/project/at_start_f413/examples/rtc/lick_calibration/src/main.c +++ b/project/at_start_f413/examples/rtc/lick_calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h index 18b63ed..d32ebc4 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/mdk_v5/sd_mmc_card.uvoptx b/project/at_start_f413/examples/sdio/sd_mmc_card/mdk_v5/sd_mmc_card.uvoptx new file mode 100644 index 0000000..3d855f8 --- /dev/null +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/mdk_v5/sd_mmc_card.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + sd_mmc_card + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\at32_sdio.c + at32_sdio.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_sdio.c + at32f413_sdio.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt b/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt index fcd320e..967912f 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c index 8d7cc6c..e9fe9af 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c index 1a91d52..6f5dec4 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c b/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c index 5a62490..ea904ba 100644 --- a/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c +++ b/project/at_start_f413/examples/sdio/sd_mmc_card/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h index abab4d0..506c46b 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/mdk_v5/sdio_fatfs.uvoptx b/project/at_start_f413/examples/sdio/sdio_fatfs/mdk_v5/sdio_fatfs.uvoptx new file mode 100644 index 0000000..acf0288 --- /dev/null +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/mdk_v5/sdio_fatfs.uvoptx @@ -0,0 +1,436 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + sdio_fatfs + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\at32_sdio.c + at32_sdio.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + 1 + 5 + 1 + 0 + 0 + 0 + ..\src\diskio.c + diskio.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_sdio.c + at32f413_sdio.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 14 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + fatfs + 0 + 0 + 0 + 0 + + 5 + 15 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\3rd_party\fatfs\source\ff.c + ff.c + 0 + 0 + + + 5 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\3rd_party\fatfs\source\ffsystem.c + ffsystem.c + 0 + 0 + + + 5 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\3rd_party\fatfs\source\ffunicode.c + ffunicode.c + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 6 + 18 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt b/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt index e17e985..6b0fb9e 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c index 836638e..91a9c85 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32_sdio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c index 1f64ae6..f1006c9 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c b/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c index 70ede8b..1148cf0 100644 --- a/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c +++ b/project/at_start_f413/examples/sdio/sdio_fatfs/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx b/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx new file mode 100644 index 0000000..06c4b6e --- /dev/null +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/mdk_v5/crc_transfer_polling.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + crc_transfer_polling + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt b/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt index 4699c4f..97f0689 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c index 04b3a16..f2a16de 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c b/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c index 0295cbb..0592da1 100644 --- a/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c +++ b/project/at_start_f413/examples/spi/crc_transfer_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,6 +26,7 @@ #include "at32f413_board.h" #include "at32f413_clock.h" +#include /** @addtogroup AT32F413_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_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/fullduplex_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx b/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx new file mode 100644 index 0000000..07a26a7 --- /dev/null +++ b/project/at_start_f413/examples/spi/fullduplex_polling/mdk_v5/fullduplex_polling.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + fullduplex_polling + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt b/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt index ce2075e..7d2863b 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt +++ b/project/at_start_f413/examples/spi/fullduplex_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c index b6ac956..68d45b2 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c b/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c index b7e9727..12d3485 100644 --- a/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c +++ b/project/at_start_f413/examples/spi/fullduplex_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -26,6 +26,7 @@ #include "at32f413_board.h" #include "at32f413_clock.h" +#include /** @addtogroup AT32F413_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_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx b/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx new file mode 100644 index 0000000..3b1296e --- /dev/null +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/mdk_v5/halfduplex_interrupt.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + halfduplex_interrupt + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt b/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt index 5a4678e..8c1faf5 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c index 19e3e03..e7308ee 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c index 66cbf0e..800e2e1 100644 --- a/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c +++ b/project/at_start_f413/examples/spi/halfduplex_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx new file mode 100644 index 0000000..8055e54 --- /dev/null +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/mdk_v5/halfduplex_transceiver_switch.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + halfduplex_transceiver_switch + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt index 9b532cd..3809b02 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c index 0282a65..04a4204 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c index 563e374..8e651a0 100644 --- a/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c +++ b/project/at_start_f413/examples/spi/halfduplex_transceiver_switch/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx b/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx new file mode 100644 index 0000000..6afd594 --- /dev/null +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/mdk_v5/only_receive_mode_polling.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + only_receive_mode_polling + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt b/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt index 3650634..2d081e9 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c index 067e612..5d994ce 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c index 80c8ae7..55a03c3 100644 --- a/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c +++ b/project/at_start_f413/examples/spi/only_receive_mode_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx new file mode 100644 index 0000000..905c120 --- /dev/null +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/mdk_v5/use_jtagpin_hardwarecs_dma.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + use_jtagpin_hardwarecs_dma + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt index 57c6092..8bf522b 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c index 26e9a94..06d97fc 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c index b2506e0..8f00480 100644 --- a/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c +++ b/project/at_start_f413/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h b/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h index d5b5200..10e6440 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h +++ b/project/at_start_f413/examples/spi/w25q_flash/inc/spi_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file spi_flash.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of spi_flash ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/mdk_v5/w25q_flash.uvoptx b/project/at_start_f413/examples/spi/w25q_flash/mdk_v5/w25q_flash.uvoptx new file mode 100644 index 0000000..55ff205 --- /dev/null +++ b/project/at_start_f413/examples/spi/w25q_flash/mdk_v5/w25q_flash.uvoptx @@ -0,0 +1,380 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + w25q_flash + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\main.c + main.c + 0 + 0 + + + 1 + 3 + 1 + 0 + 0 + 0 + ..\src\spi_flash.c + spi_flash.c + 0 + 0 + + + 1 + 4 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_int.c + 0 + 0 + + + + + bsp + 0 + 0 + 0 + 0 + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_spi.c + at32f413_spi.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 14 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/spi/w25q_flash/readme.txt b/project/at_start_f413/examples/spi/w25q_flash/readme.txt index 774d3f1..50f9863 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/readme.txt +++ b/project/at_start_f413/examples/spi/w25q_flash/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c index 303deb9..fa3259e 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/main.c b/project/at_start_f413/examples/spi/w25q_flash/src/main.c index 4d44647..a673c70 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/main.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c b/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c index a64e1bc..7e0cfd6 100644 --- a/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c +++ b/project/at_start_f413/examples/spi/w25q_flash/src/spi_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file spi_flash.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s index 45794fa..4afe9b2 100644 --- a/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s +++ b/project/at_start_f413/examples/sram/extend_sram/iar_v8.2/startup_at32f413_ext_ram.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f413.s -;* @version v2.0.2 -;* @date 2021-12-31 +;* @version v2.0.3 +;* @date 2022-02-11 ;* @brief at32f413 startup file for IAR Systems ;************************************************************************** ; diff --git a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h +++ b/project/at_start_f413/examples/sram/extend_sram/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvoptx b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvoptx new file mode 100644 index 0000000..4ef1a94 --- /dev/null +++ b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/extend_sram.uvoptx @@ -0,0 +1,638 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + set_sram_64k + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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 + + + + + + + + + + + + + set_sram_32k + 0x4 + ARM-ADS + + 12000000 + + 0 + 1 + 1 + 0 + 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 + 0 + + 0 + + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + -1 + + + + + + + + + + + BIN\CMSIS_AGDI.dll + + + + 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 + + + + + + + + + + + + + set_sram_16k + 0x4 + ARM-ADS + + 12000000 + + 0 + 1 + 1 + 0 + 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 + 0 + + 0 + + 1 + 0 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 1 + 0 + 0 + -1 + + + + + + + + + + + BIN\CMSIS_AGDI.dll + + + + 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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c + at32f413_flash.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + .\startup_at32f413_ext_ram.s + startup_at32f413_ext_ram.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s index 52e6821..0567c35 100644 --- a/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s +++ b/project/at_start_f413/examples/sram/extend_sram/mdk_v5/startup_at32f413_ext_ram.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f403a_407.s -;* @version v2.0.2 -;* @date 2021-12-31 +;* @version v2.0.3 +;* @date 2022-02-11 ;* @brief at32f403a_407 startup file for keil ;************************************************************************** ; diff --git a/project/at_start_f413/examples/sram/extend_sram/readme.txt b/project/at_start_f413/examples/sram/extend_sram/readme.txt index a3a029f..3cd4b85 100644 --- a/project/at_start_f413/examples/sram/extend_sram/readme.txt +++ b/project/at_start_f413/examples/sram/extend_sram/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c +++ b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c index 7c057c7..bb7ba00 100644 --- a/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c +++ b/project/at_start_f413/examples/sram/extend_sram/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/sram/extend_sram/src/main.c b/project/at_start_f413/examples/sram/extend_sram/src/main.c index afa9773..b8d10c9 100644 --- a/project/at_start_f413/examples/sram/extend_sram/src/main.c +++ b/project/at_start_f413/examples/sram/extend_sram/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/6_steps/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx b/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx new file mode 100644 index 0000000..83e387c --- /dev/null +++ b/project/at_start_f413/examples/tmr/6_steps/mdk_v5/6_steps.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + 6_steps + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/tmr/6_steps/readme.txt b/project/at_start_f413/examples/tmr/6_steps/readme.txt index ac9791b..8ede473 100644 --- a/project/at_start_f413/examples/tmr/6_steps/readme.txt +++ b/project/at_start_f413/examples/tmr/6_steps/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c index bd62167..10c41d3 100644 --- a/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/6_steps/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/6_steps/src/main.c b/project/at_start_f413/examples/tmr/6_steps/src/main.c index 759bd77..82edf20 100644 --- a/project/at_start_f413/examples/tmr/6_steps/src/main.c +++ b/project/at_start_f413/examples/tmr/6_steps/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/7_pwm_output/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx b/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx new file mode 100644 index 0000000..817be2e --- /dev/null +++ b/project/at_start_f413/examples/tmr/7_pwm_output/mdk_v5/7_pwm_output.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + 7_pwm_output + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt b/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt index cba1b52..da6d392 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt +++ b/project/at_start_f413/examples/tmr/7_pwm_output/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c index 7b1765c..76d61e8 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c b/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c index 353d939..f7c15cd 100644 --- a/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c +++ b/project/at_start_f413/examples/tmr/7_pwm_output/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/cascade_synchro/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx b/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx new file mode 100644 index 0000000..c4dbac1 --- /dev/null +++ b/project/at_start_f413/examples/tmr/cascade_synchro/mdk_v5/cascade_synchro.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + cascade_synchro + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt b/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt index e7ae5cd..fb8e6aa 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt +++ b/project/at_start_f413/examples/tmr/cascade_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c index 3c3ed73..379b056 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c b/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c index 052bc60..97859f4 100644 --- a/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c +++ b/project/at_start_f413/examples/tmr/cascade_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/complementary_signals/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx b/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx new file mode 100644 index 0000000..f15534a --- /dev/null +++ b/project/at_start_f413/examples/tmr/complementary_signals/mdk_v5/complementary_signals.uvoptx @@ -0,0 +1,356 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + complementary_signals + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 12 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/tmr/complementary_signals/readme.txt b/project/at_start_f413/examples/tmr/complementary_signals/readme.txt index 3ed835b..6f88b3b 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/readme.txt +++ b/project/at_start_f413/examples/tmr/complementary_signals/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c index c23b7a9..1e5720a 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/complementary_signals/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/complementary_signals/src/main.c b/project/at_start_f413/examples/tmr/complementary_signals/src/main.c index 44fc34d..39b60aa 100644 --- a/project/at_start_f413/examples/tmr/complementary_signals/src/main.c +++ b/project/at_start_f413/examples/tmr/complementary_signals/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvoptx b/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvoptx new file mode 100644 index 0000000..fb80976 --- /dev/null +++ b/project/at_start_f413/examples/tmr/dma/mdk_v5/dma.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + dma + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/tmr/dma/readme.txt b/project/at_start_f413/examples/tmr/dma/readme.txt index ef7325d..5b9e8f3 100644 --- a/project/at_start_f413/examples/tmr/dma/readme.txt +++ b/project/at_start_f413/examples/tmr/dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c b/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c index 6d88393..4ef7ada 100644 --- a/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma/src/main.c b/project/at_start_f413/examples/tmr/dma/src/main.c index 1864eed..73918e0 100644 --- a/project/at_start_f413/examples/tmr/dma/src/main.c +++ b/project/at_start_f413/examples/tmr/dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/dma_burst/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx b/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx new file mode 100644 index 0000000..3e9d36a --- /dev/null +++ b/project/at_start_f413/examples/tmr/dma_burst/mdk_v5/dma_burst.uvoptx @@ -0,0 +1,368 @@ + + + + 1.0 + +
### uVision Project, (C) Keil Software
+ + + *.c + *.s*; *.src; *.a* + *.obj; *.o + *.lib + *.txt; *.h; *.inc + *.plm + *.cpp + 0 + + + + 0 + 0 + + + + dma_burst + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_tmr.c + at32f413_tmr.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_dma.c + at32f413_dma.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 5 + 13 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/tmr/dma_burst/readme.txt b/project/at_start_f413/examples/tmr/dma_burst/readme.txt index dfdb600..7d64cf6 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/readme.txt +++ b/project/at_start_f413/examples/tmr/dma_burst/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c index 72f8a1c..c737a8b 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/dma_burst/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/dma_burst/src/main.c b/project/at_start_f413/examples/tmr/dma_burst/src/main.c index 6e65706..947b04b 100644 --- a/project/at_start_f413/examples/tmr/dma_burst/src/main.c +++ b/project/at_start_f413/examples/tmr/dma_burst/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt b/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt index 20d072e..7ccbc76 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c index 10a6901..0625baa 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c b/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c index 3c9b365..4119bf9 100644 --- a/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c +++ b/project/at_start_f413/examples/tmr/encoder_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/external_clock/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/readme.txt b/project/at_start_f413/examples/tmr/external_clock/readme.txt index 8a1c192..deb020b 100644 --- a/project/at_start_f413/examples/tmr/external_clock/readme.txt +++ b/project/at_start_f413/examples/tmr/external_clock/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c index 4b62492..c1f71d5 100644 --- a/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/external_clock/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/external_clock/src/main.c b/project/at_start_f413/examples/tmr/external_clock/src/main.c index 424f288..1a327b0 100644 --- a/project/at_start_f413/examples/tmr/external_clock/src/main.c +++ b/project/at_start_f413/examples/tmr/external_clock/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt b/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt index 4aea776..47c1e63 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c index 62ea888..2dcb2b2 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c index 1d7da08..4d2e9ea 100644 --- a/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c +++ b/project/at_start_f413/examples/tmr/hall_xor_tmr2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/hang_mode/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/readme.txt b/project/at_start_f413/examples/tmr/hang_mode/readme.txt index 0684caf..254e5cf 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/readme.txt +++ b/project/at_start_f413/examples/tmr/hang_mode/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c index 0c32084..e46e11c 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/hang_mode/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/hang_mode/src/main.c b/project/at_start_f413/examples/tmr/hang_mode/src/main.c index 857fcec..5d95813 100644 --- a/project/at_start_f413/examples/tmr/hang_mode/src/main.c +++ b/project/at_start_f413/examples/tmr/hang_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/input_capture/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/readme.txt b/project/at_start_f413/examples/tmr/input_capture/readme.txt index 7e1626e..f2581c5 100644 --- a/project/at_start_f413/examples/tmr/input_capture/readme.txt +++ b/project/at_start_f413/examples/tmr/input_capture/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c index 1de33ed..bbc7dc9 100644 --- a/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/input_capture/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/input_capture/src/main.c b/project/at_start_f413/examples/tmr/input_capture/src/main.c index 4420b65..d4abc20 100644 --- a/project/at_start_f413/examples/tmr/input_capture/src/main.c +++ b/project/at_start_f413/examples/tmr/input_capture/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_high/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/readme.txt b/project/at_start_f413/examples/tmr/oc_high/readme.txt index 36a062a..7bb819f 100644 --- a/project/at_start_f413/examples/tmr/oc_high/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_high/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c index 9481ec3..7db7b2b 100644 --- a/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_high/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_high/src/main.c b/project/at_start_f413/examples/tmr/oc_high/src/main.c index c5993d7..67745bf 100644 --- a/project/at_start_f413/examples/tmr/oc_high/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_high/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_low/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/readme.txt b/project/at_start_f413/examples/tmr/oc_low/readme.txt index eb58d26..baad7d8 100644 --- a/project/at_start_f413/examples/tmr/oc_low/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_low/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c index cb6049f..82aa048 100644 --- a/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_low/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_low/src/main.c b/project/at_start_f413/examples/tmr/oc_low/src/main.c index 5b628d9..2f63682 100644 --- a/project/at_start_f413/examples/tmr/oc_low/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_low/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt index efa17f6..28f7cc0 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c index 01b3d8d..92caa61 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c index 65208ac..4084ad7 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt index 1f83279..615ac19 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c index daf7a2a..25f116a 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c index ddcef3e..9082a40 100644 --- a/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c +++ b/project/at_start_f413/examples/tmr/oc_toggle_tmr9/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/one_cycle/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/readme.txt b/project/at_start_f413/examples/tmr/one_cycle/readme.txt index 04133cc..bebe83b 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/readme.txt +++ b/project/at_start_f413/examples/tmr/one_cycle/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c index f587593..384715b 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/one_cycle/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/one_cycle/src/main.c b/project/at_start_f413/examples/tmr/one_cycle/src/main.c index c635a41..6aa1657 100644 --- a/project/at_start_f413/examples/tmr/one_cycle/src/main.c +++ b/project/at_start_f413/examples/tmr/one_cycle/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/parallel_synchro/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt b/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt index 848d57f..f3f467a 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt +++ b/project/at_start_f413/examples/tmr/parallel_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c index 51e1f5a..dad95ca 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c b/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c index 0290e0a..a41c4b2 100644 --- a/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c +++ b/project/at_start_f413/examples/tmr/parallel_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_input/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/readme.txt b/project/at_start_f413/examples/tmr/pwm_input/readme.txt index 3c3fc5e..432b5c5 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_input/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c index effb75b..5f32df6 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_input/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input/src/main.c b/project/at_start_f413/examples/tmr/pwm_input/src/main.c index 49cf008..28a86be 100644 --- a/project/at_start_f413/examples/tmr/pwm_input/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_input/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt b/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt index e9a1d58..0295212 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c index 0c29638..87b50a9 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c b/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c index c6298f8..6d07eb5 100644 --- a/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_input_dma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt index 08e1f05..1801b70 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c index 2c94e60..015e740 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c index 03129f2..012be97 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_output_simulate/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt index 39286d7..ce6b2be 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c index a9ee659..8821fe7 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c index 61abc7e..b44ea79 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr10/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt b/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt index 18bc5f4..72c010e 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c index 552f45c..ceb578d 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c index 75e2c80..e8e04fb 100644 --- a/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c +++ b/project/at_start_f413/examples/tmr/pwm_output_tmr3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/timer_base/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/readme.txt b/project/at_start_f413/examples/tmr/timer_base/readme.txt index 329482d..f6aa042 100644 --- a/project/at_start_f413/examples/tmr/timer_base/readme.txt +++ b/project/at_start_f413/examples/tmr/timer_base/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c index b4e0903..065af95 100644 --- a/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/timer_base/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/timer_base/src/main.c b/project/at_start_f413/examples/tmr/timer_base/src/main.c index 6534859..b0710ac 100644 --- a/project/at_start_f413/examples/tmr/timer_base/src/main.c +++ b/project/at_start_f413/examples/tmr/timer_base/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt b/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt index fbc5841..fa6ebb7 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c index 019199d..391de74 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c b/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c index 7971db6..6f82400 100644 --- a/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c +++ b/project/at_start_f413/examples/tmr/tmr1_synchro/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt b/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt index c39d775..4345349 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c index bb5ae90..3ea5814 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c b/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c index d8de007..21eb053 100644 --- a/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c +++ b/project/at_start_f413/examples/tmr/tmr2_32bit/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/half_duplex/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/readme.txt b/project/at_start_f413/examples/usart/half_duplex/readme.txt index 0dae5b5..53b9c54 100644 --- a/project/at_start_f413/examples/usart/half_duplex/readme.txt +++ b/project/at_start_f413/examples/usart/half_duplex/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c index 798f4ec..92264a4 100644 --- a/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/half_duplex/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/half_duplex/src/main.c b/project/at_start_f413/examples/usart/half_duplex/src/main.c index 03ebaf0..d71302b 100644 --- a/project/at_start_f413/examples/usart/half_duplex/src/main.c +++ b/project/at_start_f413/examples/usart/half_duplex/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/hw_flow_control/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/readme.txt b/project/at_start_f413/examples/usart/hw_flow_control/readme.txt index 959440a..a6b099f 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/readme.txt +++ b/project/at_start_f413/examples/usart/hw_flow_control/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c index 6348c48..1c525ad 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/hw_flow_control/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/hw_flow_control/src/main.c b/project/at_start_f413/examples/usart/hw_flow_control/src/main.c index 3be56f6..d6abb1b 100644 --- a/project/at_start_f413/examples/usart/hw_flow_control/src/main.c +++ b/project/at_start_f413/examples/usart/hw_flow_control/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/idle_detection/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/readme.txt b/project/at_start_f413/examples/usart/idle_detection/readme.txt index 7b0b42c..166f1b4 100644 --- a/project/at_start_f413/examples/usart/idle_detection/readme.txt +++ b/project/at_start_f413/examples/usart/idle_detection/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c index 24538b5..f44ab8e 100644 --- a/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/idle_detection/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/idle_detection/src/main.c b/project/at_start_f413/examples/usart/idle_detection/src/main.c index a3accaf..a20c627 100644 --- a/project/at_start_f413/examples/usart/idle_detection/src/main.c +++ b/project/at_start_f413/examples/usart/idle_detection/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/readme.txt b/project/at_start_f413/examples/usart/interrupt/readme.txt index a000a36..e9eb29b 100644 --- a/project/at_start_f413/examples/usart/interrupt/readme.txt +++ b/project/at_start_f413/examples/usart/interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c b/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c index 79fbacb..e550a57 100644 --- a/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/interrupt/src/main.c b/project/at_start_f413/examples/usart/interrupt/src/main.c index 1466fe5..68192d8 100644 --- a/project/at_start_f413/examples/usart/interrupt/src/main.c +++ b/project/at_start_f413/examples/usart/interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/irda/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/irda/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h b/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/irda/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/readme.txt b/project/at_start_f413/examples/usart/irda/readme.txt index 7d902b9..b218fd3 100644 --- a/project/at_start_f413/examples/usart/irda/readme.txt +++ b/project/at_start_f413/examples/usart/irda/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c b/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/irda/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/src/at32f413_int.c b/project/at_start_f413/examples/usart/irda/src/at32f413_int.c index aa53df3..7564f63 100644 --- a/project/at_start_f413/examples/usart/irda/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/irda/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/irda/src/main.c b/project/at_start_f413/examples/usart/irda/src/main.c index 82970f8..8abe749 100644 --- a/project/at_start_f413/examples/usart/irda/src/main.c +++ b/project/at_start_f413/examples/usart/irda/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h b/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/readme.txt b/project/at_start_f413/examples/usart/polling/readme.txt index 3048cce..f37fb50 100644 --- a/project/at_start_f413/examples/usart/polling/readme.txt +++ b/project/at_start_f413/examples/usart/polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c b/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/src/at32f413_int.c b/project/at_start_f413/examples/usart/polling/src/at32f413_int.c index 2f8cc22..6a869cc 100644 --- a/project/at_start_f413/examples/usart/polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/polling/src/main.c b/project/at_start_f413/examples/usart/polling/src/main.c index 1bbf416..efd43c3 100644 --- a/project/at_start_f413/examples/usart/polling/src/main.c +++ b/project/at_start_f413/examples/usart/polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/printf/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/printf/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h b/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/printf/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/readme.txt b/project/at_start_f413/examples/usart/printf/readme.txt index 351b514..0992a19 100644 --- a/project/at_start_f413/examples/usart/printf/readme.txt +++ b/project/at_start_f413/examples/usart/printf/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c b/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/printf/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/src/at32f413_int.c b/project/at_start_f413/examples/usart/printf/src/at32f413_int.c index af70af4..160ee7c 100644 --- a/project/at_start_f413/examples/usart/printf/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/printf/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/printf/src/main.c b/project/at_start_f413/examples/usart/printf/src/main.c index b2cb424..6bc39fc 100644 --- a/project/at_start_f413/examples/usart/printf/src/main.c +++ b/project/at_start_f413/examples/usart/printf/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/receiver_mute/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/readme.txt b/project/at_start_f413/examples/usart/receiver_mute/readme.txt index 70caa19..e062a89 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/readme.txt +++ b/project/at_start_f413/examples/usart/receiver_mute/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c index 1fa4d19..d5004ec 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/receiver_mute/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/receiver_mute/src/main.c b/project/at_start_f413/examples/usart/receiver_mute/src/main.c index 75b0cae..fca9cef 100644 --- a/project/at_start_f413/examples/usart/receiver_mute/src/main.c +++ b/project/at_start_f413/examples/usart/receiver_mute/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h b/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h index 0a7e06f..14f2bfe 100644 --- a/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h +++ b/project/at_start_f413/examples/usart/smartcard/inc/smartcard_config.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file smartcard_config.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/readme.txt b/project/at_start_f413/examples/usart/smartcard/readme.txt index 0bea84d..e3cde4d 100644 --- a/project/at_start_f413/examples/usart/smartcard/readme.txt +++ b/project/at_start_f413/examples/usart/smartcard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c b/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/smartcard/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c b/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c index 8762fca..7133292 100644 --- a/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/smartcard/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/smartcard/src/main.c b/project/at_start_f413/examples/usart/smartcard/src/main.c index a94daf5..b4bf08f 100644 --- a/project/at_start_f413/examples/usart/smartcard/src/main.c +++ b/project/at_start_f413/examples/usart/smartcard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/synchronous/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/readme.txt b/project/at_start_f413/examples/usart/synchronous/readme.txt index ac9a484..819bce2 100644 --- a/project/at_start_f413/examples/usart/synchronous/readme.txt +++ b/project/at_start_f413/examples/usart/synchronous/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c b/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/synchronous/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c b/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c index 1f54617..88b4787 100644 --- a/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/synchronous/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/synchronous/src/main.c b/project/at_start_f413/examples/usart/synchronous/src/main.c index d8ddbcb..3d73b04 100644 --- a/project/at_start_f413/examples/usart/synchronous/src/main.c +++ b/project/at_start_f413/examples/usart/synchronous/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt index a080485..b73357e 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c index 4c4ca4a..ef21ff1 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c index 017a4cb..834bb23 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_interrupt/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt b/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt index 74c8ecb..7943220 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c index 06d4cdb..5265dbe 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c index f136a63..cfd7d7e 100644 --- a/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c +++ b/project/at_start_f413/examples/usart/transfer_by_dma_polling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h b/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h index 40030f1..9e64c80 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/audio_codec.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h index a9786c1..0c77953 100644 --- a/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/audio/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/readme.txt b/project/at_start_f413/examples/usb_device/audio/readme.txt index 4923ab8..827e79b 100644 --- a/project/at_start_f413/examples/usb_device/audio/readme.txt +++ b/project/at_start_f413/examples/usb_device/audio/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/audio/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c index a0718e6..540fc1a 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/audio/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c b/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c index 652ae8e..69399b7 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c +++ b/project/at_start_f413/examples/usb_device/audio/src/audio_codec.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/audio/src/main.c b/project/at_start_f413/examples/usb_device/audio/src/main.c index 2b6b017..8d2613e 100644 --- a/project/at_start_f413/examples/usb_device/audio/src/main.c +++ b/project/at_start_f413/examples/usb_device/audio/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h index fe2eec4..3fee157 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/audio_codec.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief audio codec header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h index 49b8811..3cd3958 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt b/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt index 0bdb177..fa1db65 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c index 053174a..101c293 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c index 56823d1..5b2ead9 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/audio_codec.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file audio_codec.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief audio codec function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c index 4140095..3a523ee 100644 --- a/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c +++ b/project/at_start_f413/examples/usb_device/composite_audio_hid/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h index d825fa0..fc5ff46 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt index f88433f..d710fa4 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c index 8a2129e..66657ef 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c index d018607..6133c11 100644 --- a/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c +++ b/project/at_start_f413/examples/usb_device/composite_vcp_keyboard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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,11 +185,10 @@ 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) { - /* bulk transfer is complete when the endpoint does one of the following 1 has transferred exactly the amount of data expected 2 transfers a packet with a payload size less than wMaxPacketSize or transfers a zero-length packet @@ -199,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; } @@ -212,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_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h index 732ca0c..f4c03f8 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/custom_hid/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/readme.txt b/project/at_start_f413/examples/usb_device/custom_hid/readme.txt index 837218c..144b723 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/readme.txt +++ b/project/at_start_f413/examples/usb_device/custom_hid/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c index 3622653..b01cb4a 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/custom_hid/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/custom_hid/src/main.c b/project/at_start_f413/examples/usb_device/custom_hid/src/main.c index d0d49d2..11b7db3 100644 --- a/project/at_start_f413/examples/usb_device/custom_hid/src/main.c +++ b/project/at_start_f413/examples/usb_device/custom_hid/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/usb_device/keyboard/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h index e83e636..e770ec8 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/keyboard/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/readme.txt b/project/at_start_f413/examples/usb_device/keyboard/readme.txt index d659f2f..7a69f76 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/readme.txt +++ b/project/at_start_f413/examples/usb_device/keyboard/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c index 436527a..fe66883 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/keyboard/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/keyboard/src/main.c b/project/at_start_f413/examples/usb_device/keyboard/src/main.c index 7ebfec2..4a8e288 100644 --- a/project/at_start_f413/examples/usb_device/keyboard/src/main.c +++ b/project/at_start_f413/examples/usb_device/keyboard/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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,31 +52,33 @@ 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; } } } - } /** @@ -189,7 +191,7 @@ int main(void) { if(usbd_connect_state_get(&usb_core_dev) == USB_CONN_STATE_CONFIGURED) { - keyboard_send_string((uint8_t *)" Keyboard 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 @@ -200,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); @@ -213,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_f413/examples/usb_device/mouse/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h index 01bf5c2..b468480 100644 --- a/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/mouse/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/readme.txt b/project/at_start_f413/examples/usb_device/mouse/readme.txt index 512832b..233b5df 100644 --- a/project/at_start_f413/examples/usb_device/mouse/readme.txt +++ b/project/at_start_f413/examples/usb_device/mouse/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c index 0de4c7a..c7e9bcd 100644 --- a/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/mouse/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/mouse/src/main.c b/project/at_start_f413/examples/usb_device/mouse/src/main.c index 2eefcf5..646c765 100644 --- a/project/at_start_f413/examples/usb_device/mouse/src/main.c +++ b/project/at_start_f413/examples/usb_device/mouse/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/usb_device/msc/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h index 575dfb6..686976f 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/msc_diskio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb mass storage disk interface header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h index 225fe6a..2c32e6e 100644 --- a/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/msc/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/readme.txt b/project/at_start_f413/examples/usb_device/msc/readme.txt index 5892a96..2d96ec4 100644 --- a/project/at_start_f413/examples/usb_device/msc/readme.txt +++ b/project/at_start_f413/examples/usb_device/msc/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/msc/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c index ce58827..a750d22 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/msc/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/src/main.c b/project/at_start_f413/examples/usb_device/msc/src/main.c index a0703ce..1b96b47 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/main.c +++ b/project/at_start_f413/examples/usb_device/msc/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c index 932a74a..bab8781 100644 --- a/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c +++ b/project/at_start_f413/examples/usb_device/msc/src/msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h index f0257a8..29e60a1 100644 --- a/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/printer/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/readme.txt b/project/at_start_f413/examples/usb_device/printer/readme.txt index e518aab..a1b3af0 100644 --- a/project/at_start_f413/examples/usb_device/printer/readme.txt +++ b/project/at_start_f413/examples/usb_device/printer/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/printer/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c index d266ba4..76361ad 100644 --- a/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/printer/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/printer/src/main.c b/project/at_start_f413/examples/usb_device/printer/src/main.c index 1820443..7356ca0 100644 --- a/project/at_start_f413/examples/usb_device/printer/src/main.c +++ b/project/at_start_f413/examples/usb_device/printer/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h index 5c19b11..a22041c 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt b/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt index 988f4b3..e60da75 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c index 3496a70..c20b0c0 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c b/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c index 81ac530..c809be4 100644 --- a/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c +++ b/project/at_start_f413/examples/usb_device/vcp_loopback/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/usb_device/virtual_comport/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_clock.h new file mode 100644 index 0000000..708a892 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_clock.h @@ -0,0 +1,46 @@ +/** + ************************************************************************** + * @file at32f413_clock.h + * @version v2.0.3 + * @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 __AT32F413_CLOCK_H +#define __AT32F413_CLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f413.h" + +/* exported functions ------------------------------------------------------- */ +void system_clock_config(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F413_CLOCK_H */ + diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_conf.h new file mode 100644 index 0000000..2066751 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_conf.h @@ -0,0 +1,158 @@ +/** + ************************************************************************** + * @file at32f413_conf.h + * @version v2.0.3 + * @date 2022-02-11 + * @brief at32f413 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 __AT32F413_CONF_H +#define __AT32F413_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 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 USB_MODULE_ENABLED +#define ACC_MODULE_ENABLED +#define MISC_MODULE_ENABLED + +/* includes ------------------------------------------------------------------*/ +#ifdef CRM_MODULE_ENABLED +#include "at32f413_crm.h" +#endif +#ifdef TMR_MODULE_ENABLED +#include "at32f413_tmr.h" +#endif +#ifdef RTC_MODULE_ENABLED +#include "at32f413_rtc.h" +#endif +#ifdef BPR_MODULE_ENABLED +#include "at32f413_bpr.h" +#endif +#ifdef GPIO_MODULE_ENABLED +#include "at32f413_gpio.h" +#endif +#ifdef I2C_MODULE_ENABLED +#include "at32f413_i2c.h" +#endif +#ifdef USART_MODULE_ENABLED +#include "at32f413_usart.h" +#endif +#ifdef PWC_MODULE_ENABLED +#include "at32f413_pwc.h" +#endif +#ifdef CAN_MODULE_ENABLED +#include "at32f413_can.h" +#endif +#ifdef ADC_MODULE_ENABLED +#include "at32f413_adc.h" +#endif +#ifdef SPI_MODULE_ENABLED +#include "at32f413_spi.h" +#endif +#ifdef DMA_MODULE_ENABLED +#include "at32f413_dma.h" +#endif +#ifdef DEBUG_MODULE_ENABLED +#include "at32f413_debug.h" +#endif +#ifdef FLASH_MODULE_ENABLED +#include "at32f413_flash.h" +#endif +#ifdef CRC_MODULE_ENABLED +#include "at32f413_crc.h" +#endif +#ifdef WWDT_MODULE_ENABLED +#include "at32f413_wwdt.h" +#endif +#ifdef WDT_MODULE_ENABLED +#include "at32f413_wdt.h" +#endif +#ifdef EXINT_MODULE_ENABLED +#include "at32f413_exint.h" +#endif +#ifdef SDIO_MODULE_ENABLED +#include "at32f413_sdio.h" +#endif +#ifdef ACC_MODULE_ENABLED +#include "at32f413_acc.h" +#endif +#ifdef MISC_MODULE_ENABLED +#include "at32f413_misc.h" +#endif +#ifdef USB_MODULE_ENABLED +#include "at32f413_usb.h" +#endif + +/** + * @} + */ + + /** + * @} + */ + +#ifdef __cplusplus +} +#endif + +#endif diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_int.h new file mode 100644 index 0000000..4dc61eb --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/inc/at32f413_int.h @@ -0,0 +1,58 @@ +/** + ************************************************************************** + * @file at32f413_int.h + * @version v2.0.3 + * @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 __AT32F413_INT_H +#define __AT32F413_INT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f413.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_f413/examples/usb_device/virtual_comport/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/virtual_comport/inc/usb_conf.h new file mode 100644 index 0000000..1de9275 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/inc/usb_conf.h @@ -0,0 +1,120 @@ +/** + ************************************************************************** + * @file usb_conf.h + * @version v2.0.3 + * @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 "at32f413.h" +#include "at32f413_board.h" +#include "stdio.h" + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_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_f413/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx b/project/at_start_f413/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx new file mode 100644 index 0000000..2f1c31a --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx @@ -0,0 +1,480 @@ + + + + 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 -FF0AT32F413_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.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\at32f413_clock.c + at32f413_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f413_int.c + at32f413_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 + ..\..\..\..\..\at32f413_board\at32f413_board.c + at32f413_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_acc.c + at32f413_acc.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + at32f413_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c + at32f413_exint.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c + at32f413_flash.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + at32f413_gpio.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + at32f413_misc.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + at32f413_pwc.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + at32f413_usart.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usb.c + at32f413_usb.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 14 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + system_at32f413.c + 0 + 0 + + + 4 + 15 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.s + startup_at32f413.s + 0 + 0 + + + + + usbd_drivers + 0 + 0 + 0 + 0 + + 5 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_core.c + usbd_core.c + 0 + 0 + + + 5 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_int.c + usbd_int.c + 0 + 0 + + + 5 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_drivers\src\usbd_sdr.c + usbd_sdr.c + 0 + 0 + + + + + usbd_class + 0 + 0 + 0 + 0 + + 6 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_class.c + cdc_class.c + 0 + 0 + + + 6 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_desc.c + cdc_desc.c + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 7 + 21 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx b/project/at_start_f413/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx new file mode 100644 index 0000000..ce04b08 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx @@ -0,0 +1,547 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + virtual_comport + 0x4 + ARM-ADS + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 + + + -AT32F413RCT7 + ArteryTek + ArteryTek.AT32F413_DFP.2.0.0 + IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F413_256 -FS08000000 -FL0100000 -FP0($$Device:-AT32F413RCT7$Flash\AT32F413_256.FLM)) + 0 + $$Device:-AT32F413RCT7$Device\Include\at32f40x.h + + + + + + + + + + $$Device:-AT32F413RCT7$SVD\AT32F413xx_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 + 0x8000 + + + 1 + 0x8000000 + 0x40000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x40000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x8000 + + + 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 + + + AT32F413RCT7,USE_STDPERIPH_DRIVER,AT_START_F413_V1 + + ..\inc;..\..\..\..\..\at32f413_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 + + + at32f413_clock.c + 1 + ..\src\at32f413_clock.c + + + at32f413_int.c + 1 + ..\src\at32f413_int.c + + + main.c + 1 + ..\src\main.c + + + + + bsp + + + at32f413_board.c + 1 + ..\..\..\..\..\at32f413_board\at32f413_board.c + + + + + firmware + + + at32f413_acc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_acc.c + + + at32f413_crm.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_crm.c + + + at32f413_exint.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_exint.c + + + at32f413_flash.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_flash.c + + + at32f413_gpio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_gpio.c + + + at32f413_misc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_misc.c + + + at32f413_pwc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_pwc.c + + + at32f413_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usart.c + + + at32f413_usb.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f413_usb.c + + + + + cmsis + + + system_at32f413.c + 1 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f413.c + + + startup_at32f413.s + 2 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f413.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_f413/examples/usb_device/virtual_comport/readme.txt b/project/at_start_f413/examples/usb_device/virtual_comport/readme.txt new file mode 100644 index 0000000..78f45fb --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/readme.txt @@ -0,0 +1,12 @@ +/** + ************************************************************************** + * @file readme.txt + * @version v2.0.3 + * @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). \ No newline at end of file diff --git a/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c new file mode 100644 index 0000000..6a1ee8a --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_clock.c @@ -0,0 +1,96 @@ +/** + ************************************************************************** + * @file at32f413_clock.c + * @version v2.0.3 + * @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 "at32f413_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); + + /* 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_f413/examples/usb_device/virtual_comport/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_int.c new file mode 100644 index 0000000..c20b0c0 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/src/at32f413_int.c @@ -0,0 +1,143 @@ +/** + ************************************************************************** + * @file at32f413_int.c + * @version v2.0.3 + * @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 "at32f413_int.h" + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_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_f413/examples/usb_device/virtual_comport/src/main.c b/project/at_start_f413/examples/usb_device/virtual_comport/src/main.c new file mode 100644 index 0000000..8c8fe96 --- /dev/null +++ b/project/at_start_f413/examples/usb_device/virtual_comport/src/main.c @@ -0,0 +1,439 @@ +/** + ************************************************************************** + * @file main.c + * @version v2.0.3 + * @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 "at32f413_board.h" +#include "at32f413_clock.h" +#include "usbd_core.h" +#include "cdc_class.h" +#include "cdc_desc.h" +#include "usbd_int.h" + +/** @addtogroup AT32F413_periph_examples + * @{ + */ + +/** @addtogroup 413_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 parity 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_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h index 0c9540c..61b9868 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash_fat16.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief fat16 file system header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h index f87a249..5497596 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb mass storage disk interface header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h index 62b3450..997b1b4 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt b/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt index b75bfd6..a54d6cd 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c index 37a8405..91be02d 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c index e8490b9..697e9d0 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/flash_fat16.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file flash_fat16.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief fat16 file system ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c index 7b1016b..bb65739 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @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_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c index 67d7cf5..d894425 100644 --- a/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c +++ b/project/at_start_f413/examples/usb_device/virtual_msc_iap/src/msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file msc_diskio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb mass storage disk function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h +++ b/project/at_start_f413/examples/wdt/wdt_reset/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/readme.txt b/project/at_start_f413/examples/wdt/wdt_reset/readme.txt index de2af48..31f8291 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/readme.txt +++ b/project/at_start_f413/examples/wdt/wdt_reset/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file wdt_reset/readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c +++ b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c index 56c8d70..a8209b6 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c +++ b/project/at_start_f413/examples/wdt/wdt_reset/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wdt/wdt_reset/src/main.c b/project/at_start_f413/examples/wdt/wdt_reset/src/main.c index 46a8d5f..0fb6c3a 100644 --- a/project/at_start_f413/examples/wdt/wdt_reset/src/main.c +++ b/project/at_start_f413/examples/wdt/wdt_reset/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h index 5c513f2..2066751 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt b/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt index 3e4134e..0c9e4c7 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file wwdt_reset/readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c index 244a26d..6a1ee8a 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c index bbd0e46..bd7108c 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c b/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c index 53fb2e8..1eff8b4 100644 --- a/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c +++ b/project/at_start_f413/examples/wwdt/wwdt_reset/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/inc/at32f413_clock.h b/project/at_start_f413/templates/inc/at32f413_clock.h index fd22786..708a892 100644 --- a/project/at_start_f413/templates/inc/at32f413_clock.h +++ b/project/at_start_f413/templates/inc/at32f413_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/inc/at32f413_conf.h b/project/at_start_f413/templates/inc/at32f413_conf.h index dca8d03..0921c11 100644 --- a/project/at_start_f413/templates/inc/at32f413_conf.h +++ b/project/at_start_f413/templates/inc/at32f413_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f413 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/inc/at32f413_int.h b/project/at_start_f413/templates/inc/at32f413_int.h index badfcc8..4dc61eb 100644 --- a/project/at_start_f413/templates/inc/at32f413_int.h +++ b/project/at_start_f413/templates/inc/at32f413_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/mdk_v4/template.uvproj b/project/at_start_f413/templates/mdk_v4/template.uvproj index faf8a08..6850068 100644 --- a/project/at_start_f413/templates/mdk_v4/template.uvproj +++ b/project/at_start_f413/templates/mdk_v4/template.uvproj @@ -362,7 +362,7 @@ AT32F413RCT7,USE_STDPERIPH_DRIVER,AT_START_F413_V1 - ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\..\templates\inc;..\..\..\at32f413_board + ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\at32f413_board diff --git a/project/at_start_f413/templates/mdk_v5/template.uvprojx b/project/at_start_f413/templates/mdk_v5/template.uvprojx index 6ffb193..97f0a7e 100644 --- a/project/at_start_f413/templates/mdk_v5/template.uvprojx +++ b/project/at_start_f413/templates/mdk_v5/template.uvprojx @@ -338,7 +338,7 @@ AT32F413RCT7,USE_STDPERIPH_DRIVER,AT_START_F413_V1 - ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\..\templates\inc;..\..\..\at32f413_board + ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\at32f413_board diff --git a/project/at_start_f413/templates/readme.txt b/project/at_start_f413/templates/readme.txt index 37dc988..f707bd9 100644 --- a/project/at_start_f413/templates/readme.txt +++ b/project/at_start_f413/templates/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f413/templates/src/at32f413_clock.c b/project/at_start_f413/templates/src/at32f413_clock.c index 041ff74..866d2f8 100644 --- a/project/at_start_f413/templates/src/at32f413_clock.c +++ b/project/at_start_f413/templates/src/at32f413_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_clock.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/src/at32f413_int.c b/project/at_start_f413/templates/src/at32f413_int.c index a74cafd..29f7f1e 100644 --- a/project/at_start_f413/templates/src/at32f413_int.c +++ b/project/at_start_f413/templates/src/at32f413_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f413_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413/templates/src/main.c b/project/at_start_f413/templates/src/main.c index 7b36873..966dd52 100644 --- a/project/at_start_f413/templates/src/main.c +++ b/project/at_start_f413/templates/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f413_Example_list.htm b/project/at_start_f413_Example_list.htm index d1be69c..c1b824c 100644 --- a/project/at_start_f413_Example_list.htm +++ b/project/at_start_f413_Example_list.htm @@ -1992,7 +1992,7 @@ div.WordSection1

92

-

virtual_comport

+ + +

USBת´®¿Ú

+ + + + +

102

+ + +

virtual_msc_iap

102

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

103

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