diff --git a/AT32F415_periph_lib_V2.0.2.chm b/AT32F415_periph_lib_V2.0.3.chm similarity index 62% rename from AT32F415_periph_lib_V2.0.2.chm rename to AT32F415_periph_lib_V2.0.3.chm index ef7dc70..5e73434 100644 Binary files a/AT32F415_periph_lib_V2.0.2.chm and b/AT32F415_periph_lib_V2.0.3.chm differ diff --git a/document/ReleaseNotes_AT32F415_Firmware_Library.pdf b/document/ReleaseNotes_AT32F415_Firmware_Library.pdf index 2fce5ec..9da878f 100644 Binary files a/document/ReleaseNotes_AT32F415_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F415_Firmware_Library.pdf differ diff --git a/libraries/cmsis/cm4/device_support/at32f415.h b/libraries/cmsis/cm4/device_support/at32f415.h index 41c9a8f..9fd5015 100644 --- a/libraries/cmsis/cm4/device_support/at32f415.h +++ b/libraries/cmsis/cm4/device_support/at32f415.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 header file ************************************************************************** * Copyright notice & Disclaimer @@ -89,7 +89,7 @@ extern "C" { */ #define __AT32F415_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F415_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */ -#define __AT32F415_LIBRARY_VERSION_MINOR (0x02) /*!< [15:8] minor version */ +#define __AT32F415_LIBRARY_VERSION_MINOR (0x03) /*!< [15:8] minor version */ #define __AT32F415_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F415_LIBRARY_VERSION ((__AT32F415_LIBRARY_VERSION_MAJOR << 24) | \ (__AT32F415_LIBRARY_VERSION_MIDDLE << 16) | \ diff --git a/libraries/cmsis/cm4/device_support/at32f415_conf_template.h b/libraries/cmsis/cm4/device_support/at32f415_conf_template.h index 49b2790..91fc906 100644 --- a/libraries/cmsis/cm4/device_support/at32f415_conf_template.h +++ b/libraries/cmsis/cm4/device_support/at32f415_conf_template.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s index 28ba6ab..f62c24a 100644 --- a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s +++ b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f415.s @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file startup_at32f415.s - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415xx devices vector table for gcc toolchain. * this module performs: * - set the initial sp diff --git a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s index 05d11d8..a7bb1ca 100644 --- a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s +++ b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f415.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f415.s -;* @version v2.0.2 -;* @date 2021-12-31 +;* @version v2.0.3 +;* @date 2022-02-11 ;* @brief at32f415 startup file for IAR Systems ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s index 275d41d..0962f9c 100644 --- a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s +++ b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f415.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f415.s -;* @version v2.0.2 -;* @date 2021-12-31 +;* @version v2.0.3 +;* @date 2022-02-11 ;* @brief at32f415 startup file for keil ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/system_at32f415.c b/libraries/cmsis/cm4/device_support/system_at32f415.c index 0b478f0..5bb71a5 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f415.c +++ b/libraries/cmsis/cm4/device_support/system_at32f415.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f415.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 @@ -63,6 +63,11 @@ unsigned int system_core_clock = HICK_VALUE; /*!< system clock frequen */ void SystemInit (void) { + /* enable low power mode */ + CRM->apb1en_bit.pwcen = 1; + *(volatile uint8_t *)(0x40007050) |= (uint8_t)(0x1 << 2); + CRM->apb1en_bit.pwcen = 0; + /* reset the crm clock configuration to the default reset state(for debug purpose) */ /* set hicken bit */ CRM->ctrl_bit.hicken = TRUE; diff --git a/libraries/cmsis/cm4/device_support/system_at32f415.h b/libraries/cmsis/cm4/device_support/system_at32f415.h index b798747..0d57c6a 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f415.h +++ b/libraries/cmsis/cm4/device_support/system_at32f415.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f415.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/at32f415_adc.h b/libraries/drivers/inc/at32f415_adc.h index aa83870..662b46f 100644 --- a/libraries/drivers/inc/at32f415_adc.h +++ b/libraries/drivers/inc/at32f415_adc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_adc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 adc header file ************************************************************************** * Copyright notice & Disclaimer @@ -76,23 +76,6 @@ extern "C" { * @{ */ -/** - * @brief adc combine mode type - */ -typedef enum -{ - ADC_INDEPENDENT_MODE = 0x00, /*!< independent mode */ - ADC_ORDINARY_SMLT_PREEMPT_SMLT_MODE = 0x01, /*!< combined ordinary simultaneous + preempt simultaneous mode */ - ADC_ORDINARY_SMLT_PREEMPT_INTERLTRIG_MODE = 0x02, /*!< combined ordinary simultaneous + preempt interleaved trigger mode */ - ADC_ORDINARY_SHORTSHIFT_PREEMPT_SMLT_MODE = 0x03, /*!< combined ordinary short shifting + preempt simultaneous mode */ - ADC_ORDINARY_LONGSHIFT_PREEMPT_SMLT_MODE = 0x04, /*!< combined ordinary long shifting + preempt simultaneous mode */ - ADC_PREEMPT_SMLT_ONLY_MODE = 0x05, /*!< preempt simultaneous mode only */ - ADC_ORDINARY_SMLT_ONLY_MODE = 0x06, /*!< ordinary simultaneous mode only */ - ADC_ORDINARY_SHORTSHIFT_ONLY_MODE = 0x07, /*!< ordinary short shifting mode only */ - ADC_ORDINARY_LONGSHIFT_ONLY_MODE = 0x08, /*!< slow interleaved mode only */ - ADC_PREEMPT_INTERLTRIG_ONLY_MODE = 0x09 /*!< alternate trigger mode only */ -} adc_combine_mode_type; - /** * @brief adc data align type */ @@ -253,8 +236,7 @@ typedef struct __IO uint32_t ocpen : 1; /* [11] */ __IO uint32_t pcpen : 1; /* [12] */ __IO uint32_t ocpcnt : 3; /* [15:13] */ - __IO uint32_t mssel : 4; /* [19:16] */ - __IO uint32_t reserved1 : 2; /* [21:20] */ + __IO uint32_t reserved1 : 6; /* [21:16] */ __IO uint32_t pcvmen : 1; /* [22] */ __IO uint32_t ocvmen : 1; /* [23] */ __IO uint32_t reserved2 : 8; /* [31:24] */ @@ -560,7 +542,6 @@ typedef struct void adc_reset(adc_type *adc_x); void adc_enable(adc_type *adc_x, confirm_state new_state); -void adc_combine_mode_select(adc_combine_mode_type combine_mode); void adc_base_default_para_init(adc_base_config_type *adc_base_struct); void adc_base_config(adc_type *adc_x, adc_base_config_type *adc_base_struct); void adc_dma_mode_enable(adc_type *adc_x, confirm_state new_state); @@ -588,7 +569,6 @@ flag_status adc_ordinary_software_trigger_status_get(adc_type *adc_x); void adc_preempt_software_trigger_enable(adc_type *adc_x, confirm_state new_state); flag_status adc_preempt_software_trigger_status_get(adc_type *adc_x); uint16_t adc_ordinary_conversion_data_get(adc_type *adc_x); -uint32_t adc_combine_ordinary_conversion_data_get(void); uint16_t adc_preempt_conversion_data_get(adc_type *adc_x, adc_preempt_channel_type adc_preempt_channel); flag_status adc_flag_get(adc_type *adc_x, uint8_t adc_flag); void adc_flag_clear(adc_type *adc_x, uint32_t adc_flag); diff --git a/libraries/drivers/inc/at32f415_can.h b/libraries/drivers/inc/at32f415_can.h index 5067bdb..29bf526 100644 --- a/libraries/drivers/inc/at32f415_can.h +++ b/libraries/drivers/inc/at32f415_can.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_can.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 can header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_cmp.h b/libraries/drivers/inc/at32f415_cmp.h index a2c1da3..151b681 100644 --- a/libraries/drivers/inc/at32f415_cmp.h +++ b/libraries/drivers/inc/at32f415_cmp.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_cmp.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 cmp header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_crc.h b/libraries/drivers/inc/at32f415_crc.h index ed17491..bb1c9e1 100644 --- a/libraries/drivers/inc/at32f415_crc.h +++ b/libraries/drivers/inc/at32f415_crc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_crc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 crc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_crm.h b/libraries/drivers/inc/at32f415_crm.h index dc218be..74df0f8 100644 --- a/libraries/drivers/inc/at32f415_crm.h +++ b/libraries/drivers/inc/at32f415_crm.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_crm.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 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/at32f415_debug.h b/libraries/drivers/inc/at32f415_debug.h index 3bcf9eb..7c57c78 100644 --- a/libraries/drivers/inc/at32f415_debug.h +++ b/libraries/drivers/inc/at32f415_debug.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_debug.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 debug header file ************************************************************************** * Copyright notice & Disclaimer @@ -48,7 +48,7 @@ extern "C" { * @{ */ #define DEBUG_SLEEP ((uint32_t)0x00000001) /*!< debug sleep mode */ -#define DEBUG_STOP ((uint32_t)0x00000002) /*!< debug deepsleep mode */ +#define DEBUG_DEEPSLEEP ((uint32_t)0x00000002) /*!< debug deepsleep mode */ #define DEBUG_STANDBY ((uint32_t)0x00000004) /*!< debug standby mode */ #define DEBUG_WDT_PAUSE ((uint32_t)0x00000100) /*!< debug watchdog timer pause */ #define DEBUG_WWDT_PAUSE ((uint32_t)0x00000200) /*!< debug window watchdog timer pause */ @@ -111,18 +111,18 @@ typedef struct __IO uint32_t can1_pause : 1;/* [14] */ __IO uint32_t i2c1_smbus_timeout : 1;/* [15] */ __IO uint32_t i2c2_smbus_timeout : 1;/* [16] */ - __IO uint32_t tim8_pause : 1;/* [17] */ - __IO uint32_t tim5_pause : 1;/* [18] */ - __IO uint32_t tim6_pause : 1;/* [19] */ - __IO uint32_t tim7_pause : 1;/* [20] */ + __IO uint32_t tmr8_pause : 1;/* [17] */ + __IO uint32_t tmr5_pause : 1;/* [18] */ + __IO uint32_t tmr6_pause : 1;/* [19] */ + __IO uint32_t tmr7_pause : 1;/* [20] */ __IO uint32_t can2_pause : 1;/* [21] */ __IO uint32_t reserved2 : 3;/* [24:22] */ - __IO uint32_t tim12_pause : 1;/* [25] */ - __IO uint32_t tim13_pause : 1;/* [26] */ - __IO uint32_t tim14_pause : 1;/* [27] */ - __IO uint32_t tim9_pause : 1;/* [28] */ - __IO uint32_t tim10_pause : 1;/* [29] */ - __IO uint32_t tim11_pause : 1;/* [30] */ + __IO uint32_t tmr12_pause : 1;/* [25] */ + __IO uint32_t tmr13_pause : 1;/* [26] */ + __IO uint32_t tmr14_pause : 1;/* [27] */ + __IO uint32_t tmr9_pause : 1;/* [28] */ + __IO uint32_t tmr10_pause : 1;/* [29] */ + __IO uint32_t tmr11_pause : 1;/* [30] */ __IO uint32_t i2c3_smbus_timeout : 1;/* [31] */ } ctrl_bit; }; diff --git a/libraries/drivers/inc/at32f415_def.h b/libraries/drivers/inc/at32f415_def.h index 11e547b..b0edbdc 100644 --- a/libraries/drivers/inc/at32f415_def.h +++ b/libraries/drivers/inc/at32f415_def.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_def.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 macros header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_dma.h b/libraries/drivers/inc/at32f415_dma.h index ee66b3d..c5b44f4 100644 --- a/libraries/drivers/inc/at32f415_dma.h +++ b/libraries/drivers/inc/at32f415_dma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_dma.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 dma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_ertc.h b/libraries/drivers/inc/at32f415_ertc.h index b818def..54b3eeb 100644 --- a/libraries/drivers/inc/at32f415_ertc.h +++ b/libraries/drivers/inc/at32f415_ertc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_ertc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 ertc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_exint.h b/libraries/drivers/inc/at32f415_exint.h index cc3006f..a405b89 100644 --- a/libraries/drivers/inc/at32f415_exint.h +++ b/libraries/drivers/inc/at32f415_exint.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_exint.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 exint header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_flash.h b/libraries/drivers/inc/at32f415_flash.h index 0d61ba7..0defbd5 100644 --- a/libraries/drivers/inc/at32f415_flash.h +++ b/libraries/drivers/inc/at32f415_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_flash.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_gpio.h b/libraries/drivers/inc/at32f415_gpio.h index 699aa2d..78a0d3a 100644 --- a/libraries/drivers/inc/at32f415_gpio.h +++ b/libraries/drivers/inc/at32f415_gpio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_gpio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 gpio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_i2c.h b/libraries/drivers/inc/at32f415_i2c.h index 7b2a86c..49196de 100644 --- a/libraries/drivers/inc/at32f415_i2c.h +++ b/libraries/drivers/inc/at32f415_i2c.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_i2c.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 i2c header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_misc.h b/libraries/drivers/inc/at32f415_misc.h index 018aa0f..008f80e 100644 --- a/libraries/drivers/inc/at32f415_misc.h +++ b/libraries/drivers/inc/at32f415_misc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_misc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 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/at32f415_pwc.h b/libraries/drivers/inc/at32f415_pwc.h index 0bbfefb..18d4b7b 100644 --- a/libraries/drivers/inc/at32f415_pwc.h +++ b/libraries/drivers/inc/at32f415_pwc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_pwc.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 pwc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_sdio.h b/libraries/drivers/inc/at32f415_sdio.h index b76059a..7ce25c1 100644 --- a/libraries/drivers/inc/at32f415_sdio.h +++ b/libraries/drivers/inc/at32f415_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_sdio.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 sdio header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_spi.h b/libraries/drivers/inc/at32f415_spi.h index 6fc3479..4d88e12 100644 --- a/libraries/drivers/inc/at32f415_spi.h +++ b/libraries/drivers/inc/at32f415_spi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_spi.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 spi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_tmr.h b/libraries/drivers/inc/at32f415_tmr.h index bdfc3f7..b3e3b87 100644 --- a/libraries/drivers/inc/at32f415_tmr.h +++ b/libraries/drivers/inc/at32f415_tmr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_tmr.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 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/at32f415_usart.h b/libraries/drivers/inc/at32f415_usart.h index 6686973..c7bf56c 100644 --- a/libraries/drivers/inc/at32f415_usart.h +++ b/libraries/drivers/inc/at32f415_usart.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_usart.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 usart header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_usb.h b/libraries/drivers/inc/at32f415_usb.h index 9da299a..21ecf17 100644 --- a/libraries/drivers/inc/at32f415_usb.h +++ b/libraries/drivers/inc/at32f415_usb.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_usb.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 usb header file ************************************************************************** * Copyright notice & Disclaimer @@ -1404,7 +1404,7 @@ void usb_hc_enable(otg_global_type *usbx, uint8_t ept_num, uint8_t dev_address, uint8_t type, - uint8_t maxpacket, + uint16_t maxpacket, uint8_t speed); uint32_t usb_hch_read_interrupt(otg_global_type *usbx); void usb_host_disable(otg_global_type *usbx); diff --git a/libraries/drivers/inc/at32f415_wdt.h b/libraries/drivers/inc/at32f415_wdt.h index cb88749..d0c8a26 100644 --- a/libraries/drivers/inc/at32f415_wdt.h +++ b/libraries/drivers/inc/at32f415_wdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_wdt.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 wdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f415_wwdt.h b/libraries/drivers/inc/at32f415_wwdt.h index 1388e71..29fa8b0 100644 --- a/libraries/drivers/inc/at32f415_wwdt.h +++ b/libraries/drivers/inc/at32f415_wwdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_wwdt.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 wwdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_adc.c b/libraries/drivers/src/at32f415_adc.c index 9b19b7e..06c036c 100644 --- a/libraries/drivers/src/at32f415_adc.c +++ b/libraries/drivers/src/at32f415_adc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -72,27 +72,6 @@ void adc_enable(adc_type *adc_x, confirm_state new_state) adc_x->ctrl2_bit.adcen = new_state; } -/** - * @brief select combine mode of the specified adc peripheral. - * @param combine_mode: select the adc combine mode. - * this parameter can be one of the following values: - * - ADC_INDEPENDENT_MODE - * - ADC_ORDINARY_SMLT_PREEMPT_SMLT_MODE - * - ADC_ORDINARY_SMLT_PREEMPT_INTERLTRIG_MODE - * - ADC_ORDINARY_SHORTSHIFT_PREEMPT_SMLT_MODE - * - ADC_ORDINARY_LONGSHIFT_PREEMPT_SMLT_MODE - * - ADC_PREEMPT_SMLT_ONLY_MODE - * - ADC_ORDINARY_SMLT_ONLY_MODE - * - ADC_ORDINARY_SHORTSHIFT_ONLY_MODE - * - ADC_ORDINARY_LONGSHIFT_ONLY_MODE - * - ADC_PREEMPT_INTERLTRIG_ONLY_MODE - * @retval none - */ -void adc_combine_mode_select(adc_combine_mode_type combine_mode) -{ - ADC1->ctrl1_bit.mssel = combine_mode; -} - /** * @brief adc base default para init. * @param sequence_mode: set the state of adc sequence mode. @@ -821,15 +800,6 @@ uint16_t adc_ordinary_conversion_data_get(adc_type *adc_x) return (uint16_t)(adc_x->odt_bit.odt); } -/** - * @brief return the last conversion data for ordinary channel of combine adc. - * @retval the last conversion data for ordinary channel. - */ -uint32_t adc_combine_ordinary_conversion_data_get(void) -{ - return (uint32_t)(ADC1->odt); -} - /** * @brief return the conversion data for selection preempt channel of the specified adc peripheral. * @param adc_x: select the adc peripheral. diff --git a/libraries/drivers/src/at32f415_can.c b/libraries/drivers/src/at32f415_can.c index 006ccee..9451b31 100644 --- a/libraries/drivers/src/at32f415_can.c +++ b/libraries/drivers/src/at32f415_can.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_cmp.c b/libraries/drivers/src/at32f415_cmp.c index 49e766d..8fb9e4c 100644 --- a/libraries/drivers/src/at32f415_cmp.c +++ b/libraries/drivers/src/at32f415_cmp.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_cmp.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/at32f415_crc.c b/libraries/drivers/src/at32f415_crc.c index c330007..978b109 100644 --- a/libraries/drivers/src/at32f415_crc.c +++ b/libraries/drivers/src/at32f415_crc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_crm.c b/libraries/drivers/src/at32f415_crm.c index 558b60c..513ca9e 100644 --- a/libraries/drivers/src/at32f415_crm.c +++ b/libraries/drivers/src/at32f415_crm.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -321,6 +321,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 @@ -340,6 +341,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/at32f415_debug.c b/libraries/drivers/src/at32f415_debug.c index 8476f0b..49180fb 100644 --- a/libraries/drivers/src/at32f415_debug.c +++ b/libraries/drivers/src/at32f415_debug.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 @@ -55,7 +55,7 @@ uint32_t debug_device_id_get(void) * @param periph_debug_mode * this parameter can be any combination of the following values: - DEBUG_SLEEP - - DEBUG_STOP + - DEBUG_DEEPSLEEP - DEBUG_STANDBY - DEBUG_WDT_PAUSE - DEBUG_WWDT_PAUSE diff --git a/libraries/drivers/src/at32f415_dma.c b/libraries/drivers/src/at32f415_dma.c index aeb38d9..6ac02f0 100644 --- a/libraries/drivers/src/at32f415_dma.c +++ b/libraries/drivers/src/at32f415_dma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_ertc.c b/libraries/drivers/src/at32f415_ertc.c index 2218676..51bca71 100644 --- a/libraries/drivers/src/at32f415_ertc.c +++ b/libraries/drivers/src/at32f415_ertc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_ertc.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the ertc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f415_exint.c b/libraries/drivers/src/at32f415_exint.c index 66976db..6181bfb 100644 --- a/libraries/drivers/src/at32f415_exint.c +++ b/libraries/drivers/src/at32f415_exint.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_flash.c b/libraries/drivers/src/at32f415_flash.c index b088dce..b55cebd 100644 --- a/libraries/drivers/src/at32f415_flash.c +++ b/libraries/drivers/src/at32f415_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_gpio.c b/libraries/drivers/src/at32f415_gpio.c index bc84f71..7791524 100644 --- a/libraries/drivers/src/at32f415_gpio.c +++ b/libraries/drivers/src/at32f415_gpio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_i2c.c b/libraries/drivers/src/at32f415_i2c.c index 8073099..20bf328 100644 --- a/libraries/drivers/src/at32f415_i2c.c +++ b/libraries/drivers/src/at32f415_i2c.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_misc.c b/libraries/drivers/src/at32f415_misc.c index 5262cfa..24e4f5a 100644 --- a/libraries/drivers/src/at32f415_misc.c +++ b/libraries/drivers/src/at32f415_misc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_pwc.c b/libraries/drivers/src/at32f415_pwc.c index 30d070e..2cf233a 100644 --- a/libraries/drivers/src/at32f415_pwc.c +++ b/libraries/drivers/src/at32f415_pwc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_sdio.c b/libraries/drivers/src/at32f415_sdio.c index 1091a82..933cd73 100644 --- a/libraries/drivers/src/at32f415_sdio.c +++ b/libraries/drivers/src/at32f415_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_spi.c b/libraries/drivers/src/at32f415_spi.c index 45b7b84..eafd628 100644 --- a/libraries/drivers/src/at32f415_spi.c +++ b/libraries/drivers/src/at32f415_spi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_tmr.c b/libraries/drivers/src/at32f415_tmr.c index e6cd185..a26bd30 100644 --- a/libraries/drivers/src/at32f415_tmr.c +++ b/libraries/drivers/src/at32f415_tmr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_usart.c b/libraries/drivers/src/at32f415_usart.c index 57fa1ff..6e62b8b 100644 --- a/libraries/drivers/src/at32f415_usart.c +++ b/libraries/drivers/src/at32f415_usart.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_usb.c b/libraries/drivers/src/at32f415_usb.c index 2cf1ca3..dcece88 100644 --- a/libraries/drivers/src/at32f415_usb.c +++ b/libraries/drivers/src/at32f415_usb.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_usb.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief contains all the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -893,7 +893,7 @@ void usb_hc_enable(otg_global_type *usbx, uint8_t ept_num, uint8_t dev_address, uint8_t type, - uint8_t maxpacket, + uint16_t maxpacket, uint8_t speed) { otg_hchannel_type *hch = USB_CHL(usbx, chn); diff --git a/libraries/drivers/src/at32f415_wdt.c b/libraries/drivers/src/at32f415_wdt.c index f07092a..385f698 100644 --- a/libraries/drivers/src/at32f415_wdt.c +++ b/libraries/drivers/src/at32f415_wdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_wwdt.c b/libraries/drivers/src/at32f415_wwdt.c index 3ecf5ce..bf2aeff 100644 --- a/libraries/drivers/src/at32f415_wwdt.c +++ b/libraries/drivers/src/at32f415_wwdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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 5d0686e..887d4c9 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 171ae86..573d3b8 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/usb_drivers/inc/usb_core.h b/middlewares/usb_drivers/inc/usb_core.h index 99a859f..49da69d 100644 --- a/middlewares/usb_drivers/inc/usb_core.h +++ b/middlewares/usb_drivers/inc/usb_core.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_core.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb core header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usb_std.h b/middlewares/usb_drivers/inc/usb_std.h index 3d42d3b..88a5e40 100644 --- a/middlewares/usb_drivers/inc/usb_std.h +++ b/middlewares/usb_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/usb_drivers/inc/usbd_core.h b/middlewares/usb_drivers/inc/usbd_core.h index a5d9e66..c1ee261 100644 --- a/middlewares/usb_drivers/inc/usbd_core.h +++ b/middlewares/usb_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 @@ -105,6 +105,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/usb_drivers/inc/usbd_int.h b/middlewares/usb_drivers/inc/usbd_int.h index 52b38a8..e7abca6 100644 --- a/middlewares/usb_drivers/inc/usbd_int.h +++ b/middlewares/usb_drivers/inc/usbd_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbd_int.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb interrupt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usbd_sdr.h b/middlewares/usb_drivers/inc/usbd_sdr.h index ff39e75..8cafbf1 100644 --- a/middlewares/usb_drivers/inc/usbd_sdr.h +++ b/middlewares/usb_drivers/inc/usbd_sdr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_sdr.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/usb_drivers/inc/usbh_core.h b/middlewares/usb_drivers/inc/usbh_core.h index 60c38b7..faef24c 100644 --- a/middlewares/usb_drivers/inc/usbh_core.h +++ b/middlewares/usb_drivers/inc/usbh_core.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_core.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host core header file ************************************************************************** * Copyright notice & Disclaimer @@ -240,11 +240,11 @@ typedef struct uint8_t hch_out; /*!< out channel number */ uint8_t ept0_size; /*!< endpoint 0 size */ uint8_t *buffer; /*!< endpoint 0 transfer buffer */ + usb_setup_type setup; /*!< control setup type */ uint16_t len; /*!< transfer length */ uint8_t err_cnt; /*!< error counter */ - uint16_t timer; /*!< transfer timer */ + uint32_t timer; /*!< transfer timer */ ctrl_sts_type sts; /*!< control transfer status */ - usb_setup_type setup; /*!< control setup type */ ctrl_ept0_sts_type state; /*!< endpoint 0 state */ } usbh_ctrl_type; @@ -345,7 +345,7 @@ void usbh_hc_open(usbh_core_type *uhost, uint8_t ept_num, uint8_t dev_address, uint8_t type, - uint8_t maxpacket, + uint16_t maxpacket, uint8_t speed); void usbh_active_vbus(usbh_core_type *uhost, confirm_state state); diff --git a/middlewares/usb_drivers/inc/usbh_ctrl.h b/middlewares/usb_drivers/inc/usbh_ctrl.h index b3ce276..4eb9a0e 100644 --- a/middlewares/usb_drivers/inc/usbh_ctrl.h +++ b/middlewares/usb_drivers/inc/usbh_ctrl.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_ctrl.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/usb_drivers/inc/usbh_int.h b/middlewares/usb_drivers/inc/usbh_int.h index ccc4636..2d2f3dc 100644 --- a/middlewares/usb_drivers/inc/usbh_int.h +++ b/middlewares/usb_drivers/inc/usbh_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_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/usb_drivers/src/usb_core.c b/middlewares/usb_drivers/src/usb_core.c index 4f60669..88638e4 100644 --- a/middlewares/usb_drivers/src/usb_core.c +++ b/middlewares/usb_drivers/src/usb_core.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_core.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb driver ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbd_core.c b/middlewares/usb_drivers/src/usbd_core.c index e496280..9c1be6f 100644 --- a/middlewares/usb_drivers/src/usbd_core.c +++ b/middlewares/usb_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 device driver ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbd_int.c b/middlewares/usb_drivers/src/usbd_int.c index 6155936..de82058 100644 --- a/middlewares/usb_drivers/src/usbd_int.c +++ b/middlewares/usb_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/usb_drivers/src/usbd_sdr.c b/middlewares/usb_drivers/src/usbd_sdr.c index fb21846..1f64b9c 100644 --- a/middlewares/usb_drivers/src/usbd_sdr.c +++ b/middlewares/usb_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/middlewares/usb_drivers/src/usbh_core.c b/middlewares/usb_drivers/src/usbh_core.c index 2f66221..a33339d 100644 --- a/middlewares/usb_drivers/src/usbh_core.c +++ b/middlewares/usb_drivers/src/usbh_core.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_core.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host driver ************************************************************************** * Copyright notice & Disclaimer @@ -424,6 +424,10 @@ usb_sts_type usbh_cfg_default_init(usbh_core_type *uhost) /* default speed is full speed */ uhost->dev.speed = USB_FULL_SPEED_CORE_ID; + uhost->timer = 0; + + uhost->ctrl.err_cnt = 0; + /* free all channel */ usbh_free_channel(uhost, uhost->ctrl.hch_in); usbh_free_channel(uhost, uhost->ctrl.hch_out); @@ -632,7 +636,7 @@ void usbh_hc_open(usbh_core_type *uhost, uint8_t ept_num, uint8_t dev_address, uint8_t type, - uint8_t maxpacket, + uint16_t maxpacket, uint8_t speed) { /* device address */ @@ -741,16 +745,16 @@ usb_sts_type usbh_ctrl_result_check(usbh_core_type *uhost, ctrl_ept0_sts_type ne } /** - * @brief auto alloc address (1...127) + * @brief auto alloc address (1...20) * @param none - * @retval address (1...127) + * @retval address (1...20) */ uint8_t usbh_alloc_address(void) { - static uint8_t address = 0; - if(address == 127) - address = 0; - return address + 1; + static uint8_t address = 1; + if(address == 20) + address = 1; + return address ++; } @@ -1163,6 +1167,7 @@ usb_sts_type usbh_loop_handler(usbh_core_type *uhost) if(uhost->port_enable) { uhost->global_state = USBH_ATTACHED; + usb_delay_ms(50); } break; diff --git a/middlewares/usb_drivers/src/usbh_ctrl.c b/middlewares/usb_drivers/src/usbh_ctrl.c index f8f39dd..3bb5a48 100644 --- a/middlewares/usb_drivers/src/usbh_ctrl.c +++ b/middlewares/usb_drivers/src/usbh_ctrl.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_ctrl.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host control request ************************************************************************** * Copyright notice & Disclaimer @@ -39,6 +39,9 @@ /** @defgroup USBH_ctrl_private_functions * @{ */ + +/* control timeout 5s */ +#define CTRL_TIMEOUT 5000 /** * @brief usb host control send setup packet @@ -158,15 +161,24 @@ usb_sts_type usbh_ctrl_setup_wait_handler(usbh_core_type *uhost, uint32_t *timeo uhost->ctrl.state = CONTROL_STATUS_IN; } } - uhost->ctrl.timer = OTG_HOST(uhost->usb_reg)->hfnum_bit.frnum; status = USB_OK; } - else if(urb_state == URB_ERROR) + else if(urb_state == URB_ERROR || urb_state == URB_NOTREADY) { uhost->ctrl.state = CONTROL_ERROR; uhost->ctrl.sts = CTRL_XACTERR; status = USB_ERROR; } + else + { + /* wait nak timeout 5s*/ + if(uhost->timer - uhost->ctrl.timer > CTRL_TIMEOUT) + { + uhost->ctrl.state = CONTROL_ERROR; + uhost->ctrl.sts = CTRL_XACTERR; + status = USB_ERROR; + } + } return status; } @@ -210,6 +222,17 @@ usb_sts_type usbh_ctrl_data_in_wait_handler(usbh_core_type *uhost, uint32_t time { uhost->ctrl.state = CONTROL_ERROR; } + else + { + /* wait nak timeout 5s*/ + if(uhost->timer - uhost->ctrl.timer > CTRL_TIMEOUT) + { + uhost->ctrl.state = CONTROL_ERROR; + uhost->ctrl.sts = CTRL_XACTERR; + status = USB_ERROR; + } + + } return status; } @@ -258,6 +281,16 @@ usb_sts_type usbh_ctrl_data_out_wait_handler(usbh_core_type *uhost, uint32_t tim { uhost->ctrl.state = CONTROL_DATA_OUT; } + else + { + /* wait nak timeout 5s*/ + if(uhost->timer - uhost->ctrl.timer > CTRL_TIMEOUT) + { + uhost->ctrl.state = CONTROL_ERROR; + uhost->ctrl.sts = CTRL_XACTERR; + status = USB_ERROR; + } + } return status; } @@ -301,6 +334,16 @@ usb_sts_type usbh_ctrl_status_in_wait_handler(usbh_core_type *uhost, uint32_t ti { uhost->ctrl.state = CONTROL_ERROR; } + else + { + /* wait nak timeout 5s*/ + if(uhost->timer - uhost->ctrl.timer > CTRL_TIMEOUT) + { + uhost->ctrl.state = CONTROL_ERROR; + uhost->ctrl.sts = CTRL_XACTERR; + status = USB_ERROR; + } + } return status; } @@ -347,6 +390,16 @@ usb_sts_type usbh_ctrl_status_out_wait_handler(usbh_core_type *uhost, uint32_t t { uhost->ctrl.state = CONTROL_STATUS_OUT; } + else + { + /* wait nak timeout 5s*/ + if(uhost->timer - uhost->ctrl.timer > CTRL_TIMEOUT) + { + uhost->ctrl.state = CONTROL_ERROR; + uhost->ctrl.sts = CTRL_XACTERR; + status = USB_ERROR; + } + } return status; } @@ -365,9 +418,9 @@ usb_sts_type usbh_ctrl_error_handler(usbh_core_type *uhost) else { uhost->ctrl.sts = CTRL_FAIL; - uhost->global_state = USBH_DISCONNECT; + uhost->global_state = USBH_ERROR_STATE; uhost->ctrl.err_cnt = 0; - USBH_DEBUG("control error: device not response"); + USBH_DEBUG("control error: **** Device No Response ****"); status = USB_ERROR; } return status; @@ -408,6 +461,7 @@ usb_sts_type usbh_ctrl_transfer_loop(usbh_core_type *uhost) { case CONTROL_SETUP: usbh_ctrl_setup_handler(uhost); + uhost->ctrl.timer = uhost->timer; break; case CONTROL_SETUP_WAIT: @@ -416,6 +470,7 @@ usb_sts_type usbh_ctrl_transfer_loop(usbh_core_type *uhost) case CONTROL_DATA_IN: usbh_ctrl_data_in_handler(uhost); + uhost->ctrl.timer = uhost->timer; break; case CONTROL_DATA_IN_WAIT: @@ -424,6 +479,7 @@ usb_sts_type usbh_ctrl_transfer_loop(usbh_core_type *uhost) case CONTROL_DATA_OUT: usbh_ctrl_data_out_handler(uhost); + uhost->ctrl.timer = uhost->timer; break; case CONTROL_DATA_OUT_WAIT: @@ -432,6 +488,7 @@ usb_sts_type usbh_ctrl_transfer_loop(usbh_core_type *uhost) case CONTROL_STATUS_IN: usbh_ctrl_status_in_handler(uhost); + uhost->ctrl.timer = uhost->timer; break; case CONTROL_STATUS_IN_WAIT: @@ -440,6 +497,7 @@ usb_sts_type usbh_ctrl_transfer_loop(usbh_core_type *uhost) case CONTROL_STATUS_OUT: usbh_ctrl_status_out_handler(uhost); + uhost->ctrl.timer = uhost->timer; break; case CONTROL_STATUS_OUT_WAIT: diff --git a/middlewares/usb_drivers/src/usbh_int.c b/middlewares/usb_drivers/src/usbh_int.c index b9de7f0..76f4b67 100644 --- a/middlewares/usb_drivers/src/usbh_int.c +++ b/middlewares/usb_drivers/src/usbh_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_int.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host interrupt request ************************************************************************** * Copyright notice & Disclaimer @@ -133,12 +133,9 @@ void usbh_sof_handler(usbh_core_type *uhost) void usbh_disconnect_handler(usbh_core_type *uhost) { otg_global_type *usbx = uhost->usb_reg; - otg_host_type *usb_host = OTG_HOST(usbx); + uint8_t i_index; - usb_host->hprt &= ~(USB_OTG_HPRT_PRTENA | USB_OTG_HPRT_PRTENCHNG | - USB_OTG_HPRT_PRTOVRCACT | USB_OTG_HPRT_PRTCONDET); - usb_host_disable(usbx); uhost->conn_sts = 0; @@ -225,11 +222,25 @@ void usbh_hch_in_handler(usbh_core_type *uhost, uint8_t chn) else if(uhost->hch[chn].state == HCH_XACTERR || uhost->hch[chn].state == HCH_DATATGLERR) { - uhost->urb_state[chn] = URB_ERROR; - + uhost->err_cnt[chn] ++; + if(uhost->err_cnt[chn] > 3) + { + uhost->urb_state[chn] = URB_ERROR; + uhost->err_cnt[chn] = 0; + } + else + { + uhost->urb_state[chn] = URB_NOTREADY; + } usb_chh->hcchar_bit.chdis = FALSE; usb_chh->hcchar_bit.chena = TRUE; } + else if(uhost->hch[chn].state == HCH_NAK) + { + usb_chh->hcchar_bit.chdis = FALSE; + usb_chh->hcchar_bit.chena = TRUE; + uhost->urb_state[chn] = URB_NOTREADY; + } usb_chh->hcint = USB_OTG_HC_CHHLTD_FLAG; } else if(hcint_value & USB_OTG_HC_XACTERR_FLAG) @@ -237,18 +248,22 @@ void usbh_hch_in_handler(usbh_core_type *uhost, uint8_t chn) usb_chh->hcintmsk_bit.chhltdmsk = TRUE; uhost->hch[chn].state = HCH_XACTERR; usb_hch_halt(usbx, chn); + uhost->err_cnt[chn] ++; usb_chh->hcint = USB_OTG_HC_XACTERR_FLAG; } else if(hcint_value & USB_OTG_HC_NAK_FLAG) { if(usb_chh->hcchar_bit.eptype == EPT_INT_TYPE) { + uhost->err_cnt[chn] = 0; usb_chh->hcintmsk_bit.chhltdmsk = TRUE; usb_hch_halt(usbx, chn); } else if(usb_chh->hcchar_bit.eptype == EPT_BULK_TYPE || usb_chh->hcchar_bit.eptype == EPT_CONTROL_TYPE) { + uhost->err_cnt[chn] = 0; + usb_chh->hcintmsk_bit.chhltdmsk = TRUE; usb_chh->hcchar_bit.chdis = FALSE; usb_chh->hcchar_bit.chena = TRUE; } @@ -310,7 +325,8 @@ void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn) if(uhost->hch[chn].state == HCH_XFRC) { uhost->urb_state[chn] = URB_DONE; - if(uhost->hch[chn].ept_type == EPT_BULK_TYPE) + if(uhost->hch[chn].ept_type == EPT_BULK_TYPE || + uhost->hch[chn].ept_type == EPT_INT_TYPE) { uhost->hch[chn].toggle_out ^= 1; } @@ -326,7 +342,16 @@ void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn) else if(uhost->hch[chn].state == HCH_XACTERR || uhost->hch[chn].state == HCH_DATATGLERR) { - uhost->urb_state[chn] = URB_ERROR; + uhost->err_cnt[chn] ++; + if(uhost->err_cnt[chn] > 3) + { + uhost->urb_state[chn] = URB_ERROR; + uhost->err_cnt[chn] = 0; + } + else + { + uhost->urb_state[chn] = URB_NOTREADY; + } usb_chh->hcchar_bit.chdis = FALSE; usb_chh->hcchar_bit.chena = TRUE; @@ -336,6 +361,7 @@ void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn) else if( hcint_value & USB_OTG_HC_XACTERR_FLAG) { usb_chh->hcintmsk_bit.chhltdmsk = TRUE; + uhost->err_cnt[chn] ++; uhost->hch[chn].state = HCH_XACTERR; usb_hch_halt(usbx, chn); usb_chh->hcint = USB_OTG_HC_XACTERR_FLAG | USB_OTG_HC_NAK_FLAG; @@ -343,6 +369,7 @@ void usbh_hch_out_handler(usbh_core_type *uhost, uint8_t chn) else if( hcint_value & USB_OTG_HC_NAK_FLAG) { usb_chh->hcintmsk_bit.chhltdmsk = TRUE; + uhost->err_cnt[chn] = 0; usb_hch_halt(usbx, chn); uhost->hch[chn].state = HCH_NAK; usb_chh->hcint = USB_OTG_HC_NAK_FLAG; @@ -477,8 +504,7 @@ void usbh_port_handler(usbh_core_type *uhost) else { /* clean up hprt */ - usb_host->hprt &= ~(USB_OTG_HPRT_PRTENA | USB_OTG_HPRT_PRTENCHNG | - USB_OTG_HPRT_PRTOVRCACT | USB_OTG_HPRT_PRTCONDET); + uhost->port_enable = 0; } } diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c index 6756a60..70aac69 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,29 +41,27 @@ * @{ */ -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_inisoincom_event(void *udev); -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_inisoincom_event(void *udev); +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}; -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_class_handler = { @@ -76,6 +74,7 @@ usbd_class_handler audio_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &audio_struct }; /** @@ -83,10 +82,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; /* open microphone in endpoint */ usbd_ept_open(pudev, USBD_AUDIO_MIC_IN_EPT, EPT_ISO_TYPE, AUDIO_MIC_IN_MAXPACKET_SIZE); @@ -98,7 +98,7 @@ usb_sts_type class_init_handler(void *udev) usbd_ept_open(pudev, USBD_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_AUDIO_SPK_OUT_EPT, paudio->audio_spk_data, AUDIO_SPK_OUT_MAXPACKET_SIZE); return status; } @@ -108,7 +108,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; @@ -133,7 +133,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; @@ -177,8 +177,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 { @@ -211,7 +212,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; @@ -225,60 +226,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: @@ -295,9 +297,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... @@ -305,14 +309,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); + len = audio_codec_mic_get_data(paudio->audio_mic_data); usbd_flush_tx_fifo(udev, USBD_AUDIO_MIC_IN_EPT); - usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, audio_struct.audio_mic_data, len); + usbd_ept_send(udev, USBD_AUDIO_MIC_IN_EPT, paudio->audio_mic_data, len); } else if((ept_num & 0x7F) == (USBD_AUDIO_FEEDBACK_EPT & 0x7F)) { - audio_feedback_state = 0; + paudio->audio_feedback_state = 0; } return status; @@ -324,10 +328,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 */ @@ -336,10 +341,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_spk_out_stage = 1; + audio_codec_spk_fifo_write(paudio->audio_spk_data, g_rxlen); + paudio->audio_spk_out_stage = 1; /* 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; @@ -350,33 +355,35 @@ 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; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; #if AUDIO_SUPPORT_FEEDBACK - if(audio_spk_out_stage & 2) + if(paudio->audio_spk_out_stage & 2) { - audio_spk_out_stage = 0; + paudio->audio_spk_out_stage = 0; } - else if( audio_spk_out_stage ) + else if( paudio->audio_spk_out_stage ) { - audio_spk_out_stage |= 2; + paudio->audio_spk_out_stage |= 2; - if( 0 == audio_feedback_state ) + if( 0 == paudio->audio_feedback_state ) { usbd_core_type *pudev = (usbd_core_type *)udev; - int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); - audio_feedback_state = 1; + int len = audio_codec_spk_feedback(paudio->audio_feed_back); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, paudio->audio_feed_back, len); + paudio->audio_feedback_state = 1; } - if( audio_feedback_state++ > (1<audio_feedback_state++ > (1<audio_feed_back); usbd_flush_tx_fifo(pudev, USBD_AUDIO_FEEDBACK_EPT); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); - audio_feedback_state = 1; + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, paudio->audio_feed_back, len); + paudio->audio_feedback_state = 1; } } #endif @@ -391,9 +398,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_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; switch(event) { case USBD_RESET_EVENT: @@ -402,10 +411,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; @@ -428,10 +437,11 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param udev: usb device core handler type * @retval none */ -void audio_inisoincom_event(void *udev) +static void audio_inisoincom_event(void *udev) { #if 0 usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_type *paudio = (usb_audio_type *)pudev->class_handler->pdata; uint32_t fnsof = OTG_DEVICE(pudev->usb_reg)->dsts_bit.soffn; uint32_t epctl_fb = USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.dpid; uint32_t epctl_in = USB_INEPT(pudev->usb_reg, (USBD_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.dpid; @@ -443,7 +453,7 @@ void audio_inisoincom_event(void *udev) USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.snak = 1; usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_FEEDBACK_EPT&0x7F); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, 3); + usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, paudio->audio_feed_back, 3); } if((fnsof & 0x1) == epctl_in) @@ -452,8 +462,8 @@ void audio_inisoincom_event(void *udev) USB_INEPT(pudev->usb_reg, (USBD_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.snak = 1; usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_MIC_IN_EPT&0x7F); - 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); } #endif } @@ -464,33 +474,34 @@ void audio_inisoincom_event(void *udev) * @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); } } @@ -502,32 +513,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; @@ -541,18 +553,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); } } @@ -562,18 +575,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); } } @@ -583,18 +597,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); } } @@ -604,28 +619,29 @@ 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 ) { - 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); } } 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); } } @@ -638,16 +654,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(pudev, (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(pudev, (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 0c2032e..09c45ac 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 @@ -108,6 +108,9 @@ 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]; + + __IO uint16_t audio_feedback_state; + __IO uint8_t audio_spk_out_stage; }usb_audio_type; extern usbd_class_handler audio_class_handler; diff --git a/middlewares/usbd_class/audio/audio_conf.h b/middlewares/usbd_class/audio/audio_conf.h index 3830524..2effe7c 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 b16fbcc..92a8750 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 */ @@ -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 f328f68..3ee1954 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 157e4c0..51028f6 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 33689ab..2944bfc 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,39 +41,28 @@ * @{ */ -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_inisoincom_event(void *udev); -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_inisoincom_event(void *udev); +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, @@ -85,6 +74,7 @@ usbd_class_handler audio_hid_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &audio_hid_struct }; /** @@ -92,32 +82,33 @@ 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; /* 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); /* 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 /* 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; } @@ -127,27 +118,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; } @@ -159,7 +150,7 @@ usb_sts_type class_clear_handler(void *udev) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup) +static usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup) { usb_sts_type status = USB_OK; usbd_core_type *pudev = (usbd_core_type *)udev; @@ -202,8 +193,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 { @@ -238,10 +230,11 @@ usb_sts_type class_audio_setup_handler(void *udev, usb_setup_type *setup) * @param setup: setup packet * @retval status of usb_sts_type */ -usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup) +static 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; @@ -252,20 +245,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); @@ -279,21 +272,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; @@ -311,7 +304,7 @@ usb_sts_type class_hid_setup_handler(void *udev, usb_setup_type *setup) * @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; @@ -342,7 +335,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; @@ -356,74 +349,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: @@ -441,28 +435,30 @@ 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_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_flush_tx_fifo(udev, USBD_AUDIO_MIC_IN_EPT); - 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_flush_tx_fifo(udev, USBD_AUHID_AUDIO_MIC_IN_EPT); + usbd_ept_send(udev, USBD_AUHID_AUDIO_MIC_IN_EPT, paudio_hid->audio_mic_data, len); } - else if((ept_num & 0x7F) == (USBD_AUDIO_FEEDBACK_EPT & 0x7F)) + else if((ept_num & 0x7F) == (USBD_AUHID_AUDIO_FEEDBACK_EPT & 0x7F)) { - audio_feedback_state = 0; + paudio_hid->audio_feedback_state = 0; } - else if((ept_num & 0x7F) == (USBD_HID_IN_EPT & 0x7F)) + else if((ept_num & 0x7F) == (USBD_AUHID_HID_IN_EPT & 0x7F)) { - usbd_flush_tx_fifo(udev, USBD_HID_IN_EPT); + usbd_flush_tx_fifo(udev, USBD_AUHID_HID_IN_EPT); } return status; @@ -474,30 +470,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_spk_out_stage = 1; + audio_codec_spk_fifo_write(paudio_hid->audio_spk_data, g_rxlen); + paudio_hid->audio_spk_out_stage = 1; /* 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; } @@ -507,33 +504,35 @@ 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; + usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; #if AUDIO_SUPPORT_FEEDBACK - if(audio_spk_out_stage & 2) + if(paudio_hid->audio_spk_out_stage & 2) { - audio_spk_out_stage = 0; + paudio_hid->audio_spk_out_stage = 0; } - else if( audio_spk_out_stage ) + else if( paudio_hid->audio_spk_out_stage ) { - audio_spk_out_stage |= 2; + paudio_hid->audio_spk_out_stage |= 2; - if( 0 == audio_feedback_state ) + if( 0 == paudio_hid->audio_feedback_state ) { usbd_core_type *pudev = (usbd_core_type *)udev; - int len = audio_codec_spk_feedback(audio_struct.audio_feed_back); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, len); - audio_feedback_state = 1; + int len = audio_codec_spk_feedback(paudio_hid->audio_feed_back); + usbd_ept_send(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT, paudio_hid->audio_feed_back, len); + paudio_hid->audio_feedback_state = 1; } - if( audio_feedback_state++ > (1<audio_feedback_state++ > (1<audio_feed_back); + usbd_flush_tx_fifo(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT); + usbd_ept_send(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT, paudio_hid->audio_feed_back, len); + paudio_hid->audio_feedback_state = 1; } } #endif @@ -548,9 +547,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: @@ -559,10 +560,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; @@ -585,32 +586,33 @@ usb_sts_type class_event_handler(void *udev, usbd_event_type event) * @param udev: usb device core handler type * @retval none */ -void audio_inisoincom_event(void *udev) +static void audio_inisoincom_event(void *udev) { #if 0 usbd_core_type *pudev = (usbd_core_type *)udev; + usb_audio_hid_type *paudio_hid = (usb_audio_hid_type *)pudev->class_handler->pdata; uint32_t fnsof = OTG_DEVICE(pudev->usb_reg)->dsts_bit.soffn; - uint32_t epctl_fb = USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.dpid; - uint32_t epctl_in = USB_INEPT(pudev->usb_reg, (USBD_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.dpid; + uint32_t epctl_fb = USB_INEPT(pudev->usb_reg, (USBD_AUHID_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.dpid; + uint32_t epctl_in = USB_INEPT(pudev->usb_reg, (USBD_AUHID_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.dpid; uint32_t len = 0; if((fnsof & 0x1) == epctl_fb) { - USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.eptdis = 1; - USB_INEPT(pudev->usb_reg, (USBD_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.snak = 1; - usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_FEEDBACK_EPT&0x7F); + USB_INEPT(pudev->usb_reg, (USBD_AUHID_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.eptdis = 1; + USB_INEPT(pudev->usb_reg, (USBD_AUHID_AUDIO_FEEDBACK_EPT&0x7F))->diepctl_bit.snak = 1; + usb_flush_tx_fifo(pudev->usb_reg, USBD_AUHID_AUDIO_FEEDBACK_EPT&0x7F); - usbd_ept_send(pudev, USBD_AUDIO_FEEDBACK_EPT, audio_struct.audio_feed_back, 3); + usbd_ept_send(pudev, USBD_AUHID_AUDIO_FEEDBACK_EPT, paudio_hid->audio_feed_back, 3); } if((fnsof & 0x1) == epctl_in) { - USB_INEPT(pudev->usb_reg, (USBD_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.eptdis = 1; - USB_INEPT(pudev->usb_reg, (USBD_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.snak = 1; - usb_flush_tx_fifo(pudev->usb_reg, USBD_AUDIO_MIC_IN_EPT&0x7F); + USB_INEPT(pudev->usb_reg, (USBD_AUHID_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.eptdis = 1; + USB_INEPT(pudev->usb_reg, (USBD_AUHID_AUDIO_MIC_IN_EPT&0x7F))->diepctl_bit.snak = 1; + usb_flush_tx_fifo(pudev->usb_reg, USBD_AUHID_AUDIO_MIC_IN_EPT&0x7F); - 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); } #endif } @@ -621,33 +623,34 @@ void audio_inisoincom_event(void *udev) * @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); } } @@ -659,32 +662,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; @@ -698,18 +702,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); } } @@ -719,18 +724,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); } } @@ -740,18 +746,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); } } @@ -761,28 +768,29 @@ 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 ) { - 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(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); } } @@ -794,16 +802,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(pudev, (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(pudev, (uint8_t *)&audio_struct.mic_alt_setting, 1); + usbd_ctrl_send(pudev, (uint8_t *)&paudio_hid->mic_alt_setting, 1); } } @@ -815,13 +824,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; } @@ -834,15 +843,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); } @@ -852,7 +862,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); } @@ -862,7 +872,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); } @@ -874,9 +884,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 196ab9b..11a2a2d 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 0x82 -#define USBD_HID_OUT_EPT 0x01 +#define USBD_AUHID_HID_IN_EPT 0x82 +#define USBD_AUHID_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_AUHID_IN_MAXPACKET_SIZE 0x40 +#define USBD_AUHID_OUT_MAXPACKET_SIZE 0x40 /** * @brief endpoint support max size @@ -106,24 +106,12 @@ 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 */ typedef struct { + /* audio */ uint8_t enpd; uint8_t interface; uint8_t request_no; @@ -144,11 +132,23 @@ 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; + __IO uint16_t audio_feedback_state; + __IO uint8_t audio_spk_out_stage; + + + /* 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 0bea803..709ec23 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 @@ -40,20 +40,18 @@ /** @defgroup USB_audio_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]; @@ -81,7 +79,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,14 +89,14 @@ 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_AUHID_VENDOR_ID), /* idVendor */ + HBYTE(USBD_AUHID_VENDOR_ID), /* idVendor */ #if AUDIO_SUPPORT_FEEDBACK - LBYTE(USBD_PRODUCT_ID), /* idProduct */ - HBYTE(USBD_PRODUCT_ID), /* idProduct */ + LBYTE(USBD_AUHID_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_AUHID_PRODUCT_ID), /* idProduct */ #else - LBYTE(USBD_PRODUCT_ID+1), /* idProduct */ - HBYTE(USBD_PRODUCT_ID+1), /* idProduct */ + LBYTE(USBD_AUHID_PRODUCT_ID+1), /* idProduct */ + HBYTE(USBD_AUHID_PRODUCT_ID+1), /* idProduct */ #endif 0x00, /* bcdDevice rel. 2.00 */ 0x02, @@ -114,12 +112,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 @@ -140,8 +138,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 */ @@ -281,11 +279,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 */ @@ -345,14 +343,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 @@ -368,7 +366,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 */ @@ -394,29 +392,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 */ }; @@ -426,7 +424,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) */ @@ -524,17 +522,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 */ }; @@ -544,9 +542,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, @@ -558,42 +556,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 @@ -601,7 +599,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; @@ -675,7 +673,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; } @@ -685,7 +683,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; } @@ -695,7 +693,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; } @@ -705,7 +703,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; } @@ -715,7 +713,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; } @@ -726,9 +724,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; } @@ -738,9 +736,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; } @@ -750,7 +748,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; @@ -761,9 +759,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; } @@ -773,9 +771,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 048b49a..dff5f7b 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 0x5555 - -#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 743d070..59f54ae 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,31 +77,33 @@ usbd_class_handler class_handler = class_out_handler, class_sof_handler, class_event_handler, + &cdc_struct }; - /** * @brief initialize usb custom hid endpoint * @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; + + /* init cdc struct */ + cdc_struct_init(pcdc); /* 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); - - g_tx_completed = 1; + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdc->g_rx_buff, USBD_CDC_OUT_MAXPACKET_SIZE); return status; } @@ -117,7 +113,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; @@ -140,10 +136,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) { @@ -153,14 +150,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); } } @@ -173,10 +170,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; @@ -194,7 +191,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; @@ -208,16 +205,17 @@ 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; + 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; @@ -229,16 +227,17 @@ 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 */ usbd_flush_tx_fifo(pudev, ept_num); - g_tx_completed = 1; + pcdc->g_tx_completed = 1; return status; } @@ -249,16 +248,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; } @@ -268,7 +268,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; @@ -283,7 +283,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 +313,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,21 +339,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 = g_rxlen; + uint16_t tmp_len = 0; usbd_core_type *pudev = (usbd_core_type *)udev; + 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; } @@ -352,9 +370,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 @@ -364,7 +383,6 @@ error_status usb_vcp_send_data(void *udev, uint8_t *send_data, uint16_t len) return status; } - /** * @brief usb device function * @param udev: to the structure of usbd_core_type @@ -373,25 +391,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 2a3d202..563c0e7 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 2cc3421..4a51374 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 @@ -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]; @@ -61,7 +61,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, @@ -81,7 +81,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 */ @@ -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_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 */ @@ -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_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 @@ -135,8 +135,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 */ @@ -159,9 +159,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 */ @@ -178,16 +178,16 @@ 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 */ + 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 */ + 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 */ }; @@ -197,9 +197,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, @@ -211,42 +211,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 @@ -254,7 +254,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; @@ -328,7 +328,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; } @@ -338,7 +338,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; } @@ -348,7 +348,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; } @@ -358,7 +358,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; } @@ -368,7 +368,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; } @@ -379,9 +379,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; } @@ -391,9 +391,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; } @@ -403,7 +403,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; @@ -414,9 +414,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; } @@ -426,9 +426,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 1789834..b78689e 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,14 +83,11 @@ extern "C" { #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 desc_handler; +extern usbd_desc_handler cdc_desc_handler; /** 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 2e97662..08107db 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,29 +221,34 @@ 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; /* 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; } @@ -263,22 +257,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; } @@ -289,14 +283,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(udev, setup); } @@ -318,11 +312,12 @@ 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) { /* class request */ @@ -331,14 +326,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(udev, 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); } } @@ -351,10 +346,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; @@ -373,10 +368,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; @@ -387,20 +383,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); @@ -414,21 +410,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; @@ -446,7 +442,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; @@ -460,22 +456,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; } @@ -486,20 +483,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; } @@ -512,16 +511,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; } @@ -531,7 +531,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; @@ -546,7 +546,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) @@ -577,25 +577,25 @@ 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; - uint16_t tmp_len = g_rxlen; usbd_core_type *pudev = (usbd_core_type *)udev; - - if(g_rx_completed == 0) + vcp_keyboard_type *vcpkybrd = (vcp_keyboard_type *)pudev->class_handler->pdata; + uint16_t tmp_len = 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; } @@ -607,14 +607,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 { @@ -632,25 +633,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: @@ -665,13 +668,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; } @@ -683,7 +686,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; @@ -712,13 +715,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 83a9418..8dc1c29 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 39ecb72..441d649 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 5d84c84..e11d5e8 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,11 +97,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_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 2a0dbb3..0f5a0bf 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 }; /** @@ -81,19 +73,19 @@ usbd_class_handler custom_hid_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; - + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; /* 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; } @@ -103,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 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; } @@ -123,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; + custom_hid_type *pcshid = (custom_hid_type *)pudev->class_handler->pdata; uint16_t len; uint8_t *buf; @@ -137,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; + 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); @@ -164,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_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; @@ -196,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; @@ -210,17 +203,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; @@ -232,7 +226,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; @@ -249,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; + 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; } @@ -271,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; @@ -286,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) @@ -318,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 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; } @@ -336,15 +331,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); } @@ -354,7 +350,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); } @@ -364,7 +360,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); } @@ -376,9 +372,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 cec1d25..e033104 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 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 913c69b..30314ee 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 78c4f88..4bbb340 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; /** * @} diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.c b/middlewares/usbd_class/hid_iap/hid_iap_class.c index 7eded6b..2cfb77f 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 @@ -41,26 +41,15 @@ */ -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; @@ -76,6 +65,7 @@ usbd_class_handler hid_iap_class_handler = class_out_handler, class_sof_handler, class_event_handler, + &iap_info }; /** @@ -83,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; } @@ -105,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; } @@ -125,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; @@ -139,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); @@ -166,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; @@ -198,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; @@ -212,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; @@ -233,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; @@ -251,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, USBD_OUT_MAXPACKET_SIZE); + usbd_ept_recv(pudev, USBD_HIDIAP_OUT_EPT, piap->g_rxhid_buff, USBD_HIDIAP_OUT_MAXPACKET_SIZE); return status; } @@ -273,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; @@ -288,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) @@ -320,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 5a95cd8..5c8eb96 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 @@ -49,23 +49,11 @@ extern "C" { */ -#define USBD_HID_IN_EPT 0x81 -#define USBD_HID_OUT_EPT 0x01 +#define USBD_HIDIAP_IN_EPT 0x81 +#define USBD_HIDIAP_OUT_EPT 0x01 -#define USBD_IN_MAXPACKET_SIZE 0x40 -#define USBD_OUT_MAXPACKET_SIZE 0x40 - -#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) @@ -117,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; @@ -133,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); diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.c b/middlewares/usbd_class/hid_iap/hid_iap_desc.c index ae8bf13..babef2b 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 iap device descriptor ************************************************************************** * Copyright notice & Disclaimer @@ -43,18 +43,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]; @@ -82,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 */ @@ -92,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 */ @@ -110,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 @@ -135,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 */ }; /** @@ -166,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) */ @@ -197,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 */ }; @@ -217,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, @@ -231,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 @@ -274,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; @@ -348,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; } @@ -358,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; } @@ -368,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; } @@ -378,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; } @@ -388,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; } @@ -399,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; } @@ -411,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; } @@ -423,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; @@ -434,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; } @@ -446,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; } diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.h b/middlewares/usbd_class/hid_iap/hid_iap_desc.h index 6511f95..0f04bbc 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 iap descriptor header file ************************************************************************** * Copyright notice & Disclaimer @@ -48,36 +48,28 @@ extern "C" { */ -#define HID_BCD_NUM 0x0110 +#define HIDIAP_BCD_NUM 0x0110 -#define HID_CLASS_DESC_HID 0x21 -#define HID_CLASS_DESC_REPORT 0x22 -#define HID_CLASS_DESC_PHYSICAL 0x23 +#define USBD_HIDIAP_VENDOR_ID 0x2E3C +#define USBD_HIDIAP_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_VENDOR_ID 0x2E3C -#define USBD_PRODUCT_ID 0xAF01 +#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 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 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; diff --git a/middlewares/usbd_class/keyboard/keyboard_class.c b/middlewares/usbd_class/keyboard/keyboard_class.c index 9abc71f..d9e2e2e 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; -uint8_t hid_set_report[64]; -__IO uint8_t hid_suspend_flag = 0; -__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,15 +205,16 @@ 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; /* 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; } @@ -230,13 +224,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; } @@ -247,10 +241,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; @@ -261,20 +256,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); @@ -288,21 +283,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; @@ -320,7 +315,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; @@ -334,16 +329,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; @@ -355,14 +351,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; } @@ -373,7 +371,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; @@ -385,7 +383,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; @@ -400,9 +398,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: @@ -411,7 +411,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; @@ -432,13 +432,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; } @@ -453,8 +453,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) { @@ -475,17 +475,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 589ae98..ad72967 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 235e615..76a5ac8 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,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_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 @@ -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 051f5e9..2120119 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; /** diff --git a/middlewares/usbd_class/mouse/mouse_class.c b/middlewares/usbd_class/mouse/mouse_class.c index b17fc28..0443013 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,13 +72,13 @@ 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; /* 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; } @@ -93,13 +88,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; } @@ -110,10 +105,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; @@ -124,20 +120,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); @@ -151,21 +147,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; } break; @@ -181,7 +177,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; @@ -195,16 +191,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; @@ -216,7 +213,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; @@ -233,7 +230,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; @@ -245,7 +242,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; @@ -260,9 +257,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: @@ -271,7 +270,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; @@ -292,15 +291,15 @@ 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_flush_tx_fifo(pudev, USBD_HID_IN_EPT); - usbd_ept_send(pudev, USBD_HID_IN_EPT, report, len); + usbd_flush_tx_fifo(pudev, USBD_MOUSE_IN_EPT); + usbd_ept_send(pudev, USBD_MOUSE_IN_EPT, report, len); } return status; @@ -314,7 +313,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) { @@ -345,11 +345,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 5af5694..44b93ac 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,7 +99,7 @@ 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 0da90eb..6941368 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,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_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 @@ -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 47e6abf..9ed1ea8 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; /** diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.c b/middlewares/usbd_class/msc/msc_bot_scsi.c index 3fc4f93..4755759 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,14 +104,20 @@ 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; - usb_flush_tx_fifo(pudev->usb_reg, USBD_MSC_BULK_IN_EPT&0x7F); + pmsc->csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; + pmsc->csw_struct.dCSWDataResidue = 0; + pmsc->csw_struct.dCSWSignature = 0; + pmsc->csw_struct.dCSWTag = CSW_BCSWSTATUS_PASS; + + usbd_flush_tx_fifo(pudev, USBD_MSC_BULK_IN_EPT&0x7F); /* 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); } /** @@ -131,13 +128,14 @@ 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; - usb_flush_tx_fifo(pudev->usb_reg, USBD_MSC_BULK_IN_EPT&0x7F); + 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; + usbd_flush_tx_fifo(pudev, USBD_MSC_BULK_IN_EPT&0x7F); /* 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); } /** @@ -148,7 +146,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) @@ -175,7 +175,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); @@ -198,18 +200,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 @@ -218,17 +221,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); } } } @@ -244,12 +247,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); @@ -264,16 +268,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); } @@ -301,7 +306,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; @@ -317,18 +324,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); } } @@ -341,13 +350,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; } @@ -362,8 +374,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; @@ -371,9 +385,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 { @@ -381,11 +395,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; } @@ -398,7 +412,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; } @@ -410,7 +426,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; } @@ -423,11 +441,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; } @@ -441,11 +461,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; } @@ -458,21 +480,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; } @@ -483,28 +506,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; } @@ -518,7 +543,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) @@ -527,13 +554,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; } @@ -546,21 +573,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; } @@ -572,52 +601,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; @@ -632,62 +662,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; @@ -702,13 +733,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); } @@ -722,54 +753,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 9c46ea5..78e7600 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 e224ea8..cd92de3 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,17 +148,17 @@ 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); if((setup->wIndex & 0x80) == 0x80) { - usb_flush_tx_fifo(pudev->usb_reg, setup->wIndex & 0x7F); + usbd_flush_tx_fifo(pudev, setup->wIndex & 0x7F); usbd_ept_open(pudev, (uint8_t)setup->wIndex, EPT_BULK_TYPE, USBD_IN_MAXPACKET_SIZE); } else @@ -186,7 +183,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; @@ -200,7 +197,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; @@ -215,11 +212,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_flush_tx_fifo(pudev->usb_reg, ept_num&0x7F); + usbd_flush_tx_fifo(pudev, ept_num&0x7F); bot_scsi_datain_handler(udev, ept_num); return status; } @@ -230,9 +227,10 @@ 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); return status; } @@ -242,7 +240,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; @@ -257,7 +255,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 13b4541..4af76b3 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 f464e7a..c5a8c16 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 8a8767e..85f1701 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; /** diff --git a/middlewares/usbd_class/printer/printer_class.c b/middlewares/usbd_class/printer/printer_class.c index 4d144b8..1f99e97 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,35 +40,28 @@ * @{ */ -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]; -__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 class_handler = +usbd_class_handler printer_class_handler = { class_init_handler, class_clear_handler, @@ -79,6 +72,7 @@ usbd_class_handler class_handler = class_out_handler, class_sof_handler, class_event_handler, + &printer_struct }; /** @@ -86,21 +80,23 @@ 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; + 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; } @@ -110,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; @@ -130,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) { @@ -142,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); @@ -163,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; @@ -184,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; @@ -198,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; @@ -213,16 +210,17 @@ 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 */ usbd_flush_tx_fifo(pudev, ept_num); - g_tx_completed = 1; + pprter->g_tx_completed = 1; return status; } @@ -233,12 +231,14 @@ 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; /*set recv flag*/ - g_rx_completed = 1; + pprter->g_rx_completed = 1; return status; } @@ -248,7 +248,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; @@ -263,7 +263,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) @@ -304,9 +304,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 4f0cb07..087eb12 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 cdc 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,18 +64,17 @@ 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; +}printer_type; -extern usbd_class_handler class_handler; +extern usbd_class_handler printer_class_handler; uint16_t usb_printer_get_rxdata(void *udev, uint8_t *recv_data); error_status usb_printer_send_data(void *udev, uint8_t *send_data, uint16_t len); /** diff --git a/middlewares/usbd_class/printer/printer_desc.c b/middlewares/usbd_class/printer/printer_desc.c index 958c335..23c95cb 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]; @@ -61,7 +61,7 @@ static uint8_t g_usbd_desc_buffer[256]; /** * @brief device descriptor handler structure */ -usbd_desc_handler desc_handler = +usbd_desc_handler printer_desc_handler = { get_device_descriptor, get_device_qualifier, @@ -81,7 +81,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 */ @@ -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 f9c2e5b..4a6151e 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,35 +47,32 @@ 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 desc_handler; +extern usbd_desc_handler printer_desc_handler; /** * @} diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_class.c b/middlewares/usbh_class/usbh_hid/usbh_hid_class.c index 96e0735..514c04f 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_class.c +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_class.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host hid class type ************************************************************************** * Copyright notice & Disclaimer @@ -43,13 +43,13 @@ * @{ */ - usb_sts_type uhost_init_handler(void *uhost); - usb_sts_type uhost_reset_handler(void *uhost); - usb_sts_type uhost_request_handler(void *uhost); - usb_sts_type uhost_process_handler(void *uhost); + static usb_sts_type uhost_init_handler(void *uhost); + static usb_sts_type uhost_reset_handler(void *uhost); + static usb_sts_type uhost_request_handler(void *uhost); + static usb_sts_type uhost_process_handler(void *uhost); usbh_hid_type usbh_hid; - usbh_class_handler_type uhost_class_handler = + usbh_class_handler_type uhost_hid_class_handler = { uhost_init_handler, uhost_reset_handler, @@ -63,7 +63,7 @@ * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_init_handler(void *uhost) +static usb_sts_type uhost_init_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usb_sts_type status = USB_OK; @@ -107,6 +107,7 @@ usb_sts_type uhost_init_handler(void *uhost) puhost->dev.address, EPT_INT_TYPE, phid->in_maxpacket, puhost->dev.speed); + usbh_set_toggle(puhost, phid->chin, 0); } else { @@ -121,6 +122,7 @@ usb_sts_type uhost_init_handler(void *uhost) puhost->dev.address, EPT_INT_TYPE, phid->out_maxpacket, puhost->dev.speed); + usbh_set_toggle(puhost, phid->chout, 0); } } phid->ctrl_state = USB_HID_STATE_IDLE; @@ -132,7 +134,7 @@ usb_sts_type uhost_init_handler(void *uhost) * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_reset_handler(void *uhost) +static usb_sts_type uhost_reset_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_hid_type *phid = (usbh_hid_type *)puhost->class_handler->pdata; @@ -333,7 +335,7 @@ usb_sts_type usbh_clear_endpoint_feature(usbh_core_type *uhost, uint8_t ept_num, * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_request_handler(void *uhost) +static usb_sts_type uhost_request_handler(void *uhost) { usb_sts_type status = USB_WAIT; usbh_core_type *puhost = (usbh_core_type *)uhost; @@ -384,7 +386,7 @@ usb_sts_type uhost_request_handler(void *uhost) * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_process_handler(void *uhost) +static usb_sts_type uhost_process_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_hid_type *phid = (usbh_hid_type *)puhost->class_handler->pdata; diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_class.h b/middlewares/usbh_class/usbh_hid/usbh_hid_class.h index 5943786..f57af7b 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_class.h +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_class.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host hid class header file ************************************************************************** * Copyright notice & Disclaimer @@ -127,7 +127,7 @@ typedef struct uint32_t buffer[16]; }usbh_hid_type; -extern usbh_class_handler_type uhost_class_handler; +extern usbh_class_handler_type uhost_hid_class_handler; /** diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c index eed5716..d0efc73 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_keyboard.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host hid keyboard type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h index 9392dc1..8e13ea2 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_keyboard.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host hid keyboard header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c index 77e359e..743d6ae 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_mouse.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host hid mouse type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h index 0e85706..0cda7dc 100644 --- a/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h +++ b/middlewares/usbh_class/usbh_hid/usbh_hid_mouse.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_hid_mouse.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host hid mouse header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c index 83e2937..5b8168e 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_bot_scsi.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host msc bulk-only transfer and scsi type ************************************************************************** * Copyright notice & Disclaimer @@ -202,10 +202,19 @@ static usb_sts_type usbh_cmd_read(msc_bot_trans_type *bot_trans, uint8_t *cmd, u * @param csw: to the structure of msc_bot_csw_type * @retval status: usb_sts_type status */ -usb_sts_type usbh_check_csw(msc_bot_cbw_type *cbw, msc_bot_csw_type *csw) +usb_sts_type usbh_check_csw(void *uhost, msc_bot_cbw_type *cbw, msc_bot_csw_type *csw) { - usb_sts_type status = USB_OK; - + usb_sts_type status = USB_FAIL; + if(csw->dCBWSignature == MSC_CSW_SIGNATURE) + { + if(csw->dCBWTag == cbw->dCBWTag) + { + if(csw->bCSWStatus == 0) + { + status = USB_OK; + } + } + } return status; } @@ -219,6 +228,7 @@ usb_sts_type usb_bot_request(void *uhost, msc_bot_trans_type *bot_trans) { usb_sts_type status = USB_WAIT; urb_sts_type urb_status; + usb_sts_type clr_status; usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *msc_struct = (usbh_msc_type *)bot_trans->msc_struct; switch(bot_trans->bot_state) @@ -254,7 +264,7 @@ usb_sts_type usb_bot_request(void *uhost, msc_bot_trans_type *bot_trans) } else if(urb_status == URB_STALL) { - bot_trans->bot_state = BOT_STATE_ERROR; + bot_trans->bot_state = BOT_STATE_ERROR_OUT; } break; @@ -289,7 +299,7 @@ usb_sts_type usb_bot_request(void *uhost, msc_bot_trans_type *bot_trans) } else if(urb_status == URB_STALL) { - bot_trans->bot_state = BOT_STATE_ERROR; + bot_trans->bot_state = BOT_STATE_ERROR_IN; } break; @@ -327,7 +337,7 @@ usb_sts_type usb_bot_request(void *uhost, msc_bot_trans_type *bot_trans) } else if(urb_status == URB_STALL) { - bot_trans->bot_state = BOT_STATE_ERROR; + bot_trans->bot_state = BOT_STATE_ERROR_OUT; } break; @@ -343,22 +353,32 @@ usb_sts_type usb_bot_request(void *uhost, msc_bot_trans_type *bot_trans) { bot_trans->bot_state = BOT_STATE_SEND_CBW; bot_trans->cmd_state = CMD_STATE_SEND; - status = usbh_check_csw(&bot_trans->cbw, &bot_trans->csw); + status = usbh_check_csw(uhost, &bot_trans->cbw, &bot_trans->csw); } else if(urb_status == URB_STALL) { - bot_trans->bot_state = BOT_STATE_ERROR; + bot_trans->bot_state = BOT_STATE_ERROR_IN; } break; - case BOT_STATE_ERROR: - if(usbh_clear_ept_feature(puhost, msc_struct->eptin, 0) == USB_OK) + case BOT_STATE_ERROR_IN: + clr_status = usbh_clear_ept_feature(puhost, msc_struct->eptin, msc_struct->chin); + if(clr_status == USB_OK) { bot_trans->bot_state = BOT_STATE_RECV_CSW; + usbh_set_toggle(puhost, msc_struct->chin, 0); } break; - + case BOT_STATE_ERROR_OUT: + clr_status = usbh_clear_ept_feature(puhost, msc_struct->eptout, msc_struct->chout); + if(clr_status == USB_OK) + { + usbh_set_toggle(puhost, msc_struct->chout, 1 - puhost->hch[msc_struct->chout].toggle_out); + usbh_set_toggle(puhost, msc_struct->chin, 0); + bot_trans->bot_state = BOT_STATE_ERROR_IN; + } + break; case BOT_STATE_COMPLETE: break; @@ -384,19 +404,23 @@ usb_sts_type usbh_msc_bot_scsi_get_inquiry(void *uhost, msc_bot_trans_type *bot switch(bot_trans->cmd_state) { case CMD_STATE_SEND: - usbh_bot_cbw(&bot_trans->cbw, MSC_INQUIRY_DATA_LEN, MSC_INQUIRY_CMD_LEN, MSC_CBW_FLAG_IN); - usbh_cmd_inquiry(bot_trans, bot_trans->cbw.CBWCB, lun); - bot_trans->cmd_state = CMD_STATE_WAIT; - bot_trans->bot_state = BOT_STATE_SEND_CBW; + usbh_bot_cbw(&bot_trans->cbw, MSC_INQUIRY_DATA_LEN, MSC_INQUIRY_CMD_LEN, MSC_CBW_FLAG_IN); + usbh_cmd_inquiry(bot_trans, bot_trans->cbw.CBWCB, lun); + bot_trans->cmd_state = CMD_STATE_WAIT; + bot_trans->bot_state = BOT_STATE_SEND_CBW; break; case CMD_STATE_WAIT: - if(usb_bot_request(uhost, bot_trans) == USB_OK) - { - status = USB_OK; - bot_trans->cmd_state = CMD_STATE_SEND; - } - break; + status = usb_bot_request(uhost, bot_trans); + if(status == USB_OK) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + if(status == USB_FAIL) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + break; default: break; } @@ -418,22 +442,26 @@ usb_sts_type usbh_msc_bot_scsi_capacity(void *uhost, msc_bot_trans_type *bot_tra switch(bot_trans->cmd_state) { case CMD_STATE_SEND: - usbh_bot_cbw(&bot_trans->cbw, MSC_CAPACITY10_DATA_LEN, MSC_CAPACITY10_CMD_LEN, MSC_CBW_FLAG_IN); - usbh_cmd_capacity10(bot_trans, bot_trans->cbw.CBWCB, lun); - bot_trans->cmd_state = CMD_STATE_WAIT; - bot_trans->bot_state = BOT_STATE_SEND_CBW; - break; + usbh_bot_cbw(&bot_trans->cbw, MSC_CAPACITY10_DATA_LEN, MSC_CAPACITY10_CMD_LEN, MSC_CBW_FLAG_IN); + usbh_cmd_capacity10(bot_trans, bot_trans->cbw.CBWCB, lun); + bot_trans->cmd_state = CMD_STATE_WAIT; + bot_trans->bot_state = BOT_STATE_SEND_CBW; + break; case CMD_STATE_WAIT: - if(usb_bot_request(uhost, bot_trans) == USB_OK) - { - status = USB_OK; - capacity->blk_nbr = bot_trans->buffer[3] | bot_trans->buffer[2] << 8 | - bot_trans->buffer[1] << 16 | bot_trans->buffer[0] << 24; - capacity->blk_size = bot_trans->buffer[7] | bot_trans->buffer[6] << 8 ; - bot_trans->cmd_state = CMD_STATE_SEND; - } - break; + status = usb_bot_request(uhost, bot_trans); + if(status == USB_OK) + { + capacity->blk_nbr = bot_trans->buffer[3] | bot_trans->buffer[2] << 8 | + bot_trans->buffer[1] << 16 | bot_trans->buffer[0] << 24; + capacity->blk_size = bot_trans->buffer[7] | bot_trans->buffer[6] << 8 ; + bot_trans->cmd_state = CMD_STATE_SEND; + } + if(status == USB_FAIL) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + break; default: break; } @@ -454,20 +482,24 @@ usb_sts_type usbh_msc_bot_scsi_test_unit_ready(void *uhost, msc_bot_trans_type * switch(bot_trans->cmd_state) { case CMD_STATE_SEND: - usbh_bot_cbw(&bot_trans->cbw, MSC_TEST_UNIT_READY_DATA_LEN, - MSC_TEST_UNIT_READY_CMD_LEN, MSC_CBW_FLAG_OUT); - usbh_cmd_test_unit_ready(bot_trans, bot_trans->cbw.CBWCB, lun); - bot_trans->cmd_state = CMD_STATE_WAIT; - bot_trans->bot_state = BOT_STATE_SEND_CBW; + usbh_bot_cbw(&bot_trans->cbw, MSC_TEST_UNIT_READY_DATA_LEN, + MSC_TEST_UNIT_READY_CMD_LEN, MSC_CBW_FLAG_OUT); + usbh_cmd_test_unit_ready(bot_trans, bot_trans->cbw.CBWCB, lun); + bot_trans->cmd_state = CMD_STATE_WAIT; + bot_trans->bot_state = BOT_STATE_SEND_CBW; break; case CMD_STATE_WAIT: - if(usb_bot_request(uhost, bot_trans) == USB_OK) - { - status = USB_OK; - bot_trans->cmd_state = CMD_STATE_SEND; - } - break; + status = usb_bot_request(uhost, bot_trans); + if(status == USB_OK) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + if(status == USB_FAIL) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + break; default: break; } @@ -488,20 +520,24 @@ usb_sts_type usbh_msc_bot_scsi_request_sense(void *uhost, msc_bot_trans_type *bo switch(bot_trans->cmd_state) { case CMD_STATE_SEND: - usbh_bot_cbw(&bot_trans->cbw, MSC_REQUEST_SENSE_DATA_LEN, - MSC_REQUEST_SENSE_CMD_LEN, MSC_CBW_FLAG_IN); - usbh_cmd_requset_sense(bot_trans, bot_trans->cbw.CBWCB, lun); - bot_trans->cmd_state = CMD_STATE_WAIT; - bot_trans->bot_state = BOT_STATE_SEND_CBW; + usbh_bot_cbw(&bot_trans->cbw, MSC_REQUEST_SENSE_DATA_LEN, + MSC_REQUEST_SENSE_CMD_LEN, MSC_CBW_FLAG_IN); + usbh_cmd_requset_sense(bot_trans, bot_trans->cbw.CBWCB, lun); + bot_trans->cmd_state = CMD_STATE_WAIT; + bot_trans->bot_state = BOT_STATE_SEND_CBW; break; case CMD_STATE_WAIT: - if(usb_bot_request(uhost, bot_trans) == USB_OK) - { - status = USB_OK; - bot_trans->cmd_state = CMD_STATE_SEND; - } - break; + status = usb_bot_request(uhost, bot_trans); + if(status == USB_OK) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + if(status == USB_FAIL) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + break; default: break; } @@ -526,19 +562,23 @@ usb_sts_type usbh_msc_bot_scsi_write(void *uhost, msc_bot_trans_type *bot_trans, switch(bot_trans->cmd_state) { case CMD_STATE_SEND: - usbh_bot_cbw(&bot_trans->cbw, write_len * 512, - MSC_WRITE_CMD_LEN, MSC_CBW_FLAG_OUT); - usbh_cmd_write(bot_trans, bot_trans->cbw.CBWCB, lun, write_len, address, write_data); - bot_trans->cmd_state = CMD_STATE_WAIT; - bot_trans->bot_state = BOT_STATE_SEND_CBW; + usbh_bot_cbw(&bot_trans->cbw, write_len * 512, + MSC_WRITE_CMD_LEN, MSC_CBW_FLAG_OUT); + usbh_cmd_write(bot_trans, bot_trans->cbw.CBWCB, lun, write_len, address, write_data); + bot_trans->cmd_state = CMD_STATE_WAIT; + bot_trans->bot_state = BOT_STATE_SEND_CBW; break; case CMD_STATE_WAIT: - if(usb_bot_request(uhost, bot_trans) == USB_OK) - { - status = USB_OK; - bot_trans->cmd_state = CMD_STATE_SEND; - } + status = usb_bot_request(uhost, bot_trans); + if(status == USB_OK) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + if(status == USB_FAIL) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } break; default: break; @@ -564,20 +604,24 @@ usb_sts_type usbh_msc_bot_scsi_read(void *uhost, msc_bot_trans_type *bot_trans, switch(bot_trans->cmd_state) { case CMD_STATE_SEND: - usbh_bot_cbw(&bot_trans->cbw, read_len * 512, - MSC_READ_CMD_LEN, MSC_CBW_FLAG_IN); - usbh_cmd_read(bot_trans, bot_trans->cbw.CBWCB, lun, read_len, address, read_data); - bot_trans->cmd_state = CMD_STATE_WAIT; - bot_trans->bot_state = BOT_STATE_SEND_CBW; + usbh_bot_cbw(&bot_trans->cbw, read_len * 512, + MSC_READ_CMD_LEN, MSC_CBW_FLAG_IN); + usbh_cmd_read(bot_trans, bot_trans->cbw.CBWCB, lun, read_len, address, read_data); + bot_trans->cmd_state = CMD_STATE_WAIT; + bot_trans->bot_state = BOT_STATE_SEND_CBW; break; case CMD_STATE_WAIT: - if(usb_bot_request(uhost, bot_trans) == USB_OK) - { - status = USB_OK; - bot_trans->cmd_state = CMD_STATE_SEND; - } - break; + status = usb_bot_request(uhost, bot_trans); + if(status == USB_OK) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + if(status == USB_FAIL) + { + bot_trans->cmd_state = CMD_STATE_SEND; + } + break; default: break; } diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h index d6b2db4..5e5268c 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_bot_scsi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_bot_scsi.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host msc bulk-only transfer and scsi header file ************************************************************************** * Copyright notice & Disclaimer @@ -84,7 +84,8 @@ typedef enum BOT_STATE_DATA_OUT_WAIT, BOT_STATE_RECV_CSW, BOT_STATE_RECV_CSW_WAIT, - BOT_STATE_ERROR, + BOT_STATE_ERROR_IN, + BOT_STATE_ERROR_OUT, BOT_STATE_COMPLETE }msc_bot_state_type; diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.c b/middlewares/usbh_class/usbh_msc/usbh_msc_class.c index 4d81a02..7aa1ee6 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_class.c +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_class.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_class.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -41,18 +41,18 @@ * @{ */ -usb_sts_type uhost_init_handler(void *uhost); -usb_sts_type uhost_reset_handler(void *uhost); -usb_sts_type uhost_request_handler(void *uhost); -usb_sts_type uhost_process_handler(void *uhost); +static usb_sts_type uhost_init_handler(void *uhost); +static usb_sts_type uhost_reset_handler(void *uhost); +static usb_sts_type uhost_request_handler(void *uhost); +static usb_sts_type uhost_process_handler(void *uhost); -usb_sts_type usbh_msc_get_max_lun(void *uhost, uint8_t *lun); -usb_sts_type usbh_msc_clear_feature(void *uhost, uint8_t ept_num); +static usb_sts_type usbh_msc_get_max_lun(void *uhost, uint8_t *lun); +static usb_sts_type usbh_msc_clear_feature(void *uhost, uint8_t ept_num); usbh_msc_type usbh_msc; -usbh_class_handler_type uhost_class_handler = +usbh_class_handler_type uhost_msc_class_handler = { uhost_init_handler, uhost_reset_handler, @@ -68,7 +68,7 @@ usbh_class_handler_type uhost_class_handler = * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_init_handler(void *uhost) +static usb_sts_type uhost_init_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usb_sts_type status = USB_OK; @@ -125,7 +125,7 @@ usb_sts_type uhost_init_handler(void *uhost) * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_reset_handler(void *uhost) +static usb_sts_type uhost_reset_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; @@ -167,7 +167,7 @@ usb_sts_type uhost_reset_handler(void *uhost) * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_request_handler(void *uhost) +static usb_sts_type uhost_request_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; @@ -210,7 +210,7 @@ usb_sts_type uhost_request_handler(void *uhost) * @param uhost: to the structure of usbh_core_type * @retval status: usb_sts_type status */ -usb_sts_type uhost_process_handler(void *uhost) +static usb_sts_type uhost_process_handler(void *uhost) { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; @@ -273,13 +273,12 @@ usb_sts_type uhost_process_handler(void *uhost) status = usbh_msc_bot_scsi_request_sense(uhost, &pmsc->bot_trans, pmsc->cur_lun); if(status == USB_OK) { - pmsc->l_unit_n[pmsc->cur_lun].state = USBH_MSC_IDLE; - pmsc->cur_lun ++; + pmsc->l_unit_n[pmsc->cur_lun].state = USBH_MSC_TEST_UNIT_READY; } else if(status == USB_FAIL) { pmsc->l_unit_n[pmsc->cur_lun].ready = MSC_NOT_READY; - pmsc->cur_lun ++; + pmsc->l_unit_n[pmsc->cur_lun].state = USBH_MSC_ERROR; } break; @@ -310,7 +309,7 @@ usb_sts_type uhost_process_handler(void *uhost) * @param lun: max lun buffer * @retval status: usb_sts_type status */ -usb_sts_type usbh_msc_get_max_lun(void *uhost, uint8_t *lun) +static usb_sts_type usbh_msc_get_max_lun(void *uhost, uint8_t *lun) { usbh_core_type *puhost = (usbh_core_type *)uhost; usb_sts_type status = USB_WAIT; @@ -340,7 +339,7 @@ usb_sts_type usbh_msc_get_max_lun(void *uhost, uint8_t *lun) * @param ept_num: endpoint number * @retval status: usb_sts_type status */ -usb_sts_type usbh_msc_clear_feature(void *uhost, uint8_t ept_num) +static usb_sts_type usbh_msc_clear_feature(void *uhost, uint8_t ept_num) { usbh_core_type *puhost = (usbh_core_type *)uhost; usb_sts_type status = USB_WAIT; @@ -376,6 +375,65 @@ msc_error_type usbh_msc_is_ready(void *uhost, uint8_t lun) return pmsc->l_unit_n[lun].ready; } + +/** + * @brief usb host msc read and write handle + * @param uhost: to the structure of usbh_core_type + * @param address: logical block address + * @param data_len: transfer data length + * @param buffer: transfer data buffer + * @param lun: logical unit number + * @retval status: usb_sts_type status + */ +usb_sts_type usbh_msc_rw_handle(void *uhost, uint32_t address, uint32_t len, uint8_t *buffer, uint8_t lun) +{ + usbh_core_type *puhost = (usbh_core_type *)uhost; + usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; + usb_sts_type status = USB_WAIT; + switch(pmsc->l_unit_n[lun].state) + { + case USBH_MSC_READ10: + status = usbh_msc_bot_scsi_read(uhost, &pmsc->bot_trans, address, buffer, len, lun); + if(status == USB_OK) + { + pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; + } + else if(status == USB_FAIL) + { + pmsc->l_unit_n[lun].state = USBH_MSC_REQUEST_SENSE; + status = USB_WAIT; + } + break; + case USBH_MSC_WRITE: + status = usbh_msc_bot_scsi_write(uhost, &pmsc->bot_trans, address, buffer, len, lun); + if(status == USB_OK) + { + pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; + } + else if(status == USB_FAIL) + { + pmsc->l_unit_n[lun].state = USBH_MSC_REQUEST_SENSE; + status = USB_WAIT; + } + break; + case USBH_MSC_REQUEST_SENSE: + status = usbh_msc_bot_scsi_request_sense(uhost, &pmsc->bot_trans, lun); + if(status == USB_OK) + { + pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; + status = USB_FAIL; + } + else if(status == USB_FAIL) + { + USBH_DEBUG("device not support"); + } + break; + default: + break; + } + return status; +} + /** * @brief usb host msc read * @param uhost: to the structure of usbh_core_type @@ -389,7 +447,6 @@ usb_sts_type usbh_msc_read(void *uhost, uint32_t address, uint32_t len, uint8_t { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; - usb_sts_type status; uint32_t timeout = 0; if(puhost->conn_sts == 0 || puhost->global_state != USBH_CLASS || pmsc->l_unit_n[lun].state != USBH_MSC_IDLE) @@ -397,31 +454,20 @@ usb_sts_type usbh_msc_read(void *uhost, uint32_t address, uint32_t len, uint8_t return USB_FAIL; } pmsc->bot_trans.msc_struct = &usbh_msc; - pmsc->state = USBH_MSC_READ10; pmsc->l_unit_n[lun].state = USBH_MSC_READ10; pmsc->use_lun = lun; timeout = puhost->timer; - while(1) + + while(usbh_msc_rw_handle(uhost, address, len, buffer, lun) == USB_WAIT) { if(puhost->conn_sts == 0 || (puhost->timer - timeout) > (len * 10000)) { pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; return USB_FAIL; } - status = usbh_msc_bot_scsi_read(uhost, &pmsc->bot_trans, address, buffer, len, lun); - if(status == USB_OK) - { - pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; - break; - } - else if(status == USB_FAIL) - { - pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; - break; - } } - return status; + return USB_OK; } /** @@ -437,7 +483,6 @@ usb_sts_type usbh_msc_write(void *uhost, uint32_t address, uint32_t len, uint8_t { usbh_core_type *puhost = (usbh_core_type *)uhost; usbh_msc_type *pmsc = (usbh_msc_type *)puhost->class_handler->pdata; - usb_sts_type status; uint32_t timeout = 0; if(puhost->conn_sts == 0 || puhost->global_state != USBH_CLASS || pmsc->l_unit_n[lun].state != USBH_MSC_IDLE) @@ -446,31 +491,19 @@ usb_sts_type usbh_msc_write(void *uhost, uint32_t address, uint32_t len, uint8_t } pmsc->bot_trans.msc_struct = &usbh_msc; - pmsc->state = USBH_MSC_WRITE; pmsc->l_unit_n[lun].state = USBH_MSC_WRITE; pmsc->use_lun = lun; timeout = puhost->timer; - while(1) + while(usbh_msc_rw_handle(uhost, address, len, buffer, lun) == USB_WAIT) { if(puhost->conn_sts == 0 || (puhost->timer - timeout) > (len * 10000)) { pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; return USB_FAIL; } - status = usbh_msc_bot_scsi_write(uhost, &pmsc->bot_trans, address, buffer, len, lun); - if(status == USB_OK) - { - pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; - break; - } - else if(status == USB_FAIL) - { - pmsc->l_unit_n[lun].state = USBH_MSC_IDLE; - break; - } } - return status; + return USB_OK; } /** diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.h b/middlewares/usbh_class/usbh_msc/usbh_msc_class.h index 1f9b57b..420e0c8 100644 --- a/middlewares/usbh_class/usbh_msc/usbh_msc_class.h +++ b/middlewares/usbh_class/usbh_msc/usbh_msc_class.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_class.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host msc class header file ************************************************************************** * Copyright notice & Disclaimer @@ -87,34 +87,6 @@ typedef enum USBH_MSC_STATE_COMPLETE, }usbh_msc_ctrl_state_type; -///** -// * @brief usb msc process state -// */ -//typedef enum -//{ -// USBH_MSC_INIT, -// USBH_MSC_INQUIRY, -// USBH_MSC_READ_CAPACITY10, -// USBH_MSC_READ10, -// USBH_MSC_BUSY, -// USBH_MSC_ERROR, -//}usbh_msc_state_type; - -/** - * @brief usb hid descriptor type - */ -typedef struct -{ - uint8_t bLength; - uint8_t bDescriptorType; - uint16_t bcdHID; - uint8_t bCountryCode; - uint8_t bNumDescriptors; - uint8_t bReportDescriptorType; - uint16_t wItemLength; -}usb_hid_desc_type; - - /** * @brief usb msc struct */ @@ -145,11 +117,12 @@ typedef struct uint8_t buffer[64]; }usbh_msc_type; -extern usbh_class_handler_type uhost_class_handler; +extern usbh_class_handler_type uhost_msc_class_handler; extern usbh_msc_type usbh_msc; msc_error_type usbh_msc_is_ready(void *uhost, uint8_t lun); usb_sts_type usbh_msc_write(void *uhost, uint32_t address, uint32_t len, uint8_t *buffer, uint8_t lun); usb_sts_type usbh_msc_read(void *uhost, uint32_t address, uint32_t len, uint8_t *buffer, uint8_t lun); +usb_sts_type usbh_msc_rw_handle(void *uhost, uint32_t address, uint32_t len, uint8_t *buffer, uint8_t lun); usb_sts_type msc_bot_scsi_init(usbh_msc_type *msc_struct); /** diff --git a/project/at32f415_board/at32f415_board.c b/project/at32f415_board/at32f415_board.c index 7c5de18..b2300ec 100644 --- a/project/at32f415_board/at32f415_board.c +++ b/project/at32f415_board/at32f415_board.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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/at32f415_board/at32f415_board.h b/project/at32f415_board/at32f415_board.h index 84b52d6..cfedb71 100644 --- a/project/at32f415_board/at32f415_board.h +++ b/project/at32f415_board/at32f415_board.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/current_vref_value_check/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx b/project/at_start_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.uvoptx new file mode 100644 index 0000000..c68c72a --- /dev/null +++ b/project/at_start_f415/examples/adc/current_vref_value_check/mdk_v5/current_vref_value_check.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 + + + + current_vref_value_check + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c + at32f415_adc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f415/examples/adc/current_vref_value_check/readme.txt index 6d1c309..36c060b 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/src/at32f415_int.c b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_int.c index 63154e7..e6d3a5b 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/current_vref_value_check/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/current_vref_value_check/src/main.c b/project/at_start_f415/examples/adc/current_vref_value_check/src/main.c index 7fd0e40..a40b2f8 100644 --- a/project/at_start_f415/examples/adc/current_vref_value_check/src/main.c +++ b/project/at_start_f415/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 @@ -77,8 +77,6 @@ static void adc_config(void) crm_periph_clock_enable(CRM_ADC1_PERIPH_CLOCK, TRUE); crm_adc_clock_div_set(CRM_ADC_DIV_6); - /* select combine mode */ - adc_combine_mode_select(ADC_INDEPENDENT_MODE); adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = FALSE; adc_base_struct.repeat_mode = FALSE; diff --git a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx b/project/at_start_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.uvoptx new file mode 100644 index 0000000..726cda5 --- /dev/null +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/mdk_v5/exint_trigger_partitioned.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 + + + + exint_trigger_partitioned + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c + at32f415_adc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f415/examples/adc/exint_trigger_partitioned/readme.txt index 2ee3cd3..c816c87 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c index e9499c1..5ffea1f 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/exint_trigger_partitioned/src/main.c b/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/main.c index 06f7a11..29f8100 100644 --- a/project/at_start_f415/examples/adc/exint_trigger_partitioned/src/main.c +++ b/project/at_start_f415/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 @@ -147,8 +147,6 @@ static void adc_config(void) crm_adc_clock_div_set(CRM_ADC_DIV_6); nvic_irq_enable(ADC1_IRQn, 0, 0); - /* select combine mode */ - adc_combine_mode_select(ADC_INDEPENDENT_MODE); adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = TRUE; adc_base_struct.repeat_mode = FALSE; diff --git a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx b/project/at_start_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.uvoptx new file mode 100644 index 0000000..8ada025 --- /dev/null +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/mdk_v5/internal_temperature_sensor.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 + + + + internal_temperature_sensor + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c + at32f415_adc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f415/examples/adc/internal_temperature_sensor/readme.txt index c40c8cf..fd593cc 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c index c6ae36d..408208d 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/internal_temperature_sensor/src/main.c b/project/at_start_f415/examples/adc/internal_temperature_sensor/src/main.c index 830169f..78f085f 100644 --- a/project/at_start_f415/examples/adc/internal_temperature_sensor/src/main.c +++ b/project/at_start_f415/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 @@ -82,8 +82,6 @@ static void adc_config(void) crm_periph_clock_enable(CRM_ADC1_PERIPH_CLOCK, TRUE); crm_adc_clock_div_set(CRM_ADC_DIV_6); - /* select combine mode */ - adc_combine_mode_select(ADC_INDEPENDENT_MODE); adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = FALSE; adc_base_struct.repeat_mode = TRUE; diff --git a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx b/project/at_start_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.uvoptx new file mode 100644 index 0000000..3afdb9c --- /dev/null +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/mdk_v5/software_trigger_repeat.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 + + + + software_trigger_repeat + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c + at32f415_adc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f415/examples/adc/software_trigger_repeat/readme.txt index b263019..7abcb11 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c index c5d3b82..fb59475 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/software_trigger_repeat/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/software_trigger_repeat/src/main.c b/project/at_start_f415/examples/adc/software_trigger_repeat/src/main.c index 6f2bae0..34e9649 100644 --- a/project/at_start_f415/examples/adc/software_trigger_repeat/src/main.c +++ b/project/at_start_f415/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 @@ -97,8 +97,6 @@ static void adc_config(void) crm_periph_clock_enable(CRM_ADC1_PERIPH_CLOCK, TRUE); crm_adc_clock_div_set(CRM_ADC_DIV_6); - /* select combine mode */ - adc_combine_mode_select(ADC_INDEPENDENT_MODE); adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = TRUE; adc_base_struct.repeat_mode = TRUE; diff --git a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.uvoptx new file mode 100644 index 0000000..215f6c1 --- /dev/null +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/mdk_v5/tmr_trigger_automatic_preempted.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 + + + + tmr_trigger_automatic_preempted + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c + at32f415_adc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/readme.txt index 5a6a7fe..7e54ea9 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c index 359bc66..6ef0f40 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/tmr_trigger_automatic_preempted/src/main.c b/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/main.c index 0712c93..1c117d4 100644 --- a/project/at_start_f415/examples/adc/tmr_trigger_automatic_preempted/src/main.c +++ b/project/at_start_f415/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 @@ -146,8 +146,6 @@ static void adc_config(void) crm_adc_clock_div_set(CRM_ADC_DIV_6); nvic_irq_enable(ADC1_IRQn, 0, 0); - /* select combine mode */ - adc_combine_mode_select(ADC_INDEPENDENT_MODE); adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = TRUE; adc_base_struct.repeat_mode = FALSE; diff --git a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h +++ b/project/at_start_f415/examples/adc/voltage_monitoring/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx b/project/at_start_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.uvoptx new file mode 100644 index 0000000..88f5556 --- /dev/null +++ b/project/at_start_f415/examples/adc/voltage_monitoring/mdk_v5/voltage_monitoring.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 + + + + voltage_monitoring + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_adc.c + at32f415_adc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f415/examples/adc/voltage_monitoring/readme.txt index ba682b7..6cd4ce2 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/readme.txt +++ b/project/at_start_f415/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_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c +++ b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/src/at32f415_int.c b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_int.c index 6e31430..7f071f1 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_int.c +++ b/project/at_start_f415/examples/adc/voltage_monitoring/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/adc/voltage_monitoring/src/main.c b/project/at_start_f415/examples/adc/voltage_monitoring/src/main.c index cc13a83..312bcb8 100644 --- a/project/at_start_f415/examples/adc/voltage_monitoring/src/main.c +++ b/project/at_start_f415/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 @@ -96,8 +96,6 @@ static void adc_config(void) crm_adc_clock_div_set(CRM_ADC_DIV_6); nvic_irq_enable(ADC1_IRQn, 0, 0); - /* select combine mode */ - adc_combine_mode_select(ADC_INDEPENDENT_MODE); adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = TRUE; adc_base_struct.repeat_mode = FALSE; diff --git a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/can/communication_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx b/project/at_start_f415/examples/can/communication_mode/mdk_v5/communication_mode.uvoptx new file mode 100644 index 0000000..148d964 --- /dev/null +++ b/project/at_start_f415/examples/can/communication_mode/mdk_v5/communication_mode.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 + + + + communication_mode + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_can.c + at32f415_can.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/can/communication_mode/readme.txt b/project/at_start_f415/examples/can/communication_mode/readme.txt index b595eb9..eb27e14 100644 --- a/project/at_start_f415/examples/can/communication_mode/readme.txt +++ b/project/at_start_f415/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_f415/examples/can/communication_mode/src/at32f415_clock.c b/project/at_start_f415/examples/can/communication_mode/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/can/communication_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/can/communication_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/src/at32f415_int.c b/project/at_start_f415/examples/can/communication_mode/src/at32f415_int.c index d041ae8..3c41f99 100644 --- a/project/at_start_f415/examples/can/communication_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/can/communication_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/communication_mode/src/main.c b/project/at_start_f415/examples/can/communication_mode/src/main.c index e077e40..cdf085d 100644 --- a/project/at_start_f415/examples/can/communication_mode/src/main.c +++ b/project/at_start_f415/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_f415/examples/can/filter/inc/at32f415_clock.h b/project/at_start_f415/examples/can/filter/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/can/filter/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/can/filter/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/inc/at32f415_conf.h b/project/at_start_f415/examples/can/filter/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/can/filter/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/can/filter/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/filter/inc/at32f415_int.h b/project/at_start_f415/examples/can/filter/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/can/filter/inc/at32f415_int.h +++ b/project/at_start_f415/examples/can/filter/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/mdk_v5/filter.uvoptx b/project/at_start_f415/examples/can/filter/mdk_v5/filter.uvoptx new file mode 100644 index 0000000..c19fbe6 --- /dev/null +++ b/project/at_start_f415/examples/can/filter/mdk_v5/filter.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 + + + + filter + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_can.c + at32f415_can.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/can/filter/readme.txt b/project/at_start_f415/examples/can/filter/readme.txt index 5ffdcfc..7bd66ec 100644 --- a/project/at_start_f415/examples/can/filter/readme.txt +++ b/project/at_start_f415/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_f415/examples/can/filter/src/at32f415_clock.c b/project/at_start_f415/examples/can/filter/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/can/filter/src/at32f415_clock.c +++ b/project/at_start_f415/examples/can/filter/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/src/at32f415_int.c b/project/at_start_f415/examples/can/filter/src/at32f415_int.c index df8e459..735da2c 100644 --- a/project/at_start_f415/examples/can/filter/src/at32f415_int.c +++ b/project/at_start_f415/examples/can/filter/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/filter/src/main.c b/project/at_start_f415/examples/can/filter/src/main.c index a4f35fc..86b0aa7 100644 --- a/project/at_start_f415/examples/can/filter/src/main.c +++ b/project/at_start_f415/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_f415/examples/can/loopback_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/can/loopback_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx b/project/at_start_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.uvoptx new file mode 100644 index 0000000..a9f5bad --- /dev/null +++ b/project/at_start_f415/examples/can/loopback_mode/mdk_v5/loopback_mode.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 + + + + loopback_mode + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_can.c + at32f415_can.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/can/loopback_mode/readme.txt b/project/at_start_f415/examples/can/loopback_mode/readme.txt index b66f3bb..bf36013 100644 --- a/project/at_start_f415/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f415/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_f415/examples/can/loopback_mode/src/at32f415_clock.c b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/can/loopback_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/src/at32f415_int.c b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_int.c index a4ebd6d..5b3bc09 100644 --- a/project/at_start_f415/examples/can/loopback_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/can/loopback_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/can/loopback_mode/src/main.c b/project/at_start_f415/examples/can/loopback_mode/src/main.c index 0a02795..8003b3c 100644 --- a/project/at_start_f415/examples/can/loopback_mode/src/main.c +++ b/project/at_start_f415/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_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvoptx b/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.uvoptx new file mode 100644 index 0000000..3f2d4b0 --- /dev/null +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/mdk_v5/deep_sleep_mode.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 + + + + deep_sleep_mode + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_cmp.c + at32f415_cmp.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/cmp/deep_sleep_mode/readme.txt b/project/at_start_f415/examples/cmp/deep_sleep_mode/readme.txt index 5942244..0418ad9 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/readme.txt +++ b/project/at_start_f415/examples/cmp/deep_sleep_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_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c index bb20ddb..b19dd9a 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/deep_sleep_mode/src/main.c b/project/at_start_f415/examples/cmp/deep_sleep_mode/src/main.c index 3d9346a..f9c990c 100644 --- a/project/at_start_f415/examples/cmp/deep_sleep_mode/src/main.c +++ b/project/at_start_f415/examples/cmp/deep_sleep_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_f415/examples/cmp/output/inc/at32f415_clock.h b/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cmp/output/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/inc/at32f415_conf.h b/project/at_start_f415/examples/cmp/output/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/cmp/output/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cmp/output/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h b/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cmp/output/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/mdk_v5/output.uvoptx b/project/at_start_f415/examples/cmp/output/mdk_v5/output.uvoptx new file mode 100644 index 0000000..29b3114 --- /dev/null +++ b/project/at_start_f415/examples/cmp/output/mdk_v5/output.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 + + + + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_cmp.c + at32f415_cmp.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/cmp/output/readme.txt b/project/at_start_f415/examples/cmp/output/readme.txt index 42dd43e..e0dbd60 100644 --- a/project/at_start_f415/examples/cmp/output/readme.txt +++ b/project/at_start_f415/examples/cmp/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_f415/examples/cmp/output/src/at32f415_clock.c b/project/at_start_f415/examples/cmp/output/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/cmp/output/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cmp/output/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/src/at32f415_int.c b/project/at_start_f415/examples/cmp/output/src/at32f415_int.c index 1641735..17b186b 100644 --- a/project/at_start_f415/examples/cmp/output/src/at32f415_int.c +++ b/project/at_start_f415/examples/cmp/output/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cmp/output/src/main.c b/project/at_start_f415/examples/cmp/output/src/main.c index fe68ec4..fc63e0b 100644 --- a/project/at_start_f415/examples/cmp/output/src/main.c +++ b/project/at_start_f415/examples/cmp/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_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cortex_m4/bit_band/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx b/project/at_start_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.uvoptx new file mode 100644 index 0000000..1a8bf21 --- /dev/null +++ b/project/at_start_f415/examples/cortex_m4/bit_band/mdk_v5/bit_band.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 + + + + bit_band + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f415/examples/cortex_m4/bit_band/readme.txt index c45bbae..3744742 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/readme.txt +++ b/project/at_start_f415/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_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/src/at32f415_int.c b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_int.c index 9955f9d..24c4b10 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_int.c +++ b/project/at_start_f415/examples/cortex_m4/bit_band/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/bit_band/src/main.c b/project/at_start_f415/examples/cortex_m4/bit_band/src/main.c index 0104ed3..7f06ccf 100644 --- a/project/at_start_f415/examples/cortex_m4/bit_band/src/main.c +++ b/project/at_start_f415/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_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx b/project/at_start_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.uvoptx new file mode 100644 index 0000000..510ed36 --- /dev/null +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/mdk_v5/systick_interrupt.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 + + + + systick_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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/cortex_m4/systick_interrupt/readme.txt b/project/at_start_f415/examples/cortex_m4/systick_interrupt/readme.txt index 6feaa10..376936e 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c index 74baf1a..0ddbef8 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/cortex_m4/systick_interrupt/src/main.c b/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/main.c index 59c5505..181453d 100644 --- a/project/at_start_f415/examples/cortex_m4/systick_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/crc/calculation/inc/at32f415_clock.h b/project/at_start_f415/examples/crc/calculation/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/crc/calculation/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crc/calculation/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/inc/at32f415_conf.h b/project/at_start_f415/examples/crc/calculation/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/crc/calculation/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crc/calculation/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h b/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crc/calculation/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/mdk_v5/calculation.uvoptx b/project/at_start_f415/examples/crc/calculation/mdk_v5/calculation.uvoptx new file mode 100644 index 0000000..70d6f4e --- /dev/null +++ b/project/at_start_f415/examples/crc/calculation/mdk_v5/calculation.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 + + + + calculation + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crc.c + at32f415_crc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/crc/calculation/readme.txt b/project/at_start_f415/examples/crc/calculation/readme.txt index 8b9e029..c44e902 100644 --- a/project/at_start_f415/examples/crc/calculation/readme.txt +++ b/project/at_start_f415/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_f415/examples/crc/calculation/src/at32f415_clock.c b/project/at_start_f415/examples/crc/calculation/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/crc/calculation/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crc/calculation/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/src/at32f415_int.c b/project/at_start_f415/examples/crc/calculation/src/at32f415_int.c index 7eefc70..36462fd 100644 --- a/project/at_start_f415/examples/crc/calculation/src/at32f415_int.c +++ b/project/at_start_f415/examples/crc/calculation/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crc/calculation/src/main.c b/project/at_start_f415/examples/crc/calculation/src/main.c index 7cfaaa3..ff0c5e2 100644 --- a/project/at_start_f415/examples/crc/calculation/src/main.c +++ b/project/at_start_f415/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_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crm/clock_failure_detection/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx b/project/at_start_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.uvoptx new file mode 100644 index 0000000..8f201ae --- /dev/null +++ b/project/at_start_f415/examples/crm/clock_failure_detection/mdk_v5/clock_failure_detection.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 + + + + clock_failure_detection + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/crm/clock_failure_detection/readme.txt b/project/at_start_f415/examples/crm/clock_failure_detection/readme.txt index eea42a5..32394ce 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/readme.txt +++ b/project/at_start_f415/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_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/src/at32f415_int.c b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_int.c index 1e81933..d25ce5a 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_int.c +++ b/project/at_start_f415/examples/crm/clock_failure_detection/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/clock_failure_detection/src/main.c b/project/at_start_f415/examples/crm/clock_failure_detection/src/main.c index ab5c734..2007f3d 100644 --- a/project/at_start_f415/examples/crm/clock_failure_detection/src/main.c +++ b/project/at_start_f415/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_f415/examples/crm/pll_config2/inc/at32f415_clock.h b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/inc/at32f415_conf.h b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crm/pll_config2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvoptx b/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.uvoptx new file mode 100644 index 0000000..cccc3bc --- /dev/null +++ b/project/at_start_f415/examples/crm/pll_config2/mdk_v5/pll_config2.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 + + + + pll_config2 + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/crm/pll_config2/readme.txt b/project/at_start_f415/examples/crm/pll_config2/readme.txt index f66b3fe..76907b6 100644 --- a/project/at_start_f415/examples/crm/pll_config2/readme.txt +++ b/project/at_start_f415/examples/crm/pll_config2/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_f415/examples/crm/pll_config2/src/at32f415_clock.c b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_clock.c index 1cb9a7b..64aa126 100644 --- a/project/at_start_f415/examples/crm/pll_config2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/src/at32f415_int.c b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_int.c index c50b36a..4dc3952 100644 --- a/project/at_start_f415/examples/crm/pll_config2/src/at32f415_int.c +++ b/project/at_start_f415/examples/crm/pll_config2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/pll_config2/src/main.c b/project/at_start_f415/examples/crm/pll_config2/src/main.c index 0ff850e..33de3f3 100644 --- a/project/at_start_f415/examples/crm/pll_config2/src/main.c +++ b/project/at_start_f415/examples/crm/pll_config2/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_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h +++ b/project/at_start_f415/examples/crm/sysclk_switch/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx b/project/at_start_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.uvoptx new file mode 100644 index 0000000..e74521c --- /dev/null +++ b/project/at_start_f415/examples/crm/sysclk_switch/mdk_v5/sysclk_switch.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 + + + + sysclk_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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 10 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/crm/sysclk_switch/readme.txt b/project/at_start_f415/examples/crm/sysclk_switch/readme.txt index cb845af..af3d8c3 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/readme.txt +++ b/project/at_start_f415/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_f415/examples/crm/sysclk_switch/src/at32f415_clock.c b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_clock.c +++ b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/src/at32f415_int.c b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_int.c index c50b36a..4dc3952 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_int.c +++ b/project/at_start_f415/examples/crm/sysclk_switch/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/crm/sysclk_switch/src/main.c b/project/at_start_f415/examples/crm/sysclk_switch/src/main.c index 837f25d..51274a8 100644 --- a/project/at_start_f415/examples/crm/sysclk_switch/src/main.c +++ b/project/at_start_f415/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_f415/examples/debug/tmr1/inc/at32f415_clock.h b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/inc/at32f415_conf.h b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h +++ b/project/at_start_f415/examples/debug/tmr1/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/mdk_v5/tmr1.uvoptx b/project/at_start_f415/examples/debug/tmr1/mdk_v5/tmr1.uvoptx new file mode 100644 index 0000000..f7057e6 --- /dev/null +++ b/project/at_start_f415/examples/debug/tmr1/mdk_v5/tmr1.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 + + + + tmr1 + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_debug.c + at32f415_debug.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/debug/tmr1/readme.txt b/project/at_start_f415/examples/debug/tmr1/readme.txt index 56ae9eb..728b7b8 100644 --- a/project/at_start_f415/examples/debug/tmr1/readme.txt +++ b/project/at_start_f415/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_f415/examples/debug/tmr1/src/at32f415_clock.c b/project/at_start_f415/examples/debug/tmr1/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/debug/tmr1/src/at32f415_clock.c +++ b/project/at_start_f415/examples/debug/tmr1/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/src/at32f415_int.c b/project/at_start_f415/examples/debug/tmr1/src/at32f415_int.c index 87e3b53..78c020d 100644 --- a/project/at_start_f415/examples/debug/tmr1/src/at32f415_int.c +++ b/project/at_start_f415/examples/debug/tmr1/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/debug/tmr1/src/main.c b/project/at_start_f415/examples/debug/tmr1/src/main.c index c78f648..6aefe7e 100644 --- a/project/at_start_f415/examples/debug/tmr1/src/main.c +++ b/project/at_start_f415/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_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx b/project/at_start_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.uvoptx new file mode 100644 index 0000000..8f4b003 --- /dev/null +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/mdk_v5/data_to_gpio_flexible.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 + + + + data_to_gpio_flexible + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/dma/data_to_gpio_flexible/readme.txt b/project/at_start_f415/examples/dma/data_to_gpio_flexible/readme.txt index 4b7a984..14204e5 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/readme.txt +++ b/project/at_start_f415/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_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c index e174acb..a3f4853 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c +++ b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/data_to_gpio_flexible/src/main.c b/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/main.c index 1618af4..1ecb504 100644 --- a/project/at_start_f415/examples/dma/data_to_gpio_flexible/src/main.c +++ b/project/at_start_f415/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_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h +++ b/project/at_start_f415/examples/dma/flash_to_sram/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx b/project/at_start_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.uvoptx new file mode 100644 index 0000000..df899dd --- /dev/null +++ b/project/at_start_f415/examples/dma/flash_to_sram/mdk_v5/flash_to_sram.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_to_sram + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c + at32f415_flash.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_dma.c + at32f415_dma.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/dma/flash_to_sram/readme.txt b/project/at_start_f415/examples/dma/flash_to_sram/readme.txt index d382607..4a25a95 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/readme.txt +++ b/project/at_start_f415/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_f415/examples/dma/flash_to_sram/src/at32f415_clock.c b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_clock.c +++ b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/src/at32f415_int.c b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_int.c index 39e5e82..a00a263 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_int.c +++ b/project/at_start_f415/examples/dma/flash_to_sram/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/dma/flash_to_sram/src/main.c b/project/at_start_f415/examples/dma/flash_to_sram/src/main.c index 04f9716..cf12d93 100644 --- a/project/at_start_f415/examples/dma/flash_to_sram/src/main.c +++ b/project/at_start_f415/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_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/bpr_domain/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/mdk_v5/bpr_domain.uvoptx b/project/at_start_f415/examples/ertc/bpr_domain/mdk_v5/bpr_domain.uvoptx new file mode 100644 index 0000000..5f8b50e --- /dev/null +++ b/project/at_start_f415/examples/ertc/bpr_domain/mdk_v5/bpr_domain.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 + + + + bpr_domain + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c + at32f415_ertc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/ertc/bpr_domain/readme.txt b/project/at_start_f415/examples/ertc/bpr_domain/readme.txt index 3c40f2b..da6ef2d 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/readme.txt +++ b/project/at_start_f415/examples/ertc/bpr_domain/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_f415/examples/ertc/bpr_domain/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/src/at32f415_int.c b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_int.c index aa2ad15..13213ee 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/bpr_domain/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/bpr_domain/src/main.c b/project/at_start_f415/examples/ertc/bpr_domain/src/main.c index 756c14a..9c21524 100644 --- a/project/at_start_f415/examples/ertc/bpr_domain/src/main.c +++ b/project/at_start_f415/examples/ertc/bpr_domain/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_f415/examples/ertc/calendar/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/calendar/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/mdk_v5/calendar.uvoptx b/project/at_start_f415/examples/ertc/calendar/mdk_v5/calendar.uvoptx new file mode 100644 index 0000000..dfaf6f0 --- /dev/null +++ b/project/at_start_f415/examples/ertc/calendar/mdk_v5/calendar.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 + + + + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c + at32f415_ertc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/ertc/calendar/readme.txt b/project/at_start_f415/examples/ertc/calendar/readme.txt index 18cd9cd..3aee2ab 100644 --- a/project/at_start_f415/examples/ertc/calendar/readme.txt +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/calendar/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/calendar/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/ertc/calendar/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/calendar/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/src/at32f415_int.c b/project/at_start_f415/examples/ertc/calendar/src/at32f415_int.c index 203ba4d..d3157fa 100644 --- a/project/at_start_f415/examples/ertc/calendar/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/calendar/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/calendar/src/main.c b/project/at_start_f415/examples/ertc/calendar/src/main.c index 76e14a6..a82cb0c 100644 --- a/project/at_start_f415/examples/ertc/calendar/src/main.c +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/lick_calibration/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/mdk_v5/lick_calibration.uvoptx b/project/at_start_f415/examples/ertc/lick_calibration/mdk_v5/lick_calibration.uvoptx new file mode 100644 index 0000000..8c8e7ed --- /dev/null +++ b/project/at_start_f415/examples/ertc/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c + at32f415_ertc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 14 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/ertc/lick_calibration/readme.txt b/project/at_start_f415/examples/ertc/lick_calibration/readme.txt index ec17e0b..fa3f87f 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/readme.txt +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/lick_calibration/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/src/at32f415_int.c b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_int.c index 4274a51..8e6c52b 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/lick_calibration/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/lick_calibration/src/main.c b/project/at_start_f415/examples/ertc/lick_calibration/src/main.c index 0f88308..9e96eb0 100644 --- a/project/at_start_f415/examples/ertc/lick_calibration/src/main.c +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/tamper/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/tamper/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/mdk_v5/tamper.uvoptx b/project/at_start_f415/examples/ertc/tamper/mdk_v5/tamper.uvoptx new file mode 100644 index 0000000..eb70759 --- /dev/null +++ b/project/at_start_f415/examples/ertc/tamper/mdk_v5/tamper.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 + + + + tamper + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c + at32f415_ertc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/ertc/tamper/readme.txt b/project/at_start_f415/examples/ertc/tamper/readme.txt index d0ba342..5517c16 100644 --- a/project/at_start_f415/examples/ertc/tamper/readme.txt +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/tamper/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/tamper/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/ertc/tamper/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/tamper/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/src/at32f415_int.c b/project/at_start_f415/examples/ertc/tamper/src/at32f415_int.c index 1d3c15f..7c6110b 100644 --- a/project/at_start_f415/examples/ertc/tamper/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/tamper/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/tamper/src/main.c b/project/at_start_f415/examples/ertc/tamper/src/main.c index cc8e8a4..f9e2d57 100644 --- a/project/at_start_f415/examples/ertc/tamper/src/main.c +++ b/project/at_start_f415/examples/ertc/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_f415/examples/ertc/time_stamp/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/time_stamp/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/mdk_v5/time_stamp.uvoptx b/project/at_start_f415/examples/ertc/time_stamp/mdk_v5/time_stamp.uvoptx new file mode 100644 index 0000000..2faab37 --- /dev/null +++ b/project/at_start_f415/examples/ertc/time_stamp/mdk_v5/time_stamp.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 + + + + time_stamp + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c + at32f415_ertc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/ertc/time_stamp/readme.txt b/project/at_start_f415/examples/ertc/time_stamp/readme.txt index 3b064bb..3ee90fb 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/readme.txt +++ b/project/at_start_f415/examples/ertc/time_stamp/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_f415/examples/ertc/time_stamp/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/src/at32f415_int.c b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_int.c index ca2d1ac..c248b27 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/time_stamp/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/time_stamp/src/main.c b/project/at_start_f415/examples/ertc/time_stamp/src/main.c index 611b4f8..f039e0d 100644 --- a/project/at_start_f415/examples/ertc/time_stamp/src/main.c +++ b/project/at_start_f415/examples/ertc/time_stamp/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_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h +++ b/project/at_start_f415/examples/ertc/wakeup_timer/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/mdk_v5/wakeup_timer.uvoptx b/project/at_start_f415/examples/ertc/wakeup_timer/mdk_v5/wakeup_timer.uvoptx new file mode 100644 index 0000000..02a78db --- /dev/null +++ b/project/at_start_f415/examples/ertc/wakeup_timer/mdk_v5/wakeup_timer.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 + + + + wakeup_timer + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_ertc.c + at32f415_ertc.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 13 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/ertc/wakeup_timer/readme.txt b/project/at_start_f415/examples/ertc/wakeup_timer/readme.txt index e20ddb6..f060142 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/readme.txt +++ b/project/at_start_f415/examples/ertc/wakeup_timer/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_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c +++ b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/src/at32f415_int.c b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_int.c index 927a2f1..6beb2bb 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_int.c +++ b/project/at_start_f415/examples/ertc/wakeup_timer/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/ertc/wakeup_timer/src/main.c b/project/at_start_f415/examples/ertc/wakeup_timer/src/main.c index 0b301ac..572d77d 100644 --- a/project/at_start_f415/examples/ertc/wakeup_timer/src/main.c +++ b/project/at_start_f415/examples/ertc/wakeup_timer/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_f415/examples/exint/exint_config/inc/at32f415_clock.h b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/inc/at32f415_conf.h b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h +++ b/project/at_start_f415/examples/exint/exint_config/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/mdk_v5/exint_config.uvoptx b/project/at_start_f415/examples/exint/exint_config/mdk_v5/exint_config.uvoptx new file mode 100644 index 0000000..35cf2d6 --- /dev/null +++ b/project/at_start_f415/examples/exint/exint_config/mdk_v5/exint_config.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 + + + + exint_config + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 11 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/exint/exint_config/readme.txt b/project/at_start_f415/examples/exint/exint_config/readme.txt index d361b1a..af043d6 100644 --- a/project/at_start_f415/examples/exint/exint_config/readme.txt +++ b/project/at_start_f415/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_f415/examples/exint/exint_config/src/at32f415_clock.c b/project/at_start_f415/examples/exint/exint_config/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/exint/exint_config/src/at32f415_clock.c +++ b/project/at_start_f415/examples/exint/exint_config/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/src/at32f415_int.c b/project/at_start_f415/examples/exint/exint_config/src/at32f415_int.c index f85a7ad..e3aea5c 100644 --- a/project/at_start_f415/examples/exint/exint_config/src/at32f415_int.c +++ b/project/at_start_f415/examples/exint/exint_config/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_config/src/main.c b/project/at_start_f415/examples/exint/exint_config/src/main.c index 32dc231..d376bcd 100644 --- a/project/at_start_f415/examples/exint/exint_config/src/main.c +++ b/project/at_start_f415/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_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h +++ b/project/at_start_f415/examples/exint/exint_software_trigger/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx b/project/at_start_f415/examples/exint/exint_software_trigger/mdk_v5/exint_software_trigger.uvoptx new file mode 100644 index 0000000..828d7a6 --- /dev/null +++ b/project/at_start_f415/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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 12 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.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_f415/examples/exint/exint_software_trigger/readme.txt b/project/at_start_f415/examples/exint/exint_software_trigger/readme.txt index b43ade1..497040a 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/readme.txt +++ b/project/at_start_f415/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_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c +++ b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/src/at32f415_int.c b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_int.c index 7614165..860c286 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_int.c +++ b/project/at_start_f415/examples/exint/exint_software_trigger/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/exint/exint_software_trigger/src/main.c b/project/at_start_f415/examples/exint/exint_software_trigger/src/main.c index 3c8cae5..8b380b4 100644 --- a/project/at_start_f415/examples/exint/exint_software_trigger/src/main.c +++ b/project/at_start_f415/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 / 24000) / 10000 = 1Hz(1s) */ - tmr_base_init(TMR1, 10000, 14400); + /* (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_f415/examples/flash/flash_write_read/inc/at32f415_clock.h b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/inc/at32f415_conf.h b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h +++ b/project/at_start_f415/examples/flash/flash_write_read/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/inc/flash.h b/project/at_start_f415/examples/flash/flash_write_read/inc/flash.h index fe927ab..ed2508e 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/inc/flash.h +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/readme.txt b/project/at_start_f415/examples/flash/flash_write_read/readme.txt index ea2c8db..fa488ca 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/readme.txt +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/src/at32f415_clock.c b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_clock.c +++ b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/src/at32f415_int.c b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_int.c index 0cb7ae9..ea4249a 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_int.c +++ b/project/at_start_f415/examples/flash/flash_write_read/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/flash/flash_write_read/src/flash.c b/project/at_start_f415/examples/flash/flash_write_read/src/flash.c index 1922af5..133135d 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/flash.c +++ b/project/at_start_f415/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_f415/examples/flash/flash_write_read/src/main.c b/project/at_start_f415/examples/flash/flash_write_read/src/main.c index 59c28c0..0222b24 100644 --- a/project/at_start_f415/examples/flash/flash_write_read/src/main.c +++ b/project/at_start_f415/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_f415/examples/gpio/led_toggle/inc/at32f415_clock.h b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/inc/at32f415_conf.h b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h +++ b/project/at_start_f415/examples/gpio/led_toggle/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/readme.txt b/project/at_start_f415/examples/gpio/led_toggle/readme.txt index 9dc3168..eeaea81 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/readme.txt +++ b/project/at_start_f415/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_f415/examples/gpio/led_toggle/src/at32f415_clock.c b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_clock.c +++ b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/src/at32f415_int.c b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_int.c index 2fe8ae4..73f5e18 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_int.c +++ b/project/at_start_f415/examples/gpio/led_toggle/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/led_toggle/src/main.c b/project/at_start_f415/examples/gpio/led_toggle/src/main.c index 7d085b7..ca0380f 100644 --- a/project/at_start_f415/examples/gpio/led_toggle/src/main.c +++ b/project/at_start_f415/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_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h +++ b/project/at_start_f415/examples/gpio/swjtag_remap/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/readme.txt b/project/at_start_f415/examples/gpio/swjtag_remap/readme.txt index f398d72..2cf5e27 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/readme.txt +++ b/project/at_start_f415/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_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c +++ b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/src/at32f415_int.c b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_int.c index d799f84..11e323a 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_int.c +++ b/project/at_start_f415/examples/gpio/swjtag_remap/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/gpio/swjtag_remap/src/main.c b/project/at_start_f415/examples/gpio/swjtag_remap/src/main.c index ed53c25..96bbe80 100644 --- a/project/at_start_f415/examples/gpio/swjtag_remap/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/communication_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/communication_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/readme.txt b/project/at_start_f415/examples/i2c/communication_dma/readme.txt index d1d6aca..949f5bc 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/communication_dma/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/src/at32f415_int.c b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_int.c index b531894..361f266 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/communication_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_dma/src/main.c b/project/at_start_f415/examples/i2c/communication_dma/src/main.c index 65e25ea..18b4d1a 100644 --- a/project/at_start_f415/examples/i2c/communication_dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/communication_int/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/communication_int/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/readme.txt b/project/at_start_f415/examples/i2c/communication_int/readme.txt index 87909c9..402c548 100644 --- a/project/at_start_f415/examples/i2c/communication_int/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/communication_int/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2c/communication_int/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/src/at32f415_int.c b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_int.c index bb20ce5..b4140ff 100644 --- a/project/at_start_f415/examples/i2c/communication_int/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/communication_int/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_int/src/main.c b/project/at_start_f415/examples/i2c/communication_int/src/main.c index b4af676..3701514 100644 --- a/project/at_start_f415/examples/i2c/communication_int/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/communication_poll/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/communication_poll/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/readme.txt b/project/at_start_f415/examples/i2c/communication_poll/readme.txt index ba25a3f..28b5a3e 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/communication_poll/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/src/at32f415_int.c b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_int.c index 7d21487..9afd87f 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/communication_poll/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/communication_poll/src/main.c b/project/at_start_f415/examples/i2c/communication_poll/src/main.c index 2ccf355..3534396 100644 --- a/project/at_start_f415/examples/i2c/communication_poll/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2c/eeprom/inc/at32f415_clock.h b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/inc/at32f415_conf.h b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2c/eeprom/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/readme.txt b/project/at_start_f415/examples/i2c/eeprom/readme.txt index c75a358..f23faa9 100644 --- a/project/at_start_f415/examples/i2c/eeprom/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2c/eeprom/src/at32f415_clock.c b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2c/eeprom/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/src/at32f415_int.c b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_int.c index 46b7bbf..5be432c 100644 --- a/project/at_start_f415/examples/i2c/eeprom/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2c/eeprom/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2c/eeprom/src/main.c b/project/at_start_f415/examples/i2c/eeprom/src/main.c index 0291d64..90b368d 100644 --- a/project/at_start_f415/examples/i2c/eeprom/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/readme.txt b/project/at_start_f415/examples/i2s/halfduplex_dma/readme.txt index d60c785..23c4a81 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c index 8569878..7143c58 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2s/halfduplex_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_dma/src/main.c b/project/at_start_f415/examples/i2s/halfduplex_dma/src/main.c index d275436..f1423f7 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/readme.txt b/project/at_start_f415/examples/i2s/halfduplex_interrupt/readme.txt index db9c299..b640d69 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c index e3f6258..f200a88 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/halfduplex_interrupt/src/main.c b/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/main.c index e25f43f..698771b 100644 --- a/project/at_start_f415/examples/i2s/halfduplex_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt index c93193a..aec0ae4 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c index 9d8ecce..9234e95 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c b/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c index f32a349..657ba3b 100644 --- a/project/at_start_f415/examples/i2s/spii2s_switch_halfduplex_polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/readme.txt b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/readme.txt index 68a7f65..c0b3d6a 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/readme.txt +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/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_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c index 41ff628..a5815ec 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_alarm/src/main.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/main.c index 0687ffb..627f403 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/src/main.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_alarm/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_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/readme.txt b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/readme.txt index 204c000..e39d5b7 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/readme.txt +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_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_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c index 820c909..5c9de9a 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/deepsleep_ertc_tamper/src/main.c b/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/main.c index 7daf701..b6b3b92 100644 --- a/project/at_start_f415/examples/pwc/deepsleep_ertc_tamper/src/main.c +++ b/project/at_start_f415/examples/pwc/deepsleep_ertc_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_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/readme.txt b/project/at_start_f415/examples/pwc/power_voltage_monitor/readme.txt index 0bd388b..4ee1342 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c index 6336574..fba5d45 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/power_voltage_monitor/src/main.c b/project/at_start_f415/examples/pwc/power_voltage_monitor/src/main.c index 8ecaf4e..3b84413 100644 --- a/project/at_start_f415/examples/pwc/power_voltage_monitor/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/readme.txt b/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt index 0d07257..9b8bedd 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c index e166bb1..905257a 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/sleep_tmr2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_tmr2/src/main.c b/project/at_start_f415/examples/pwc/sleep_tmr2/src/main.c index 61bf0b9..87ad28e 100644 --- a/project/at_start_f415/examples/pwc/sleep_tmr2/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/sleep_usart1/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/readme.txt b/project/at_start_f415/examples/pwc/sleep_usart1/readme.txt index a2f6c1c..3d3b122 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/src/at32f415_int.c b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_int.c index ad10f57..fa4c260 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/sleep_usart1/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/sleep_usart1/src/main.c b/project/at_start_f415/examples/pwc/sleep_usart1/src/main.c index b215514..3311cc0 100644 --- a/project/at_start_f415/examples/pwc/sleep_usart1/src/main.c +++ b/project/at_start_f415/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_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/readme.txt b/project/at_start_f415/examples/pwc/standby_ertc_alarm/readme.txt index e88910c..438be85 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/readme.txt +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/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_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c index 525e833..24989ed 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_ertc_alarm/src/main.c b/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/main.c index c432b8b..c2647a5 100644 --- a/project/at_start_f415/examples/pwc/standby_ertc_alarm/src/main.c +++ b/project/at_start_f415/examples/pwc/standby_ertc_alarm/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_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/readme.txt b/project/at_start_f415/examples/pwc/standby_wakeup_pin/readme.txt index aa05617..4e70cc0 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/readme.txt +++ b/project/at_start_f415/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_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c index 7554621..2d796e5 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c +++ b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/pwc/standby_wakeup_pin/src/main.c b/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/main.c index 047c235..d705cff 100644 --- a/project/at_start_f415/examples/pwc/standby_wakeup_pin/src/main.c +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/inc/at32_sdio.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32_sdio.h index e916740..3f94382 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32_sdio.h +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/readme.txt b/project/at_start_f415/examples/sdio/sd_mmc_card/readme.txt index fcd320e..967912f 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/readme.txt +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/src/at32_sdio.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32_sdio.c index 99efdc2..298b391 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32_sdio.c +++ b/project/at_start_f415/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_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c index 75f129f..5d60354 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c +++ b/project/at_start_f415/examples/sdio/sd_mmc_card/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sd_mmc_card/src/main.c b/project/at_start_f415/examples/sdio/sd_mmc_card/src/main.c index 270b89e..a25f766 100644 --- a/project/at_start_f415/examples/sdio/sd_mmc_card/src/main.c +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/inc/at32_sdio.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32_sdio.h index 3521e72..70cb411 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32_sdio.h +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/readme.txt b/project/at_start_f415/examples/sdio/sdio_fatfs/readme.txt index e17e985..6b0fb9e 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/readme.txt +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/src/at32_sdio.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32_sdio.c index 589fc1f..cdbebfc 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32_sdio.c +++ b/project/at_start_f415/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_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c index c26bdce..cac0abb 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c +++ b/project/at_start_f415/examples/sdio/sdio_fatfs/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/sdio/sdio_fatfs/src/main.c b/project/at_start_f415/examples/sdio/sdio_fatfs/src/main.c index af5144a..6df06f3 100644 --- a/project/at_start_f415/examples/sdio/sdio_fatfs/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/readme.txt b/project/at_start_f415/examples/spi/crc_transfer_polling/readme.txt index 4699c4f..97f0689 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c index 7a0f10e..9d65615 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/crc_transfer_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/crc_transfer_polling/src/main.c b/project/at_start_f415/examples/spi/crc_transfer_polling/src/main.c index 2732811..b15fee1 100644 --- a/project/at_start_f415/examples/spi/crc_transfer_polling/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" +#include /** @addtogroup AT32F415_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_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/fullduplex_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/readme.txt b/project/at_start_f415/examples/spi/fullduplex_polling/readme.txt index ce2075e..7d2863b 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/src/at32f415_int.c b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_int.c index 701633f..1b7d1b2 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/fullduplex_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/fullduplex_polling/src/main.c b/project/at_start_f415/examples/spi/fullduplex_polling/src/main.c index fbf9a92..88397af 100644 --- a/project/at_start_f415/examples/spi/fullduplex_polling/src/main.c +++ b/project/at_start_f415/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 "at32f415_board.h" #include "at32f415_clock.h" +#include /** @addtogroup AT32F415_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_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/readme.txt b/project/at_start_f415/examples/spi/halfduplex_interrupt/readme.txt index 5a4678e..8c1faf5 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c index 04315c5..43e7caa 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_interrupt/src/main.c b/project/at_start_f415/examples/spi/halfduplex_interrupt/src/main.c index 3cf69d6..33ca669 100644 --- a/project/at_start_f415/examples/spi/halfduplex_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/readme.txt b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/readme.txt index 9b532cd..3809b02 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c index d8f5eb4..36312de 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/halfduplex_transceiver_switch/src/main.c b/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/main.c index 487cb10..a3cac7a 100644 --- a/project/at_start_f415/examples/spi/halfduplex_transceiver_switch/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/readme.txt b/project/at_start_f415/examples/spi/only_receive_mode_polling/readme.txt index 3650634..2d081e9 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c index 2b18bda..fc1f3c8 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/only_receive_mode_polling/src/main.c b/project/at_start_f415/examples/spi/only_receive_mode_polling/src/main.c index 1f349f3..2fca6aa 100644 --- a/project/at_start_f415/examples/spi/only_receive_mode_polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt index 94f1149..ff3aac1 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c index f4e2307..19f73df 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c b/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c index 2f4e14b..3cbafd8 100644 --- a/project/at_start_f415/examples/spi/use_jtagpin_hardwarecs_dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/w25q_flash/inc/at32f415_clock.h b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/inc/at32f415_conf.h b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h +++ b/project/at_start_f415/examples/spi/w25q_flash/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/inc/spi_flash.h b/project/at_start_f415/examples/spi/w25q_flash/inc/spi_flash.h index 400f6d8..36320c9 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/inc/spi_flash.h +++ b/project/at_start_f415/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_f415/examples/spi/w25q_flash/readme.txt b/project/at_start_f415/examples/spi/w25q_flash/readme.txt index 774d3f1..50f9863 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/readme.txt +++ b/project/at_start_f415/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_f415/examples/spi/w25q_flash/src/at32f415_clock.c b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_clock.c +++ b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/src/at32f415_int.c b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_int.c index 69ed4f0..5ecf8fb 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_int.c +++ b/project/at_start_f415/examples/spi/w25q_flash/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/spi/w25q_flash/src/main.c b/project/at_start_f415/examples/spi/w25q_flash/src/main.c index e399d9c..1fe8b36 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/main.c +++ b/project/at_start_f415/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_f415/examples/spi/w25q_flash/src/spi_flash.c b/project/at_start_f415/examples/spi/w25q_flash/src/spi_flash.c index 64a95c8..ec17322 100644 --- a/project/at_start_f415/examples/spi/w25q_flash/src/spi_flash.c +++ b/project/at_start_f415/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_f415/examples/tmr/6_steps/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/6_steps/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/readme.txt b/project/at_start_f415/examples/tmr/6_steps/readme.txt index ac9791b..8ede473 100644 --- a/project/at_start_f415/examples/tmr/6_steps/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/6_steps/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/6_steps/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/src/at32f415_int.c b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_int.c index 96d5b32..a6bb034 100644 --- a/project/at_start_f415/examples/tmr/6_steps/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/6_steps/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/6_steps/src/main.c b/project/at_start_f415/examples/tmr/6_steps/src/main.c index cd70795..a8131c5 100644 --- a/project/at_start_f415/examples/tmr/6_steps/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/7_pwm_output/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/readme.txt b/project/at_start_f415/examples/tmr/7_pwm_output/readme.txt index cba1b52..da6d392 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/src/at32f415_int.c b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_int.c index 91fa9cc..5676737 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/7_pwm_output/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/7_pwm_output/src/main.c b/project/at_start_f415/examples/tmr/7_pwm_output/src/main.c index 6c3be00..c9e7a18 100644 --- a/project/at_start_f415/examples/tmr/7_pwm_output/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/cascade_synchro/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/readme.txt b/project/at_start_f415/examples/tmr/cascade_synchro/readme.txt index e7ae5cd..fb8e6aa 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/src/at32f415_int.c b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_int.c index a2abb1c..04917b9 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/cascade_synchro/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/cascade_synchro/src/main.c b/project/at_start_f415/examples/tmr/cascade_synchro/src/main.c index a46632a..08a20a2 100644 --- a/project/at_start_f415/examples/tmr/cascade_synchro/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/complementary_signals/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/readme.txt b/project/at_start_f415/examples/tmr/complementary_signals/readme.txt index 3ed835b..6f88b3b 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/complementary_signals/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/src/at32f415_int.c b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_int.c index 8523c7f..f53f3cb 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/complementary_signals/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/complementary_signals/src/main.c b/project/at_start_f415/examples/tmr/complementary_signals/src/main.c index 6f4d72f..6bcb7f1 100644 --- a/project/at_start_f415/examples/tmr/complementary_signals/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/dma/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/dma/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/dma/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/readme.txt b/project/at_start_f415/examples/tmr/dma/readme.txt index ef7325d..5b9e8f3 100644 --- a/project/at_start_f415/examples/tmr/dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/dma/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/dma/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/src/at32f415_int.c b/project/at_start_f415/examples/tmr/dma/src/at32f415_int.c index 01a674f..78dadb3 100644 --- a/project/at_start_f415/examples/tmr/dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma/src/main.c b/project/at_start_f415/examples/tmr/dma/src/main.c index 975d477..a29d2d8 100644 --- a/project/at_start_f415/examples/tmr/dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/dma_burst/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/dma_burst/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/readme.txt b/project/at_start_f415/examples/tmr/dma_burst/readme.txt index dfdb600..7d64cf6 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/dma_burst/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/src/at32f415_int.c b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_int.c index a282618..c7ec009 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/dma_burst/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/dma_burst/src/main.c b/project/at_start_f415/examples/tmr/dma_burst/src/main.c index e41aa61..ab3f424 100644 --- a/project/at_start_f415/examples/tmr/dma_burst/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/readme.txt b/project/at_start_f415/examples/tmr/encoder_tmr2/readme.txt index 20d072e..7ccbc76 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c index 0ff482b..1465b61 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/encoder_tmr2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/encoder_tmr2/src/main.c b/project/at_start_f415/examples/tmr/encoder_tmr2/src/main.c index bb33217..4cb32fb 100644 --- a/project/at_start_f415/examples/tmr/encoder_tmr2/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/external_clock/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/external_clock/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/readme.txt b/project/at_start_f415/examples/tmr/external_clock/readme.txt index 8a1c192..deb020b 100644 --- a/project/at_start_f415/examples/tmr/external_clock/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/external_clock/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/external_clock/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/src/at32f415_int.c b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_int.c index 80c61fd..50f7010 100644 --- a/project/at_start_f415/examples/tmr/external_clock/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/external_clock/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/external_clock/src/main.c b/project/at_start_f415/examples/tmr/external_clock/src/main.c index 172b8e1..50f9011 100644 --- a/project/at_start_f415/examples/tmr/external_clock/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/readme.txt b/project/at_start_f415/examples/tmr/hall_xor_tmr2/readme.txt index 4aea776..47c1e63 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c index 95c9cd7..6edaabc 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hall_xor_tmr2/src/main.c b/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/main.c index 388654f..79cf44a 100644 --- a/project/at_start_f415/examples/tmr/hall_xor_tmr2/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/hang_mode/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/hang_mode/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/readme.txt b/project/at_start_f415/examples/tmr/hang_mode/readme.txt index 0684caf..254e5cf 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/hang_mode/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/src/at32f415_int.c b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_int.c index 913ba00..457cb57 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/hang_mode/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/hang_mode/src/main.c b/project/at_start_f415/examples/tmr/hang_mode/src/main.c index c060867..4466f7f 100644 --- a/project/at_start_f415/examples/tmr/hang_mode/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/input_capture/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/input_capture/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/readme.txt b/project/at_start_f415/examples/tmr/input_capture/readme.txt index 2036dfd..40af988 100644 --- a/project/at_start_f415/examples/tmr/input_capture/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/input_capture/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/input_capture/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/src/at32f415_int.c b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_int.c index 78ea2fa..992e422 100644 --- a/project/at_start_f415/examples/tmr/input_capture/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/input_capture/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/input_capture/src/main.c b/project/at_start_f415/examples/tmr/input_capture/src/main.c index 062bc19..9df4987 100644 --- a/project/at_start_f415/examples/tmr/input_capture/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_high/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_high/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/readme.txt b/project/at_start_f415/examples/tmr/oc_high/readme.txt index 36a062a..7bb819f 100644 --- a/project/at_start_f415/examples/tmr/oc_high/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_high/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/oc_high/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_int.c index de27785..e9ac6f4 100644 --- a/project/at_start_f415/examples/tmr/oc_high/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_high/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_high/src/main.c b/project/at_start_f415/examples/tmr/oc_high/src/main.c index 56f024b..041ab43 100644 --- a/project/at_start_f415/examples/tmr/oc_high/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_low/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_low/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/readme.txt b/project/at_start_f415/examples/tmr/oc_low/readme.txt index eb58d26..baad7d8 100644 --- a/project/at_start_f415/examples/tmr/oc_low/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_low/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/oc_low/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_int.c index 29ec697..de24371 100644 --- a/project/at_start_f415/examples/tmr/oc_low/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_low/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_low/src/main.c b/project/at_start_f415/examples/tmr/oc_low/src/main.c index c50706b..b0dbfc5 100644 --- a/project/at_start_f415/examples/tmr/oc_low/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/readme.txt b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/readme.txt index efa17f6..28f7cc0 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c index a6dd38b..acb31c4 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr3/src/main.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/main.c index 60f3510..0457b58 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr3/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/readme.txt b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/readme.txt index 1f83279..615ac19 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c index fd6601e..de87f12 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/oc_toggle_tmr9/src/main.c b/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/main.c index 7410e2f..b39a206 100644 --- a/project/at_start_f415/examples/tmr/oc_toggle_tmr9/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/one_cycle/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/one_cycle/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/readme.txt b/project/at_start_f415/examples/tmr/one_cycle/readme.txt index 04133cc..bebe83b 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/one_cycle/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/src/at32f415_int.c b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_int.c index f675351..a559e02 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/one_cycle/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/one_cycle/src/main.c b/project/at_start_f415/examples/tmr/one_cycle/src/main.c index ba607b9..a3f0713 100644 --- a/project/at_start_f415/examples/tmr/one_cycle/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/parallel_synchro/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/readme.txt b/project/at_start_f415/examples/tmr/parallel_synchro/readme.txt index 848d57f..f3f467a 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/src/at32f415_int.c b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_int.c index 888bd44..2b17ca1 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/parallel_synchro/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/parallel_synchro/src/main.c b/project/at_start_f415/examples/tmr/parallel_synchro/src/main.c index f879bc5..3238482 100644 --- a/project/at_start_f415/examples/tmr/parallel_synchro/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_input/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/readme.txt b/project/at_start_f415/examples/tmr/pwm_input/readme.txt index 3c3fc5e..432b5c5 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_int.c index 0bcef8d..7e46360 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_input/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input/src/main.c b/project/at_start_f415/examples/tmr/pwm_input/src/main.c index c4eea2b..73e326f 100644 --- a/project/at_start_f415/examples/tmr/pwm_input/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/readme.txt b/project/at_start_f415/examples/tmr/pwm_input_dma/readme.txt index e9a1d58..0295212 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c index 5ed739a..5aa1d01 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_input_dma/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_input_dma/src/main.c b/project/at_start_f415/examples/tmr/pwm_input_dma/src/main.c index 99d75c9..9493fcc 100644 --- a/project/at_start_f415/examples/tmr/pwm_input_dma/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/readme.txt b/project/at_start_f415/examples/tmr/pwm_output_simulate/readme.txt index 08e1f05..1801b70 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c index e04f169..6439842 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_simulate/src/main.c b/project/at_start_f415/examples/tmr/pwm_output_simulate/src/main.c index 0d2c74b..dbece1e 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_simulate/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/readme.txt b/project/at_start_f415/examples/tmr/pwm_output_tmr10/readme.txt index 39286d7..ce6b2be 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c index 909cb53..15bd6e7 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr10/src/main.c b/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/main.c index c77b51e..3cdaadd 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr10/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/readme.txt b/project/at_start_f415/examples/tmr/pwm_output_tmr3/readme.txt index 18bc5f4..72c010e 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c index 8ac72c6..803e1c2 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/pwm_output_tmr3/src/main.c b/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/main.c index d684836..528324e 100644 --- a/project/at_start_f415/examples/tmr/pwm_output_tmr3/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/timer_base/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/timer_base/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/readme.txt b/project/at_start_f415/examples/tmr/timer_base/readme.txt index 3065ed8..bfe383b 100644 --- a/project/at_start_f415/examples/tmr/timer_base/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/timer_base/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/timer_base/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/src/at32f415_int.c b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_int.c index 6ccf73a..8676c88 100644 --- a/project/at_start_f415/examples/tmr/timer_base/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/timer_base/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/timer_base/src/main.c b/project/at_start_f415/examples/tmr/timer_base/src/main.c index 5caf31e..4aad0f6 100644 --- a/project/at_start_f415/examples/tmr/timer_base/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/readme.txt b/project/at_start_f415/examples/tmr/tmr1_synchro/readme.txt index fbc5841..fa6ebb7 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c index 91e3dff..589d820 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/tmr1_synchro/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr1_synchro/src/main.c b/project/at_start_f415/examples/tmr/tmr1_synchro/src/main.c index 4fadc6c..605795b 100644 --- a/project/at_start_f415/examples/tmr/tmr1_synchro/src/main.c +++ b/project/at_start_f415/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_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/readme.txt b/project/at_start_f415/examples/tmr/tmr2_32bit/readme.txt index c39d775..4345349 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/readme.txt +++ b/project/at_start_f415/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_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c index 832070f..f15576a 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c +++ b/project/at_start_f415/examples/tmr/tmr2_32bit/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/tmr/tmr2_32bit/src/main.c b/project/at_start_f415/examples/tmr/tmr2_32bit/src/main.c index 48820bc..2a238da 100644 --- a/project/at_start_f415/examples/tmr/tmr2_32bit/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/half_duplex/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/half_duplex/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/readme.txt b/project/at_start_f415/examples/usart/half_duplex/readme.txt index 0dae5b5..53b9c54 100644 --- a/project/at_start_f415/examples/usart/half_duplex/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/half_duplex/src/at32f415_clock.c b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/half_duplex/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/src/at32f415_int.c b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_int.c index ea75b8e..d021f53 100644 --- a/project/at_start_f415/examples/usart/half_duplex/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/half_duplex/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/half_duplex/src/main.c b/project/at_start_f415/examples/usart/half_duplex/src/main.c index 4dacef3..395465a 100644 --- a/project/at_start_f415/examples/usart/half_duplex/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/hw_flow_control/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/readme.txt b/project/at_start_f415/examples/usart/hw_flow_control/readme.txt index 959440a..a6b099f 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/hw_flow_control/src/at32f415_clock.c b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/src/at32f415_int.c b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_int.c index 2e0d0d6..14ebbf8 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/hw_flow_control/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/hw_flow_control/src/main.c b/project/at_start_f415/examples/usart/hw_flow_control/src/main.c index 2fa776c..33d4fa5 100644 --- a/project/at_start_f415/examples/usart/hw_flow_control/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/idle_detection/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/idle_detection/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/readme.txt b/project/at_start_f415/examples/usart/idle_detection/readme.txt index 7b0b42c..166f1b4 100644 --- a/project/at_start_f415/examples/usart/idle_detection/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/idle_detection/src/at32f415_clock.c b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/idle_detection/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/src/at32f415_int.c b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_int.c index 8cfda89..805a915 100644 --- a/project/at_start_f415/examples/usart/idle_detection/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/idle_detection/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/idle_detection/src/main.c b/project/at_start_f415/examples/usart/idle_detection/src/main.c index 2124d8d..19270e6 100644 --- a/project/at_start_f415/examples/usart/idle_detection/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/readme.txt b/project/at_start_f415/examples/usart/interrupt/readme.txt index a000a36..e9eb29b 100644 --- a/project/at_start_f415/examples/usart/interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/usart/interrupt/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/src/at32f415_int.c b/project/at_start_f415/examples/usart/interrupt/src/at32f415_int.c index 732bdd8..1b0851e 100644 --- a/project/at_start_f415/examples/usart/interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/interrupt/src/main.c b/project/at_start_f415/examples/usart/interrupt/src/main.c index 11a60a9..0c7df81 100644 --- a/project/at_start_f415/examples/usart/interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/irda/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/irda/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/irda/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/irda/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/irda/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/irda/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/irda/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h b/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/irda/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/readme.txt b/project/at_start_f415/examples/usart/irda/readme.txt index 7d902b9..b218fd3 100644 --- a/project/at_start_f415/examples/usart/irda/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/irda/src/at32f415_clock.c b/project/at_start_f415/examples/usart/irda/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/irda/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/irda/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/src/at32f415_int.c b/project/at_start_f415/examples/usart/irda/src/at32f415_int.c index 29e2a45..767ecf0 100644 --- a/project/at_start_f415/examples/usart/irda/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/irda/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/irda/src/main.c b/project/at_start_f415/examples/usart/irda/src/main.c index b6a60c1..68d5a88 100644 --- a/project/at_start_f415/examples/usart/irda/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/polling/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/polling/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/polling/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h b/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/readme.txt b/project/at_start_f415/examples/usart/polling/readme.txt index 3048cce..f37fb50 100644 --- a/project/at_start_f415/examples/usart/polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/polling/src/at32f415_clock.c b/project/at_start_f415/examples/usart/polling/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/src/at32f415_int.c b/project/at_start_f415/examples/usart/polling/src/at32f415_int.c index 8707ea9..e1fcdc3 100644 --- a/project/at_start_f415/examples/usart/polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/polling/src/main.c b/project/at_start_f415/examples/usart/polling/src/main.c index d0b50d6..83f4469 100644 --- a/project/at_start_f415/examples/usart/polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/printf/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/printf/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/printf/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/printf/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/printf/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/printf/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/printf/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h b/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/printf/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/readme.txt b/project/at_start_f415/examples/usart/printf/readme.txt index 351b514..0992a19 100644 --- a/project/at_start_f415/examples/usart/printf/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/printf/src/at32f415_clock.c b/project/at_start_f415/examples/usart/printf/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/printf/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/printf/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/src/at32f415_int.c b/project/at_start_f415/examples/usart/printf/src/at32f415_int.c index 873c16d..d3e5c3b 100644 --- a/project/at_start_f415/examples/usart/printf/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/printf/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/printf/src/main.c b/project/at_start_f415/examples/usart/printf/src/main.c index 229a885..ac8d607 100644 --- a/project/at_start_f415/examples/usart/printf/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/receiver_mute/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/receiver_mute/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/readme.txt b/project/at_start_f415/examples/usart/receiver_mute/readme.txt index 70caa19..e062a89 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/receiver_mute/src/at32f415_clock.c b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/src/at32f415_int.c b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_int.c index d2e3459..181e94f 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/receiver_mute/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/receiver_mute/src/main.c b/project/at_start_f415/examples/usart/receiver_mute/src/main.c index 56c03a0..b696b01 100644 --- a/project/at_start_f415/examples/usart/receiver_mute/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/smartcard/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/smartcard/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/inc/smartcard_config.h b/project/at_start_f415/examples/usart/smartcard/inc/smartcard_config.h index 0a7e06f..14f2bfe 100644 --- a/project/at_start_f415/examples/usart/smartcard/inc/smartcard_config.h +++ b/project/at_start_f415/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_f415/examples/usart/smartcard/readme.txt b/project/at_start_f415/examples/usart/smartcard/readme.txt index 0bea84d..e3cde4d 100644 --- a/project/at_start_f415/examples/usart/smartcard/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/smartcard/src/at32f415_clock.c b/project/at_start_f415/examples/usart/smartcard/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/smartcard/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/smartcard/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/src/at32f415_int.c b/project/at_start_f415/examples/usart/smartcard/src/at32f415_int.c index 905f43f..10a278c 100644 --- a/project/at_start_f415/examples/usart/smartcard/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/smartcard/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/smartcard/src/main.c b/project/at_start_f415/examples/usart/smartcard/src/main.c index 333b335..ec0bd8f 100644 --- a/project/at_start_f415/examples/usart/smartcard/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/synchronous/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/synchronous/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/readme.txt b/project/at_start_f415/examples/usart/synchronous/readme.txt index ac9a484..819bce2 100644 --- a/project/at_start_f415/examples/usart/synchronous/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/synchronous/src/at32f415_clock.c b/project/at_start_f415/examples/usart/synchronous/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/synchronous/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/synchronous/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/src/at32f415_int.c b/project/at_start_f415/examples/usart/synchronous/src/at32f415_int.c index e0187ee..23b258c 100644 --- a/project/at_start_f415/examples/usart/synchronous/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/synchronous/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/synchronous/src/main.c b/project/at_start_f415/examples/usart/synchronous/src/main.c index 5d19f8f..a864fa5 100644 --- a/project/at_start_f415/examples/usart/synchronous/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/readme.txt b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/readme.txt index a080485..b73357e 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c index d3407d9..091e200 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_interrupt/src/main.c b/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/main.c index 7ea7ce4..1276b03 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_interrupt/src/main.c +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/readme.txt b/project/at_start_f415/examples/usart/transfer_by_dma_polling/readme.txt index 74c8ecb..7943220 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/readme.txt +++ b/project/at_start_f415/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_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c index bf37487..4d0097a 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c +++ b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usart/transfer_by_dma_polling/src/main.c b/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/main.c index 7db1fab..3a172e2 100644 --- a/project/at_start_f415/examples/usart/transfer_by_dma_polling/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/audio/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/inc/audio_codec.h b/project/at_start_f415/examples/usb_device/audio/inc/audio_codec.h index 5bab9fc..0947b78 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/audio_codec.h +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/audio/inc/usb_conf.h index 63b9b25..b989e2f 100644 --- a/project/at_start_f415/examples/usb_device/audio/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/readme.txt b/project/at_start_f415/examples/usb_device/audio/readme.txt index a25d247..171fcfc 100644 --- a/project/at_start_f415/examples/usb_device/audio/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/audio/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/audio/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/audio/src/at32f415_int.c index 3f7a4cc..4ad419e 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/audio/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/audio/src/audio_codec.c b/project/at_start_f415/examples/usb_device/audio/src/audio_codec.c index 20319ba..0f6616d 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/audio_codec.c +++ b/project/at_start_f415/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_f415/examples/usb_device/audio/src/main.c b/project/at_start_f415/examples/usb_device/audio/src/main.c index 553e268..265a031 100644 --- a/project/at_start_f415/examples/usb_device/audio/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/inc/audio_codec.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/audio_codec.h index bb80aea..be09ddf 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/audio_codec.h +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_audio_hid/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/usb_conf.h index 1e3353f..27c10d0 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_audio_hid/readme.txt b/project/at_start_f415/examples/usb_device/composite_audio_hid/readme.txt index 0bdb177..fa1db65 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c index 7eba0b7..461cbdc 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_audio_hid/src/audio_codec.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/audio_codec.c index 6e86870..b0dc69a 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/audio_codec.c +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_audio_hid/src/main.c b/project/at_start_f415/examples/usb_device/composite_audio_hid/src/main.c index 11f4fd1..ed44f04 100644 --- a/project/at_start_f415/examples/usb_device/composite_audio_hid/src/main.c +++ b/project/at_start_f415/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 @@ -46,7 +46,7 @@ otg_core_type otg_core_struct; void usb_clock48m_select(usb_clk48_s clk_s); void usb_gpio_config(void); void usb_low_power_wakeup_config(void); -uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; +uint8_t report_buf[USBD_AUHID_IN_MAXPACKET_SIZE]; /** * @brief main function. @@ -94,7 +94,7 @@ int main(void) { report_buf[0] = HID_REPORT_ID_5; report_buf[1] = (~report_buf[1]) & 0x1; - class_send_report(&otg_core_struct.dev, report_buf, USBD_IN_MAXPACKET_SIZE); + audio_hid_class_send_report(&otg_core_struct.dev, report_buf, USBD_AUHID_IN_MAXPACKET_SIZE); } delay_ms(100); } diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h index 58cf7b6..205d93f 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_vcp_keyboard/readme.txt b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/readme.txt index 6900964..09bf992 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c index 04cd246..afd4ac5 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/composite_vcp_keyboard/src/main.c b/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/main.c index 07bcaf5..60639b2 100644 --- a/project/at_start_f415/examples/usb_device/composite_vcp_keyboard/src/main.c +++ b/project/at_start_f415/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 @@ -47,7 +47,7 @@ __IO uint8_t keyboard_send_flag; uint8_t usb_buffer[256]; void usb_clock48m_select(usb_clk48_s clk_s); -void keyboard_send_string(uint8_t *string, uint8_t len); +void keyboard_send_string(void *udev, uint8_t *string, uint8_t len); void usb_gpio_config(void); void usb_low_power_wakeup_config(void); @@ -109,27 +109,29 @@ void EXINT0_IRQHandler(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; + 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(&otg_core_struct.dev, string[index]); + vcpkybrd->g_keyboard_tx_completed = 0; + usb_vcpkybrd_keyboard_send_char(&otg_core_struct.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(&otg_core_struct.dev, 0x00); + vcpkybrd->g_keyboard_tx_completed = 0; + usb_vcpkybrd_keyboard_send_char(&otg_core_struct.dev, 0x00); break; } } @@ -185,7 +187,7 @@ int main(void) while(1) { /* get usb vcp receive data */ - data_len = usb_vcp_get_rxdata(&otg_core_struct.dev, usb_buffer); + data_len = usb_vcpkybrd_vcp_get_rxdata(&otg_core_struct.dev, usb_buffer); if(data_len > 0 || send_zero_packet == 1) { @@ -199,11 +201,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(&otg_core_struct.dev, usb_buffer, data_len) == SUCCESS) + if(usb_vcpkybrd_vcp_send_data(&otg_core_struct.dev, usb_buffer, data_len) == SUCCESS) { break; } @@ -212,7 +214,7 @@ int main(void) if(keyboard_send_flag) { keyboard_send_flag = 0; - keyboard_send_string((uint8_t *)" Keyboard Demo\r\n", 16); + keyboard_send_string(&otg_core_struct.dev, (uint8_t *)" Keyboard Demo\r\n", 16); } } diff --git a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/custom_hid/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/custom_hid/inc/usb_conf.h index 5986806..bfa2c90 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/custom_hid/readme.txt b/project/at_start_f415/examples/usb_device/custom_hid/readme.txt index 5362e18..09c00d1 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/custom_hid/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_int.c index 7e48461..e3a8fa6 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/custom_hid/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/custom_hid/src/main.c b/project/at_start_f415/examples/usb_device/custom_hid/src/main.c index a1ea670..150336e 100644 --- a/project/at_start_f415/examples/usb_device/custom_hid/src/main.c +++ b/project/at_start_f415/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 @@ -42,7 +42,7 @@ /* usb global struct define */ otg_core_type otg_core_struct; -uint8_t report_buf[USBD_IN_MAXPACKET_SIZE]; +uint8_t report_buf[USBD_CUSTOM_IN_MAXPACKET_SIZE]; void usb_clock48m_select(usb_clk48_s clk_s); void usb_gpio_config(void); void usb_low_power_wakeup_config(void); @@ -81,7 +81,7 @@ int main(void) USB_FULL_SPEED_CORE_ID, USB_ID, &custom_hid_class_handler, - &hid_desc_handler); + &custom_hid_desc_handler); while(1) { @@ -89,7 +89,7 @@ int main(void) { report_buf[0] = HID_REPORT_ID_5; report_buf[1] = (~report_buf[1]) & 0x1; - class_send_report(&otg_core_struct.dev, report_buf, USBD_IN_MAXPACKET_SIZE); + custom_hid_class_send_report(&otg_core_struct.dev, report_buf, USBD_CUSTOM_IN_MAXPACKET_SIZE); } } } diff --git a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/keyboard/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/keyboard/inc/usb_conf.h index ed4bd98..bbba8e3 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/keyboard/readme.txt b/project/at_start_f415/examples/usb_device/keyboard/readme.txt index 9672bd9..754faae 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/keyboard/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_int.c index ec1ca4c..62b6b1f 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/keyboard/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/keyboard/src/main.c b/project/at_start_f415/examples/usb_device/keyboard/src/main.c index 29790db..5d0adcd 100644 --- a/project/at_start_f415/examples/usb_device/keyboard/src/main.c +++ b/project/at_start_f415/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 @@ -45,7 +45,7 @@ otg_core_type otg_core_struct; extern __IO uint8_t hid_suspend_flag; void usb_clock48m_select(usb_clk48_s clk_s); -void keyboard_send_string(uint8_t *string, uint8_t len); +void keyboard_send_string(void *udev, uint8_t *string, uint8_t len); void usb_gpio_config(void); void usb_low_power_wakeup_config(void); void system_clock_recover(void); @@ -57,27 +57,29 @@ void button_exint_init(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(&otg_core_struct.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(&otg_core_struct.dev, 0x00); + pkeyboard->g_u8tx_completed = 0; + usb_hid_keyboard_send_char(udev, 0x00); break; } } @@ -134,7 +136,7 @@ int main(void) { if(usbd_connect_state_get(&otg_core_struct.dev) == USB_CONN_STATE_CONFIGURED) { - keyboard_send_string((uint8_t *)" Keyboard Demo\r\n", 16); + keyboard_send_string(&otg_core_struct.dev, (uint8_t *)" Keyboard Demo\r\n", 16); } /* remote wakeup */ if(usbd_connect_state_get(&otg_core_struct.dev) == USB_CONN_STATE_SUSPENDED @@ -146,7 +148,7 @@ int main(void) #ifdef USB_LOW_POWER_WAKUP /* enter deep sleep */ - if(hid_suspend_flag == 1) + if(((keyboard_type *)(otg_core_struct.dev.class_handler->pdata))->hid_suspend_flag == 1) { at32_led_off(LED2); at32_led_off(LED3); @@ -162,7 +164,7 @@ int main(void) __NOP(); } system_clock_recover(); - hid_suspend_flag = 0; + ((keyboard_type *)(otg_core_struct.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_f415/examples/usb_device/mouse/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/mouse/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/mouse/inc/usb_conf.h index bc2043a..035846e 100644 --- a/project/at_start_f415/examples/usb_device/mouse/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/mouse/readme.txt b/project/at_start_f415/examples/usb_device/mouse/readme.txt index 106ed7c..956fe35 100644 --- a/project/at_start_f415/examples/usb_device/mouse/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/mouse/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/mouse/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_int.c index e3e5ef4..8f04bb4 100644 --- a/project/at_start_f415/examples/usb_device/mouse/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/mouse/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/mouse/src/main.c b/project/at_start_f415/examples/usb_device/mouse/src/main.c index 8306643..65a7f5c 100644 --- a/project/at_start_f415/examples/usb_device/mouse/src/main.c +++ b/project/at_start_f415/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 @@ -43,7 +43,6 @@ /* usb global struct define */ otg_core_type otg_core_struct; __IO uint8_t press_mouse = 0; -extern __IO uint8_t hid_suspend_flag; void usb_clock48m_select(usb_clk48_s clk_s); void keyboard_send_string(uint8_t *string, uint8_t len); void usb_gpio_config(void); @@ -119,7 +118,7 @@ int main(void) } #ifdef USB_LOW_POWER_WAKUP /* enter deep sleep */ - if(hid_suspend_flag == 1) + if(((mouse_type *)(otg_core_struct.dev.class_handler->pdata))->hid_suspend_flag == 1) { at32_led_off(LED2); at32_led_off(LED3); @@ -135,7 +134,7 @@ int main(void) __NOP(); } system_clock_recover(); - hid_suspend_flag = 0; + ((mouse_type *)(otg_core_struct.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_f415/examples/usb_device/msc/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/msc/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/inc/msc_diskio.h b/project/at_start_f415/examples/usb_device/msc/inc/msc_diskio.h index 6194a84..c62f15c 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/msc_diskio.h +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/msc/inc/usb_conf.h index c5b81d5..2c081c7 100644 --- a/project/at_start_f415/examples/usb_device/msc/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/readme.txt b/project/at_start_f415/examples/usb_device/msc/readme.txt index b72453c..e3c9bc9 100644 --- a/project/at_start_f415/examples/usb_device/msc/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/msc/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/msc/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/msc/src/at32f415_int.c index 2a5ee58..7437b50 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/msc/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/msc/src/main.c b/project/at_start_f415/examples/usb_device/msc/src/main.c index 34e715b..91f6ca8 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/main.c +++ b/project/at_start_f415/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_f415/examples/usb_device/msc/src/msc_diskio.c b/project/at_start_f415/examples/usb_device/msc/src/msc_diskio.c index 7bc6047..3a167a2 100644 --- a/project/at_start_f415/examples/usb_device/msc/src/msc_diskio.c +++ b/project/at_start_f415/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_f415/examples/usb_device/printer/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/printer/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/printer/inc/usb_conf.h index b3d4e38..e1dcaed 100644 --- a/project/at_start_f415/examples/usb_device/printer/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/printer/readme.txt b/project/at_start_f415/examples/usb_device/printer/readme.txt index e839ea8..0d2b429 100644 --- a/project/at_start_f415/examples/usb_device/printer/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/printer/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/printer/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/printer/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/printer/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/printer/src/at32f415_int.c index 7746d98..2ffb0d7 100644 --- a/project/at_start_f415/examples/usb_device/printer/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/printer/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/printer/src/main.c b/project/at_start_f415/examples/usb_device/printer/src/main.c index e026ffd..92c5465 100644 --- a/project/at_start_f415/examples/usb_device/printer/src/main.c +++ b/project/at_start_f415/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 @@ -80,8 +80,8 @@ int main(void) usbd_init(&otg_core_struct, USB_FULL_SPEED_CORE_ID, USB_ID, - &class_handler, - &desc_handler); + &printer_class_handler, + &printer_desc_handler); while(1) { diff --git a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/vcp_loopback/inc/usb_conf.h index 1b96ecc..0ccd5bb 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/vcp_loopback/readme.txt b/project/at_start_f415/examples/usb_device/vcp_loopback/readme.txt index 988f4b3..e60da75 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c index 7eefc70..36462fd 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/vcp_loopback/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/vcp_loopback/src/main.c b/project/at_start_f415/examples/usb_device/vcp_loopback/src/main.c index e10269c..a980028 100644 --- a/project/at_start_f415/examples/usb_device/vcp_loopback/src/main.c +++ b/project/at_start_f415/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 @@ -86,8 +86,8 @@ int main(void) usbd_init(&otg_core_struct, USB_FULL_SPEED_CORE_ID, USB_ID, - &class_handler, - &desc_handler); + &cdc_class_handler, + &cdc_desc_handler); while(1) { /* get usb vcp receive data */ @@ -106,7 +106,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_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h new file mode 100644 index 0000000..879e28f --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_clock.h @@ -0,0 +1,46 @@ +/** + ************************************************************************** + * @file at32f415_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 __AT32F415_CLOCK_H +#define __AT32F415_CLOCK_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f415.h" + +/* exported functions ------------------------------------------------------- */ +void system_clock_config(void); + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F415_CLOCK_H */ + diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h new file mode 100644 index 0000000..0d4108d --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_conf.h @@ -0,0 +1,146 @@ +/** + ************************************************************************** + * @file at32f415_conf.h + * @version v2.0.3 + * @date 2022-02-11 + * @brief at32f415 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 __AT32F415_CONF_H +#define __AT32F415_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 CMP_MODULE_ENABLED +#define TMR_MODULE_ENABLED +#define ERTC_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 MISC_MODULE_ENABLED + +/* includes ------------------------------------------------------------------*/ +#ifdef CRM_MODULE_ENABLED +#include "at32f415_crm.h" +#endif +#ifdef CMP_MODULE_ENABLED +#include "at32f415_cmp.h" +#endif +#ifdef TMR_MODULE_ENABLED +#include "at32f415_tmr.h" +#endif +#ifdef ERTC_MODULE_ENABLED +#include "at32f415_ertc.h" +#endif +#ifdef GPIO_MODULE_ENABLED +#include "at32f415_gpio.h" +#endif +#ifdef I2C_MODULE_ENABLED +#include "at32f415_i2c.h" +#endif +#ifdef USART_MODULE_ENABLED +#include "at32f415_usart.h" +#endif +#ifdef PWC_MODULE_ENABLED +#include "at32f415_pwc.h" +#endif +#ifdef CAN_MODULE_ENABLED +#include "at32f415_can.h" +#endif +#ifdef ADC_MODULE_ENABLED +#include "at32f415_adc.h" +#endif +#ifdef SPI_MODULE_ENABLED +#include "at32f415_spi.h" +#endif +#ifdef DMA_MODULE_ENABLED +#include "at32f415_dma.h" +#endif +#ifdef DEBUG_MODULE_ENABLED +#include "at32f415_debug.h" +#endif +#ifdef FLASH_MODULE_ENABLED +#include "at32f415_flash.h" +#endif +#ifdef CRC_MODULE_ENABLED +#include "at32f415_crc.h" +#endif +#ifdef WWDT_MODULE_ENABLED +#include "at32f415_wwdt.h" +#endif +#ifdef WDT_MODULE_ENABLED +#include "at32f415_wdt.h" +#endif +#ifdef EXINT_MODULE_ENABLED +#include "at32f415_exint.h" +#endif +#ifdef SDIO_MODULE_ENABLED +#include "at32f415_sdio.h" +#endif +#ifdef MISC_MODULE_ENABLED +#include "at32f415_misc.h" +#endif +#ifdef USB_MODULE_ENABLED +#include "at32f415_usb.h" +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* __AT32F415_CONF_H */ + + diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h new file mode 100644 index 0000000..1369a00 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/at32f415_int.h @@ -0,0 +1,58 @@ +/** + ************************************************************************** + * @file at32f415_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 __AT32F415_INT_H +#define __AT32F415_INT_H + +#ifdef __cplusplus +extern "C" { +#endif + +/* includes ------------------------------------------------------------------*/ +#include "at32f415.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_f415/examples/usb_device/virtual_comport/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/virtual_comport/inc/usb_conf.h new file mode 100644 index 0000000..b11d387 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/inc/usb_conf.h @@ -0,0 +1,154 @@ +/** + ************************************************************************** + * @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 "at32f415_usb.h" +#include "at32f415.h" +#include "stdio.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USB_device_vcp_loopback + * @{ + */ + +/** + * @brief enable usb device mode + */ +#define USE_OTG_DEVICE_MODE + +/** + * @brief enable usb host mode + */ +/* #define USE_OTG_HOST_MODE */ + +#define USB_ID 0 +#define OTG_CLOCK CRM_OTGFS1_PERIPH_CLOCK +#define OTG_IRQ OTGFS1_IRQn +#define OTG_IRQ_HANDLER OTGFS1_IRQHandler +#define OTG_WKUP_IRQ OTGFS1_WKUP_IRQn + +#define OTG_WKUP_HANDLER OTGFS1_WKUP_IRQHandler +#define OTG_WKUP_EXINT_LINE EXINT_LINE_18 + +#define OTG_PIN_GPIO GPIOA +#define OTG_PIN_GPIO_CLOCK CRM_GPIOA_PERIPH_CLOCK +#define OTG_PIN_VBUS GPIO_PINS_9 +#define OTG_PIN_ID GPIO_PINS_10 + +#define OTG_PIN_SOF_GPIO GPIOA +#define OTG_PIN_SOF_GPIO_CLOCK CRM_GPIOB_PERIPH_CLOCK +#define OTG_PIN_SOF GPIO_PINS_8 + +/** + * @brief usb device mode config + */ +#ifdef USE_OTG_DEVICE_MODE +/** + * @brief usb device mode fifo + */ +/* otg1 device fifo */ +#define USBD_RX_SIZE 128 +#define USBD_EP0_TX_SIZE 24 +#define USBD_EP1_TX_SIZE 20 +#define USBD_EP2_TX_SIZE 20 +#define USBD_EP3_TX_SIZE 20 + +/** + * @brief usb endpoint max num define + */ +#ifndef USB_EPT_MAX_NUM +#define USB_EPT_MAX_NUM 4 +#endif +#endif + +/** + * @brief usb host mode config + */ +#ifdef USE_OTG_HOST_MODE +#ifndef USB_HOST_CHANNEL_NUM +#define USB_HOST_CHANNEL_NUM 8 +#endif + +/** + * @brief usb host mode fifo + */ +/* otg1 host fifo */ +#define USBH_RX_FIFO_SIZE 128 +#define USBH_NP_TX_FIFO_SIZE 96 +#define USBH_P_TX_FIFO_SIZE 96 +#endif + +/** + * @brief usb sof output enable + */ +/* #define USB_SOF_OUTPUT_ENABLE */ + +/** + * @brief ignore vbus detection, only available in at32f415xx revision C. + * at32f415xx revision B: (not support) + * the vbus detection pin (pa9) can not be used for other functionality. + * vbus pin must kept at VBUS or VDD. + * + * at32f415xx revision C: (support) + * ignore vbus detection, the internal vbus is always valid. + * the vbus pin (pa9) can be used for other functionality. + */ +/* #define USB_VBUS_IGNORE */ + +/** + * @brief usb low power wakeup handler enable + */ +/* #define USB_LOW_POWER_WAKUP */ + +/** + * @brief usb virtual comport + */ +#define USB_VIRTUAL_COMPORT + +void usb_delay_ms(uint32_t ms); +void usb_delay_us(uint32_t us); +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx b/project/at_start_f415/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx new file mode 100644 index 0000000..61b0968 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvoptx @@ -0,0 +1,492 @@ + + + + 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 -FF0AT32F415_256 -FS08000000 -FL040000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_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\at32f415_clock.c + at32f415_clock.c + 0 + 0 + + + 1 + 2 + 1 + 0 + 0 + 0 + ..\src\at32f415_int.c + at32f415_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 + ..\..\..\..\..\at32f415_board\at32f415_board.c + at32f415_board.c + 0 + 0 + + + + + firmware + 0 + 0 + 0 + 0 + + 3 + 5 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + at32f415_crm.c + 0 + 0 + + + 3 + 6 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + at32f415_exint.c + 0 + 0 + + + 3 + 7 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c + at32f415_flash.c + 0 + 0 + + + 3 + 8 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + at32f415_gpio.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + at32f415_misc.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + at32f415_pwc.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + at32f415_tmr.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + at32f415_usart.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usb.c + at32f415_usb.c + 0 + 0 + + + + + cmsis + 0 + 0 + 0 + 0 + + 4 + 14 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + system_at32f415.c + 0 + 0 + + + 4 + 15 + 2 + 0 + 0 + 0 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + startup_at32f415.s + 0 + 0 + + + + + usbd_driver + 0 + 0 + 0 + 0 + + 5 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usb_core.c + usb_core.c + 0 + 0 + + + 5 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_core.c + usbd_core.c + 0 + 0 + + + 5 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_int.c + usbd_int.c + 0 + 0 + + + 5 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_sdr.c + usbd_sdr.c + 0 + 0 + + + + + usbd_class + 0 + 0 + 0 + 0 + + 6 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_class.c + cdc_class.c + 0 + 0 + + + 6 + 21 + 1 + 0 + 0 + 0 + ..\..\..\..\..\..\middlewares\usbd_class\cdc\cdc_desc.c + cdc_desc.c + 0 + 0 + + + + + readme + 0 + 0 + 0 + 0 + + 7 + 22 + 5 + 0 + 0 + 0 + ..\readme.txt + readme.txt + 0 + 0 + + + +
diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx b/project/at_start_f415/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx new file mode 100644 index 0000000..c88a6fc --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/mdk_v5/virtual_comport.uvprojx @@ -0,0 +1,552 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + virtual_comport + 0x4 + ARM-ADS + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 + + + -AT32F415RCT7 + ArteryTek + ArteryTek.AT32F415_DFP.2.0.0 + IRAM(0x20000000,0x8000) IROM(0x08000000,0x40000) CPUTYPE("Cortex-M4") CLOCK(12000000) ELITTLE + + + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0AT32F415_256 -FS08000000 -FL03F0000 -FP0($$Device:-AT32F415RCT7$Flash\AT32F415_256.FLM)) + 0 + $$Device:- + + + + + + + + + + $$Device:-AT32F415RCT7$SVD\AT32F415xx_v2.svd + 0 + 0 + + + + AT32F415RCT7$Device\Include\at32f415.h\ + AT32F415RCT7$Device\Include\at32f415.h\ + + 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 + 0 + 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 + + + AT32F415RCT7,USE_STDPERIPH_DRIVER,AT_START_F415_V1 + + ..\..\..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\..\..\libraries\cmsis\cm4\device_support;..\..\..\..\..\..\libraries\drivers\inc;..\..\..\..\..\at32f415_board;..\inc;..\..\..\..\..\..\middlewares\usb_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 + + + at32f415_clock.c + 1 + ..\src\at32f415_clock.c + + + at32f415_int.c + 1 + ..\src\at32f415_int.c + + + main.c + 1 + ..\src\main.c + + + + + bsp + + + at32f415_board.c + 1 + ..\..\..\..\..\at32f415_board\at32f415_board.c + + + + + firmware + + + at32f415_crm.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_crm.c + + + at32f415_exint.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_exint.c + + + at32f415_flash.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_flash.c + + + at32f415_gpio.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_gpio.c + + + at32f415_misc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_misc.c + + + at32f415_pwc.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_pwc.c + + + at32f415_tmr.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_tmr.c + + + at32f415_usart.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usart.c + + + at32f415_usb.c + 1 + ..\..\..\..\..\..\libraries\drivers\src\at32f415_usb.c + + + + + cmsis + + + system_at32f415.c + 1 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\system_at32f415.c + + + startup_at32f415.s + 2 + ..\..\..\..\..\..\libraries\cmsis\cm4\device_support\startup\mdk\startup_at32f415.s + + + + + usbd_driver + + + usb_core.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usb_core.c + + + usbd_core.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_core.c + + + usbd_int.c + 1 + ..\..\..\..\..\..\middlewares\usb_drivers\src\usbd_int.c + + + usbd_sdr.c + 1 + ..\..\..\..\..\..\middlewares\usb_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_f415/examples/usb_device/virtual_comport/readme.txt b/project/at_start_f415/examples/usb_device/virtual_comport/readme.txt new file mode 100644 index 0000000..639efb6 --- /dev/null +++ b/project/at_start_f415/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). diff --git a/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c new file mode 100644 index 0000000..56498ab --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_clock.c @@ -0,0 +1,99 @@ +/** + ************************************************************************** + * @file at32f415_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 "at32f415_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 = 144000000 + * - ahbdiv = 1 + * - ahbclk = 144000000 + * - apb2div = 2 + * - apb2clk = 72000000 + * - apb1div = 2 + * - apb1clk = 72000000 + * - pll_mult = 36 + * - flash_wtcyc = 4 cycle + * @param none + * @retval none + */ +void system_clock_config(void) +{ + /* config flash psr register */ + flash_psr_set(FLASH_WAIT_CYCLE_4); + + /* 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_36); + + /* 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_f415/examples/usb_device/virtual_comport/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_int.c new file mode 100644 index 0000000..41b2cc3 --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/src/at32f415_int.c @@ -0,0 +1,141 @@ +/** + ************************************************************************** + * @file at32f415_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 "at32f415_int.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_virtual_comport + * @{ + */ + +/** + * @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_f415/examples/usb_device/virtual_comport/src/main.c b/project/at_start_f415/examples/usb_device/virtual_comport/src/main.c new file mode 100644 index 0000000..48af67b --- /dev/null +++ b/project/at_start_f415/examples/usb_device/virtual_comport/src/main.c @@ -0,0 +1,488 @@ +/** + ************************************************************************** + * @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 "at32f415_board.h" +#include "at32f415_clock.h" +#include "usb_conf.h" +#include "usb_core.h" +#include "usbd_int.h" +#include "cdc_class.h" +#include "cdc_desc.h" + +/** @addtogroup AT32F415_periph_examples + * @{ + */ + +/** @addtogroup 415_USB_device_virtual_comport USB_device_virtual_comport + * @{ + */ + +/* usb global struct define */ +otg_core_type otg_core_struct; +uint8_t usb_buffer[256]; +void usb_clock48m_select(usb_clk48_s clk_s); +void usb_gpio_config(void); +void usb_low_power_wakeup_config(void); + +/* 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 main function. + * @param none + * @retval none + */ +int main(void) +{ + uint16_t data_len; + + uint32_t timeout; + + uint8_t send_zero_packet = 0; + + 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); + + /* usb gpio config */ + usb_gpio_config(); + +#ifdef USB_LOW_POWER_WAKUP + usb_low_power_wakeup_config(); +#endif + + /* enable otgfs clock */ + crm_periph_clock_enable(OTG_CLOCK, TRUE); + + /* select usb 48m clcok source */ + usb_clock48m_select(USB_CLK_HEXT); + + /* enable otgfs irq */ + nvic_irq_enable(OTG_IRQ, 0, 0); + + /* init usb */ + usbd_init(&otg_core_struct, + USB_FULL_SPEED_CORE_ID, + USB_ID, + &cdc_class_handler, + &cdc_desc_handler); + while(1) + { + /* get usb vcp receive data */ + data_len = usb_vcp_get_rxdata(&otg_core_struct.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(&otg_core_struct.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(&otg_core_struct.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(&otg_core_struct.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 */ + case 0x5: + case 0x6: + case 0x7: + break; + case 0x8: + usart_data_bit = USART_DATA_8BITS; + break; + /* hardware usart not support data bits for 16 */ + case 0x10: + break; + default : + break; + } + /* parity */ + switch(linecoding.parity) + { + case 0x0: + usart_parity_select = USART_PARITY_NONE; + break; + case 0x1: + usart_parity_select = USART_PARITY_ODD; + break; + case 0x2: + usart_parity_select = USART_PARITY_EVEN; + break; + /* hardware usart not support partiy for mark and space */ + case 0x3: + case 0x4: + break; + default : + break; + } + + nvic_irq_enable(USART2_IRQn, 0, 0); + + /* configure usart2 param */ + usart_init(USART2, linecoding.bitrate, usart_data_bit, usart_stop_bit); + usart_parity_selection_config(USART2, usart_parity_select); + usart_transmitter_enable(USART2, TRUE); + usart_receiver_enable(USART2, TRUE); + + /* enable usart2 interrupt */ + usart_interrupt_enable(USART2, USART_RDBF_INT, TRUE); + usart_enable(USART2, TRUE); +} + +/** + * @brief this function handles usart2 gpio config. + * @param none + * @retval none + */ +void usart_gpio_config(void) +{ + gpio_init_type gpio_init_struct; + crm_periph_clock_enable(CRM_GPIOA_PERIPH_CLOCK, TRUE); + + /* configure the usart2 tx pin */ + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; + gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; + gpio_init_struct.gpio_mode = GPIO_MODE_MUX; + gpio_init_struct.gpio_pins = GPIO_PINS_2; + gpio_init_struct.gpio_pull = GPIO_PULL_NONE; + gpio_init(GPIOA, &gpio_init_struct); + + /* configure the usart2 rx pin */ + gpio_init_struct.gpio_drive_strength = GPIO_DRIVE_STRENGTH_STRONGER; + gpio_init_struct.gpio_out_type = GPIO_OUTPUT_PUSH_PULL; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init_struct.gpio_pins = GPIO_PINS_3; + gpio_init_struct.gpio_pull = GPIO_PULL_UP; + gpio_init(GPIOA, &gpio_init_struct); + +} + +/** + * @brief usb 48M clock select + * @param clk_s:USB_CLK_HICK, USB_CLK_HEXT + * @retval none + */ +void usb_clock48m_select(usb_clk48_s clk_s) +{ + 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; + + default: + break; + } +} + +/** + * @brief this function config gpio. + * @param none + * @retval none + */ +void usb_gpio_config(void) +{ + gpio_init_type gpio_init_struct; + + crm_periph_clock_enable(OTG_PIN_GPIO_CLOCK, TRUE); + gpio_default_para_init(&gpio_init_struct); + + 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_pull = GPIO_PULL_NONE; + +#ifdef USB_SOF_OUTPUT_ENABLE + crm_periph_clock_enable(OTG_PIN_SOF_GPIO_CLOCK, TRUE); + gpio_init_struct.gpio_pins = OTG_PIN_SOF; + gpio_init(OTG_PIN_SOF_GPIO, &gpio_init_struct); +#endif + + /* otgfs use vbus pin */ +#ifndef USB_VBUS_IGNORE + gpio_init_struct.gpio_pins = OTG_PIN_VBUS; + gpio_init_struct.gpio_pull = GPIO_PULL_DOWN; + gpio_init_struct.gpio_mode = GPIO_MODE_INPUT; + gpio_init(OTG_PIN_GPIO, &gpio_init_struct); +#endif + + +} +#ifdef USB_LOW_POWER_WAKUP +/** + * @brief usb low power wakeup interrupt config + * @param none + * @retval none + */ +void usb_low_power_wakeup_config(void) +{ + exint_init_type exint_init_struct; + + exint_default_para_init(&exint_init_struct); + + exint_init_struct.line_enable = TRUE; + exint_init_struct.line_mode = EXINT_LINE_INTERRUPUT; + exint_init_struct.line_select = OTG_WKUP_EXINT_LINE; + exint_init_struct.line_polarity = EXINT_TRIGGER_RISING_EDGE; + exint_init(&exint_init_struct); + + nvic_irq_enable(OTG_WKUP_IRQ, 0, 0); +} + +/** + * @brief this function handles otgfs wakup interrupt. + * @param none + * @retval none + */ +void OTG_WKUP_HANDLER(void) +{ + exint_flag_clear(OTG_WKUP_EXINT_LINE); +} + +#endif + +/** + * @brief this function handles otgfs interrupt. + * @param none + * @retval none + */ +void OTG_IRQ_HANDLER(void) +{ + usbd_irq_handler(&otg_core_struct); +} + +/** + * @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_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h index c624469..c8a32a8 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/flash_fat16.h +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h index 60e7611..7a4cd32 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/msc_diskio.h +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/inc/usb_conf.h b/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/usb_conf.h index ae47a72..34b1c27 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/inc/usb_conf.h +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/readme.txt b/project/at_start_f415/examples/usb_device/virtual_msc_iap/readme.txt index f18eec2..a7256f6 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/readme.txt +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c index 1366d24..0a577d0 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_device/virtual_msc_iap/src/flash_fat16.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/flash_fat16.c index 30f0e17..5814d85 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/flash_fat16.c +++ b/project/at_start_f415/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_f415/examples/usb_device/virtual_msc_iap/src/main.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/main.c index 6d8ba46..9dc4bd1 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/main.c +++ b/project/at_start_f415/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 @@ -266,7 +266,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_f415/examples/usb_device/virtual_msc_iap/src/msc_diskio.c b/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/msc_diskio.c index f5224f6..7dd1b83 100644 --- a/project/at_start_f415/examples/usb_device/virtual_msc_iap/src/msc_diskio.c +++ b/project/at_start_f415/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_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/inc/usb_conf.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/usb_conf.h index de88ba5..025e6ab 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/usb_conf.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/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 @@ -138,8 +138,9 @@ extern "C" { * at32f415xx revision C: (support) * ignore vbus detection, the internal vbus is always valid. * the vbus pin (pa9) can be used for other functionality. + * note: host mode can use vbus ignore */ -/* #define USB_VBUS_IGNORE */ +#define USB_VBUS_IGNORE /** * @brief usb low power wakeup handler enable diff --git a/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h b/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h index 2a955cc..df1d0cc 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h +++ b/project/at_start_f415/examples/usb_host/hid_demo/inc/usbh_user.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host user header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/hid_demo/readme.txt b/project/at_start_f415/examples/usb_host/hid_demo/readme.txt index 489ba0e..0ae807a 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/readme.txt +++ b/project/at_start_f415/examples/usb_host/hid_demo/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_f415/examples/usb_host/hid_demo/src/at32f415_clock.c b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/src/at32f415_int.c b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_int.c index e3e5ef4..8f04bb4 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/hid_demo/src/main.c b/project/at_start_f415/examples/usb_host/hid_demo/src/main.c index 8f7e716..d139c88 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/main.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/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 @@ -105,12 +105,12 @@ int main(void) at32_board_init(); - uart_print_init(115200); - button_exint_init(); /* usb gpio config */ usb_gpio_config(); + + uart_print_init(115200); #ifdef USB_LOW_POWER_WAKUP usb_low_power_wakeup_config(); @@ -129,7 +129,7 @@ int main(void) usbh_init(&otg_core_struct, USB_FULL_SPEED_CORE_ID, USB_ID, - &uhost_class_handler, + &uhost_hid_class_handler, &usbh_user_handle); while(1) { diff --git a/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c b/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c index 9efec4c..0e5cef6 100644 --- a/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c +++ b/project/at_start_f415/examples/usb_host/hid_demo/src/usbh_user.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb user function ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h index c9ce7d0..458d348 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/inc/usb_conf.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usb_conf.h index de88ba5..025e6ab 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usb_conf.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/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 @@ -138,8 +138,9 @@ extern "C" { * at32f415xx revision C: (support) * ignore vbus detection, the internal vbus is always valid. * the vbus pin (pa9) can be used for other functionality. + * note: host mode can use vbus ignore */ -/* #define USB_VBUS_IGNORE */ +#define USB_VBUS_IGNORE /** * @brief usb low power wakeup handler enable diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h index 2a955cc..df1d0cc 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/inc/usbh_user.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb host user header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/readme.txt b/project/at_start_f415/examples/usb_host/msc_only_fat32/readme.txt index d48a099..d3db253 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/readme.txt +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/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_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c index e3e5ef4..8f04bb4 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/usb_host/msc_only_fat32/src/main.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/main.c index 70a519f..82b58d2 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/main.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/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 @@ -82,7 +82,7 @@ int main(void) usbh_init(&otg_core_struct, USB_FULL_SPEED_CORE_ID, USB_ID, - &uhost_class_handler, + &uhost_msc_class_handler, &usbh_user_handle); while(1) { diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c index 091839b..5724ab8 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_msc_diskio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_msc_diskio.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb mass storage disk io ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c index 87eaaea..cbbaf83 100644 --- a/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c +++ b/project/at_start_f415/examples/usb_host/msc_only_fat32/src/usbh_user.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usbh_user.c - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief usb user function ************************************************************************** * Copyright notice & Disclaimer @@ -64,6 +64,15 @@ usbh_user_handler_type usbh_user_handle = usbh_user_not_support, }; +typedef enum +{ + USR_IDLE, + USR_APP, + USR_FINISH +}msc_usr_state; + +msc_usr_state usr_state = USR_IDLE; + /** * @brief usb host init user handler * @param none @@ -108,6 +117,7 @@ static usb_sts_type usbh_user_attached(void) static usb_sts_type usbh_user_disconnect(void) { usb_sts_type status = USB_OK; + usr_state = USR_IDLE; USBH_DEBUG("Device Disconnect"); return status; } @@ -194,56 +204,66 @@ static usb_sts_type usbh_user_application(void) uint32_t len; uint8_t write_data[] = "usb host msc demo"; uint8_t read_data[32] = {0}; -// return 0; - res = f_mount(&fs, "", 0); - if(res == FR_OK) + + switch(usr_state) { - /* start write data */ - if(f_open(&file, "0:AT32.txt", FA_CREATE_ALWAYS | FA_WRITE) != FR_OK) - { - // error - USBH_DEBUG("Open AT32.txt failed"); - } - else - { - res = f_write(&file, write_data, sizeof(write_data), &len); - if(res != FR_OK || len == 0) + case USR_IDLE: + usr_state = USR_APP; + break; + case USR_APP: + res = f_mount(&fs, "", 0); + if(res == FR_OK) { - //write error - USBH_DEBUG("Write AT32.txt failed"); + /* start write data */ + if(f_open(&file, "0:AT32.txt", FA_CREATE_ALWAYS | FA_WRITE) != FR_OK) + { + // error + USBH_DEBUG("Open AT32.txt failed"); + } + else + { + res = f_write(&file, write_data, sizeof(write_data), &len); + if(res != FR_OK || len == 0) + { + //write error + USBH_DEBUG("Write AT32.txt failed"); + } + else + { + //write success + USBH_DEBUG("Write AT32.txt Success"); + } + f_close(&file); + } + + /* start read file */ + if(f_open(&file, "0:AT32.txt", FA_READ) != FR_OK) + { + // error + USBH_DEBUG("Open AT32.txt failed"); + } + else + { + res = f_read(&file, read_data, sizeof(read_data), &len); + if(res != FR_OK || len == 0) + { + //read error + USBH_DEBUG("Read AT32.txt failed"); + } + else + { + //read success + USBH_DEBUG("Read AT32.txt Success"); + } + f_close(&file); + } + f_mount(NULL, "", 0); } - else - { - //write success - USBH_DEBUG("Write AT32.txt Success"); - } - f_close(&file); - } - - /* start read file */ - if(f_open(&file, "0:AT32.txt", FA_READ) != FR_OK) - { - // error - USBH_DEBUG("Open AT32.txt failed"); - } - else - { - res = f_read(&file, read_data, sizeof(read_data), &len); - if(res != FR_OK || len == 0) - { - //read error - USBH_DEBUG("Read AT32.txt failed"); - } - else - { - //read success - USBH_DEBUG("Read AT32.txt Success"); - } - f_close(&file); - } - f_mount(NULL, "", 0); + usr_state = USR_FINISH; + break; + case USR_FINISH: + break; } - return status; } diff --git a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h +++ b/project/at_start_f415/examples/wdt/wdt_reset/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/readme.txt b/project/at_start_f415/examples/wdt/wdt_reset/readme.txt index de2af48..31f8291 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/readme.txt +++ b/project/at_start_f415/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_f415/examples/wdt/wdt_reset/src/at32f415_clock.c b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_clock.c +++ b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/src/at32f415_int.c b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_int.c index 1e14721..4b660cf 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_int.c +++ b/project/at_start_f415/examples/wdt/wdt_reset/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wdt/wdt_reset/src/main.c b/project/at_start_f415/examples/wdt/wdt_reset/src/main.c index 2072c95..da623ec 100644 --- a/project/at_start_f415/examples/wdt/wdt_reset/src/main.c +++ b/project/at_start_f415/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_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h index 8440a21..0d4108d 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/readme.txt b/project/at_start_f415/examples/wwdt/wwdt_reset/readme.txt index 3e4134e..0c9e4c7 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/readme.txt +++ b/project/at_start_f415/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_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c index 4cb4ca7..56498ab 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c index 0e27971..84757c5 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c +++ b/project/at_start_f415/examples/wwdt/wwdt_reset/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/examples/wwdt/wwdt_reset/src/main.c b/project/at_start_f415/examples/wwdt/wwdt_reset/src/main.c index 0d2024e..17e39f7 100644 --- a/project/at_start_f415/examples/wwdt/wwdt_reset/src/main.c +++ b/project/at_start_f415/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_f415/templates/inc/at32f415_clock.h b/project/at_start_f415/templates/inc/at32f415_clock.h index ad17ecc..879e28f 100644 --- a/project/at_start_f415/templates/inc/at32f415_clock.h +++ b/project/at_start_f415/templates/inc/at32f415_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/templates/inc/at32f415_conf.h b/project/at_start_f415/templates/inc/at32f415_conf.h index cd43464..dc5199a 100644 --- a/project/at_start_f415/templates/inc/at32f415_conf.h +++ b/project/at_start_f415/templates/inc/at32f415_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_conf.h - * @version v2.0.2 - * @date 2021-12-31 + * @version v2.0.3 + * @date 2022-02-11 * @brief at32f415 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f415/templates/inc/at32f415_int.h b/project/at_start_f415/templates/inc/at32f415_int.h index bf6bf6f..1369a00 100644 --- a/project/at_start_f415/templates/inc/at32f415_int.h +++ b/project/at_start_f415/templates/inc/at32f415_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/templates/mdk_v4/template.uvproj b/project/at_start_f415/templates/mdk_v4/template.uvproj index 6e4a82e..3a27c18 100644 --- a/project/at_start_f415/templates/mdk_v4/template.uvproj +++ b/project/at_start_f415/templates/mdk_v4/template.uvproj @@ -362,7 +362,7 @@ AT32F415RCT7,USE_STDPERIPH_DRIVER,AT_START_F415_V1 - ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\..\templates\inc;..\..\..\at32f415_board + ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\at32f415_board diff --git a/project/at_start_f415/templates/mdk_v5/template.uvprojx b/project/at_start_f415/templates/mdk_v5/template.uvprojx index 3aa5e6f..0f551fa 100644 --- a/project/at_start_f415/templates/mdk_v5/template.uvprojx +++ b/project/at_start_f415/templates/mdk_v5/template.uvprojx @@ -338,7 +338,7 @@ AT32F415RCT7,USE_STDPERIPH_DRIVER,AT_START_F415_V1 - ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\..\templates\inc;..\..\..\at32f415_board + ..\..\..\..\libraries\drivers\inc;..\..\..\..\libraries\cmsis\cm4\core_support;..\..\..\..\libraries\cmsis\cm4\device_support;..\inc;..\..\..\at32f415_board diff --git a/project/at_start_f415/templates/readme.txt b/project/at_start_f415/templates/readme.txt index 37dc988..f707bd9 100644 --- a/project/at_start_f415/templates/readme.txt +++ b/project/at_start_f415/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_f415/templates/src/at32f415_clock.c b/project/at_start_f415/templates/src/at32f415_clock.c index dd5907a..31f43db 100644 --- a/project/at_start_f415/templates/src/at32f415_clock.c +++ b/project/at_start_f415/templates/src/at32f415_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/templates/src/at32f415_int.c b/project/at_start_f415/templates/src/at32f415_int.c index b6bb62b..954faa2 100644 --- a/project/at_start_f415/templates/src/at32f415_int.c +++ b/project/at_start_f415/templates/src/at32f415_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f415_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_f415/templates/src/main.c b/project/at_start_f415/templates/src/main.c index fa5ba77..47a1074 100644 --- a/project/at_start_f415/templates/src/main.c +++ b/project/at_start_f415/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_f415_Example_list.htm b/project/at_start_f415_Example_list.htm index 934c77a..ccbfc06 100644 --- a/project/at_start_f415_Example_list.htm +++ b/project/at_start_f415_Example_list.htm @@ -1979,7 +1979,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

104

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

105

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