diff --git a/AT32F435_437_periph_lib_V2.0.8.chm b/AT32F435_437_periph_lib_V2.0.9.chm similarity index 75% rename from AT32F435_437_periph_lib_V2.0.8.chm rename to AT32F435_437_periph_lib_V2.0.9.chm index c39264dd..6d84e1ff 100644 Binary files a/AT32F435_437_periph_lib_V2.0.8.chm and b/AT32F435_437_periph_lib_V2.0.9.chm differ diff --git a/document/AT32F435_437固件库BSP&Pack应用指南.pdf b/document/AT32F435_437固件库BSP&Pack应用指南.pdf index a7703446..1d5168ac 100644 Binary files a/document/AT32F435_437固件库BSP&Pack应用指南.pdf and b/document/AT32F435_437固件库BSP&Pack应用指南.pdf differ diff --git a/document/ReleaseNotes_AT32F435_437_Firmware_Library.pdf b/document/ReleaseNotes_AT32F435_437_Firmware_Library.pdf index 32f2f69d..6e708007 100644 Binary files a/document/ReleaseNotes_AT32F435_437_Firmware_Library.pdf and b/document/ReleaseNotes_AT32F435_437_Firmware_Library.pdf differ diff --git a/libraries/cmsis/cm4/device_support/at32f435_437.h b/libraries/cmsis/cm4/device_support/at32f435_437.h index c1791fc5..782d8301 100644 --- a/libraries/cmsis/cm4/device_support/at32f435_437.h +++ b/libraries/cmsis/cm4/device_support/at32f435_437.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 header file ************************************************************************** * Copyright notice & Disclaimer @@ -100,7 +100,7 @@ extern "C" { */ #define __AT32F435_437_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */ #define __AT32F435_437_LIBRARY_VERSION_MIDDLE (0x00) /*!< [23:16] middle version */ -#define __AT32F435_437_LIBRARY_VERSION_MINOR (0x08) /*!< [15:8] minor version */ +#define __AT32F435_437_LIBRARY_VERSION_MINOR (0x09) /*!< [15:8] minor version */ #define __AT32F435_437_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */ #define __AT32F435_437_LIBRARY_VERSION ((__AT32F435_437_LIBRARY_VERSION_MAJOR << 24) | \ (__AT32F435_437_LIBRARY_VERSION_MIDDLE << 16) | \ diff --git a/libraries/cmsis/cm4/device_support/at32f435_437_conf_template.h b/libraries/cmsis/cm4/device_support/at32f435_437_conf_template.h index f117d2f9..b9f6bf61 100644 --- a/libraries/cmsis/cm4/device_support/at32f435_437_conf_template.h +++ b/libraries/cmsis/cm4/device_support/at32f435_437_conf_template.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f435_437.s b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f435_437.s index 7b16d524..a55c89df 100644 --- a/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f435_437.s +++ b/libraries/cmsis/cm4/device_support/startup/gcc/startup_at32f435_437.s @@ -1,8 +1,8 @@ /** ****************************************************************************** * @file startup_at32f435_437.s - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 devices vector table for gcc toolchain. * this module performs: * - set the initial sp diff --git a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f435_437.s b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f435_437.s index 64af9a4d..2235ce72 100644 --- a/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f435_437.s +++ b/libraries/cmsis/cm4/device_support/startup/iar/startup_at32f435_437.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f435_437.s -;* @version v2.0.8 -;* @date 2022-04-25 +;* @version v2.0.9 +;* @date 2022-06-28 ;* @brief at32f435_437 startup file for IAR Systems ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f435_437.s b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f435_437.s index e477842a..49bb2973 100644 --- a/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f435_437.s +++ b/libraries/cmsis/cm4/device_support/startup/mdk/startup_at32f435_437.s @@ -1,7 +1,7 @@ ;************************************************************************** ;* @file startup_at32f435_437.s -;* @version v2.0.8 -;* @date 2022-04-25 +;* @version v2.0.9 +;* @date 2022-06-28 ;* @brief at32f435_437 startup file for keil ;************************************************************************** ; diff --git a/libraries/cmsis/cm4/device_support/system_at32f435_437.c b/libraries/cmsis/cm4/device_support/system_at32f435_437.c index ef12a7c3..749f81a9 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f435_437.c +++ b/libraries/cmsis/cm4/device_support/system_at32f435_437.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f435_437.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for cmsis cortex-m4 system source file ************************************************************************** * Copyright notice & Disclaimer @@ -81,12 +81,12 @@ void SystemInit (void) /* wait sclk switch status */ while(CRM->cfg_bit.sclksts != CRM_SCLK_HICK); - /* reset cfg register, include sclk switch, ahbdiv, apb1div, apb2div, adcdiv, clkout bits */ - CRM->cfg = 0; - /* reset hexten, hextbyps, cfden and pllen bits */ CRM->ctrl &= ~(0x010D0000U); + /* reset cfg register, include sclk switch, ahbdiv, apb1div, apb2div, adcdiv, clkout bits */ + CRM->cfg = 0; + /* reset pllms pllns pllfr pllrcs bits */ CRM->pllcfg = 0x00033002U; diff --git a/libraries/cmsis/cm4/device_support/system_at32f435_437.h b/libraries/cmsis/cm4/device_support/system_at32f435_437.h index 3d3ebaf1..90cdc524 100644 --- a/libraries/cmsis/cm4/device_support/system_at32f435_437.h +++ b/libraries/cmsis/cm4/device_support/system_at32f435_437.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file system_at32f435_437.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief cmsis cortex-m4 system header file. ************************************************************************** * Copyright notice & Disclaimer @@ -39,6 +39,8 @@ extern "C" { * @{ */ +#define SystemCoreClock system_core_clock + /** @defgroup AT32F435_437_system_exported_variables * @{ */ diff --git a/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h b/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h index e4f26a11..434024c5 100644 --- a/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h +++ b/libraries/cmsis/dsp/PrivateInclude/arm_sorting.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_sorting.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief Private header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h b/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h index a7929ce2..bd1ebade 100644 --- a/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h +++ b/libraries/cmsis/dsp/PrivateInclude/arm_vec_fft.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_vec_fft.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief Private header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h b/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h index fc014860..1e536f0c 100644 --- a/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h +++ b/libraries/cmsis/dsp/PrivateInclude/arm_vec_filtering.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_vec_filtering.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief Private header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/include/arm_math.h b/libraries/cmsis/dsp/include/arm_math.h index 466e3e15..5f59e926 100644 --- a/libraries/cmsis/dsp/include/arm_math.h +++ b/libraries/cmsis/dsp/include/arm_math.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_math.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief Public header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/cmsis/dsp/include/arm_vec_math.h b/libraries/cmsis/dsp/include/arm_vec_math.h index 3404d1b6..e2876310 100644 --- a/libraries/cmsis/dsp/include/arm_vec_math.h +++ b/libraries/cmsis/dsp/include/arm_vec_math.h @@ -1,7 +1,7 @@ /****************************************************************************** * @file arm_vec_math.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief Public header file for CMSIS DSP Library ******************************************************************************/ /* diff --git a/libraries/drivers/inc/at32f435_437_acc.h b/libraries/drivers/inc/at32f435_437_acc.h index dabc1ee1..450d7b3b 100644 --- a/libraries/drivers/inc/at32f435_437_acc.h +++ b/libraries/drivers/inc/at32f435_437_acc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_acc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 acc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_adc.h b/libraries/drivers/inc/at32f435_437_adc.h index 4bf8eb4f..be55c9a5 100644 --- a/libraries/drivers/inc/at32f435_437_adc.h +++ b/libraries/drivers/inc/at32f435_437_adc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_adc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 adc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_can.h b/libraries/drivers/inc/at32f435_437_can.h index e8fe5a6b..56dc4bf6 100644 --- a/libraries/drivers/inc/at32f435_437_can.h +++ b/libraries/drivers/inc/at32f435_437_can.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_can.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 can header file ************************************************************************** * Copyright notice & Disclaimer @@ -352,7 +352,7 @@ typedef struct */ typedef struct { - uint16_t baudrate_div; /*!< baudrate division,this parameter can be 0x001~0x400.*/ + uint16_t baudrate_div; /*!< baudrate division,this parameter can be 0x001~0x1000.*/ can_rsaw_type rsaw_size; /*!< resynchronization adjust width */ diff --git a/libraries/drivers/inc/at32f435_437_crc.h b/libraries/drivers/inc/at32f435_437_crc.h index e7537a30..a6f8d9cb 100644 --- a/libraries/drivers/inc/at32f435_437_crc.h +++ b/libraries/drivers/inc/at32f435_437_crc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_crc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 crc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_crm.h b/libraries/drivers/inc/at32f435_437_crm.h index eade8c8b..4dce78d5 100644 --- a/libraries/drivers/inc/at32f435_437_crm.h +++ b/libraries/drivers/inc/at32f435_437_crm.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_crm.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 crm header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_dac.h b/libraries/drivers/inc/at32f435_437_dac.h index deee7ccc..b26769cc 100644 --- a/libraries/drivers/inc/at32f435_437_dac.h +++ b/libraries/drivers/inc/at32f435_437_dac.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_dac.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 dac header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_debug.h b/libraries/drivers/inc/at32f435_437_debug.h index 9f685b56..00d189a7 100644 --- a/libraries/drivers/inc/at32f435_437_debug.h +++ b/libraries/drivers/inc/at32f435_437_debug.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_mcudbg.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 mcudbg header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_def.h b/libraries/drivers/inc/at32f435_437_def.h index c3a3f3ca..0f79450e 100644 --- a/libraries/drivers/inc/at32f435_437_def.h +++ b/libraries/drivers/inc/at32f435_437_def.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_def.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 macros header file ************************************************************************** * Copyright notice & Disclaimer @@ -62,6 +62,8 @@ extern "C" { #endif #endif +#define UNUSED(x) (void)x /* to avoid gcc/g++ warnings */ + #ifdef __cplusplus } #endif diff --git a/libraries/drivers/inc/at32f435_437_dma.h b/libraries/drivers/inc/at32f435_437_dma.h index 49769726..f690f741 100644 --- a/libraries/drivers/inc/at32f435_437_dma.h +++ b/libraries/drivers/inc/at32f435_437_dma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_dma.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 dma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_dvp.h b/libraries/drivers/inc/at32f435_437_dvp.h index 36f72262..a93f6f1e 100644 --- a/libraries/drivers/inc/at32f435_437_dvp.h +++ b/libraries/drivers/inc/at32f435_437_dvp.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_dvp.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 dvp header file ************************************************************************** * Copyright notice & Disclaimer @@ -204,17 +204,17 @@ typedef enum { DVP_STATUS_HSYN = 0x00, DVP_STATUS_VSYN = 0x01, - DVP_STATUS_OFS = 0x02 + DVP_STATUS_OFNE = 0x02 } dvp_status_basic_type; /** - * @brief dvp pcdse type + * @brief dvp pcdes type */ typedef enum { - DVP_PCDSE_CAP_FIRST = 0x00, - DVP_PCDSE_DROP_FIRST = 0x01 -} dvp_pcdse_type; + DVP_PCDES_CAP_FIRST = 0x00, + DVP_PCDES_DROP_FIRST = 0x01 +} dvp_pcdes_type; /** * @brief dvp efdf type @@ -224,18 +224,18 @@ typedef enum DVP_EFDF_BYPASS = 0x00, DVP_EFDF_YUV422_UYVY = 0x04, DVP_EFDF_YUV422_YUYV = 0x05, - DVP_EFDF_YUV444 = 0x06, + DVP_EFDF_RGB565_555 = 0x06, DVP_EFDF_Y8 = 0x07 } dvp_efdf_type; /** - * @brief dvp iduc type + * @brief dvp idus type */ typedef enum { - DVP_IDUC_MSB = 0x00, - DVP_IDUC_LSB = 0x01 -} dvp_iduc_type; + DVP_IDUS_MSB = 0x00, + DVP_IDUS_LSB = 0x01 +} dvp_idus_type; /** * @brief dvp dmabt type @@ -247,22 +247,22 @@ typedef enum } dvp_dmabt_type; /** - * @brief dvp hseis type + * @brief dvp hseid type */ typedef enum { - DVP_HSEIS_LINE_END = 0x00, - DVP_HSEIS_LINE_START = 0x01 -} dvp_hseis_type; + DVP_HSEID_LINE_END = 0x00, + DVP_HSEID_LINE_START = 0x01 +} dvp_hseid_type; /** - * @brief dvp vseis type + * @brief dvp vseid type */ typedef enum { - DVP_VSEIS_FRAME_END = 0x00, - DVP_VSEIS_FRMAE_START = 0x01 -} dvp_vseis_type; + DVP_VSEID_FRAME_END = 0x00, + DVP_VSEID_FRMAE_START = 0x01 +} dvp_vseid_type; /** * @brief dvp idun type */ @@ -315,7 +315,7 @@ typedef struct { __IO uint32_t hsyn : 1; /* [0] */ __IO uint32_t vsyn : 1; /* [1] */ - __IO uint32_t ofs : 1; /* [2] */ + __IO uint32_t ofne : 1; /* [2] */ __IO uint32_t reserved1 : 29;/* [31:3] */ } sts_bit; }; @@ -479,18 +479,18 @@ typedef struct __IO uint32_t eisre : 1; /* [0] */ __IO uint32_t efrce : 1; /* [1] */ __IO uint32_t mibe : 1; /* [2] */ - __IO uint32_t pcdse : 1; /* [3] */ + __IO uint32_t pcdes : 1; /* [3] */ __IO uint32_t efdf : 3; /* [6:4] */ __IO uint32_t reserved1 : 1; /* [7] */ __IO uint32_t idun : 2; /* [9:8] */ - __IO uint32_t iduc : 1; /* [10] */ + __IO uint32_t idus : 1; /* [10] */ __IO uint32_t reserved2 : 1; /* [11] */ __IO uint32_t dmabt : 1; /* [12] */ __IO uint32_t reserved3 : 1; /* [13] */ __IO uint32_t reserved4 : 1; /* [14] */ __IO uint32_t reserved5 : 1; /* [15] */ - __IO uint32_t hseis : 1; /* [16] */ - __IO uint32_t vseis : 1; /* [17] */ + __IO uint32_t hseid : 1; /* [16] */ + __IO uint32_t vseid : 1; /* [17] */ __IO uint32_t reserved6 : 1; /* [18] */ __IO uint32_t reserved7 : 2; /* [20:19] */ __IO uint32_t reserved8 : 11;/* [31:21] */ @@ -540,9 +540,9 @@ typedef struct __IO uint32_t frf; struct { - __IO uint32_t efrcfm : 5; /* [4:0] */ + __IO uint32_t efrcsf : 5; /* [4:0] */ __IO uint32_t reserved1 : 3; /* [7:5] */ - __IO uint32_t efrcfn : 5; /* [12:8] */ + __IO uint32_t efrctf : 5; /* [12:8] */ __IO uint32_t reserved2 : 19;/* [31:13] */ } frf_bit; }; @@ -572,10 +572,12 @@ typedef struct * @{ */ +void dvp_reset(void); +void dvp_capture_enable(confirm_state new_state); void dvp_capture_enable(confirm_state new_state); void dvp_capture_mode_set(dvp_cfm_type cap_mode); void dvp_window_crop_enable(confirm_state new_state); -void dvp_window_crop_set(uint16_t crop_x, uint16_t crop_y, uint16_t crop_w, uint16_t crop_h); +void dvp_window_crop_set(uint16_t crop_x, uint16_t crop_y, uint16_t crop_w, uint16_t crop_h, uint8_t bytes); void dvp_jpeg_enable(confirm_state new_state); void dvp_sync_mode_set(dvp_sm_type sync_mode); void dvp_sync_code_set(uint8_t fmsc, uint8_t fmec, uint8_t lnsc, uint8_t lnec); @@ -586,7 +588,7 @@ void dvp_vsync_polarity_set(dvp_vsp_type vsync_pol); void dvp_basic_frame_rate_control_set(dvp_bfrc_type dvp_bfrc); void dvp_pixel_data_length_set(dvp_pdl_type dvp_pdl); void dvp_enable(confirm_state new_state); -void dvp_zoomout_select(dvp_pcdse_type dvp_pcdse); +void dvp_zoomout_select(dvp_pcdes_type dvp_pcdes); void dvp_zoomout_set(dvp_pcdc_type dvp_pcdc, dvp_pcds_type dvp_pcds, dvp_lcdc_type dvp_lcdc, dvp_lcds_type dvp_lcds); flag_status dvp_basic_status_get(dvp_status_basic_type dvp_status_basic); void dvp_interrupt_enable(uint32_t dvp_int, confirm_state new_state); @@ -594,12 +596,12 @@ flag_status dvp_flag_get(uint32_t flag); void dvp_flag_clear(uint32_t flag); void dvp_enhanced_scaling_resize_enable(confirm_state new_state); void dvp_enhanced_scaling_resize_set(uint16_t src_w, uint16_t des_w, uint16_t src_h, uint16_t des_h); -void dvp_enhanced_framerate_set(uint16_t efrcfm, uint16_t efrcfn, confirm_state new_state); +void dvp_enhanced_framerate_set(uint16_t efrcsf, uint16_t efrctf, confirm_state new_state); void dvp_monochrome_image_binarization_set(uint8_t mibthd, confirm_state new_state); void dvp_enhanced_data_format_set(dvp_efdf_type dvp_efdf); -void dvp_input_data_unused_set(dvp_iduc_type dvp_iduc, dvp_idun_type dvp_idun); +void dvp_input_data_unused_set(dvp_idus_type dvp_idus, dvp_idun_type dvp_idun); void dvp_dma_burst_set(dvp_dmabt_type dvp_dmabt); -void dvp_sync_event_interrupt_set(dvp_hseis_type dvp_hseis, dvp_vseis_type dvp_vseis); +void dvp_sync_event_interrupt_set(dvp_hseid_type dvp_hseid, dvp_vseid_type dvp_vseid); /** * @} diff --git a/libraries/drivers/inc/at32f435_437_edma.h b/libraries/drivers/inc/at32f435_437_edma.h index 42933c8e..a373ff44 100644 --- a/libraries/drivers/inc/at32f435_437_edma.h +++ b/libraries/drivers/inc/at32f435_437_edma.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_edma.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 edma header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_emac.h b/libraries/drivers/inc/at32f435_437_emac.h index aad7f5af..a5d6120e 100644 --- a/libraries/drivers/inc/at32f435_437_emac.h +++ b/libraries/drivers/inc/at32f435_437_emac.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_emac.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 eth header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_ertc.h b/libraries/drivers/inc/at32f435_437_ertc.h index 19d854d8..35d9a5c2 100644 --- a/libraries/drivers/inc/at32f435_437_ertc.h +++ b/libraries/drivers/inc/at32f435_437_ertc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_ertc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 ertc header file ************************************************************************** * Copyright notice & Disclaimer @@ -90,6 +90,16 @@ extern "C" { #define ERTC_ALARM_MASK_DATE_WEEK ((uint32_t)0x80000000) /*!< ertc alarm don't match date or week */ #define ERTC_ALARM_MASK_ALL ((uint32_t)0x80808080) /*!< ertc alarm don't match all */ +/** + * @} + */ + +/** + * @brief compatible with older versions + */ +#define ERTC_WAT_CLK_CK_A_16BITS ERTC_WAT_CLK_CK_B_16BITS +#define ERTC_WAT_CLK_CK_A_17BITS ERTC_WAT_CLK_CK_B_17BITS + /** * @} */ @@ -167,8 +177,8 @@ typedef enum ERTC_WAT_CLK_ERTCCLK_DIV8 = 0x01, /*!< the wake up timer clock is ERTC_CLK / 8 */ ERTC_WAT_CLK_ERTCCLK_DIV4 = 0x02, /*!< the wake up timer clock is ERTC_CLK / 4 */ ERTC_WAT_CLK_ERTCCLK_DIV2 = 0x03, /*!< the wake up timer clock is ERTC_CLK / 2 */ - ERTC_WAT_CLK_CK_A_16BITS = 0x04, /*!< the wake up timer clock is CK_A, wakeup counter = ERTC_WAT */ - ERTC_WAT_CLK_CK_A_17BITS = 0x06 /*!< the wake up timer clock is CK_A, wakeup counter = ERTC_WAT + 65535 */ + ERTC_WAT_CLK_CK_B_16BITS = 0x04, /*!< the wake up timer clock is CK_B, wakeup counter = ERTC_WAT */ + ERTC_WAT_CLK_CK_B_17BITS = 0x06 /*!< the wake up timer clock is CK_B, wakeup counter = ERTC_WAT + 65535 */ } ertc_wakeup_clock_type; /** diff --git a/libraries/drivers/inc/at32f435_437_exint.h b/libraries/drivers/inc/at32f435_437_exint.h index 7b2a53fa..b2356215 100644 --- a/libraries/drivers/inc/at32f435_437_exint.h +++ b/libraries/drivers/inc/at32f435_437_exint.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_exint.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 exint header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_flash.h b/libraries/drivers/inc/at32f435_437_flash.h index 5076f1a9..862ba8c4 100644 --- a/libraries/drivers/inc/at32f435_437_flash.h +++ b/libraries/drivers/inc/at32f435_437_flash.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_flash.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 flash header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_gpio.h b/libraries/drivers/inc/at32f435_437_gpio.h index 56b4e3ef..17f0903e 100644 --- a/libraries/drivers/inc/at32f435_437_gpio.h +++ b/libraries/drivers/inc/at32f435_437_gpio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_gpio.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 gpio header file ************************************************************************** * Copyright notice & Disclaimer @@ -541,7 +541,7 @@ uint16_t gpio_output_data_read(gpio_type *gpio_x); void gpio_bits_set(gpio_type *gpio_x, uint16_t pins); void gpio_bits_reset(gpio_type *gpio_x, uint16_t pins); void gpio_bits_write(gpio_type *gpio_x, uint16_t pins, confirm_state bit_state); -void gpio_port_wirte(gpio_type *gpio_x, uint16_t port_value); +void gpio_port_write(gpio_type *gpio_x, uint16_t port_value); void gpio_pin_wp_config(gpio_type *gpio_x, uint16_t pins); void gpio_pins_huge_driven_config(gpio_type *gpio_x, uint16_t pins, confirm_state new_state); void gpio_pin_mux_config(gpio_type *gpio_x, gpio_pins_source_type gpio_pin_source, gpio_mux_sel_type gpio_mux); diff --git a/libraries/drivers/inc/at32f435_437_i2c.h b/libraries/drivers/inc/at32f435_437_i2c.h index d8b35d68..10bdae1d 100644 --- a/libraries/drivers/inc/at32f435_437_i2c.h +++ b/libraries/drivers/inc/at32f435_437_i2c.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_i2c.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 i2c header file ************************************************************************** * Copyright notice & Disclaimer @@ -176,14 +176,14 @@ typedef enum } i2c_reload_stop_mode_type; /** - * @brief i2c start stop mode + * @brief i2c start mode */ typedef enum { I2C_WITHOUT_START = 0x00000000, /*!< transfer data without start condition */ I2C_GEN_START_READ = 0x00002400, /*!< read data and generate start */ I2C_GEN_START_WRITE = 0x00002000 /*!< send data and generate start */ -} i2c_start_stop_mode_type; +} i2c_start_mode_type; /** * @brief type define i2c register all @@ -452,7 +452,7 @@ void i2c_ext_timeout_enable(i2c_type *i2c_x, confirm_state new_state); void i2c_interrupt_enable(i2c_type *i2c_x, uint32_t source, confirm_state new_state); flag_status i2c_interrupt_get(i2c_type *i2c_x, uint16_t source); void i2c_dma_enable(i2c_type *i2c_x, i2c_dma_request_type dma_req, confirm_state new_state); -void i2c_transmit_set(i2c_type *i2c_x, uint16_t address, uint8_t cnt, i2c_reload_stop_mode_type rld_stop, i2c_start_stop_mode_type start_stop); +void i2c_transmit_set(i2c_type *i2c_x, uint16_t address, uint8_t cnt, i2c_reload_stop_mode_type rld_stop, i2c_start_mode_type start); void i2c_start_generate(i2c_type *i2c_x); void i2c_stop_generate(i2c_type *i2c_x); void i2c_data_send(i2c_type *i2c_x, uint8_t data); diff --git a/libraries/drivers/inc/at32f435_437_misc.h b/libraries/drivers/inc/at32f435_437_misc.h index 478acea4..f10ab892 100644 --- a/libraries/drivers/inc/at32f435_437_misc.h +++ b/libraries/drivers/inc/at32f435_437_misc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_misc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 misc header file ************************************************************************** * Copyright notice & Disclaimer @@ -76,9 +76,9 @@ typedef enum */ typedef enum { - NVIC_LP_SLEEPONEXIT = 0x02, /*!< send event on pending */ + NVIC_LP_SLEEPONEXIT = 0x02, /*!< enable sleep-on-exit feature */ NVIC_LP_SLEEPDEEP = 0x04, /*!< enable sleep-deep output signal when entering sleep mode */ - NVIC_LP_SEVONPEND = 0x10 /*!< enable sleep-on-exit feature */ + NVIC_LP_SEVONPEND = 0x10 /*!< send event on pending */ } nvic_lowpower_mode_type; /** diff --git a/libraries/drivers/inc/at32f435_437_pwc.h b/libraries/drivers/inc/at32f435_437_pwc.h index c09f8f5d..5fa67ed6 100644 --- a/libraries/drivers/inc/at32f435_437_pwc.h +++ b/libraries/drivers/inc/at32f435_437_pwc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_pwc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 pwr header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_qspi.h b/libraries/drivers/inc/at32f435_437_qspi.h index cee6edc5..3acb5110 100644 --- a/libraries/drivers/inc/at32f435_437_qspi.h +++ b/libraries/drivers/inc/at32f435_437_qspi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_qspi.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 qspi header file ************************************************************************** * Copyright notice & Disclaimer @@ -517,12 +517,12 @@ typedef struct */ void qspi_encryption_enable(qspi_type* qspi_x, confirm_state new_state); -void qspi_sck_mode_set( qspi_type* qspi_x, qspi_clk_mode_type new_mode); +void qspi_sck_mode_set(qspi_type* qspi_x, qspi_clk_mode_type new_mode); void qspi_clk_division_set(qspi_type* qspi_x, qspi_clk_div_type new_clkdiv); void qspi_xip_cache_bypass_set(qspi_type* qspi_x, confirm_state new_state); void qspi_interrupt_enable(qspi_type* qspi_x, confirm_state new_state); flag_status qspi_flag_get(qspi_type* qspi_x, uint32_t flag); -void qspi_flag_clear( qspi_type* qspi_x, uint32_t flag); +void qspi_flag_clear(qspi_type* qspi_x, uint32_t flag); void qspi_dma_rx_threshold_set(qspi_type* qspi_x, qspi_dma_fifo_thod_type new_threshold); void qspi_dma_tx_threshold_set(qspi_type* qspi_x, qspi_dma_fifo_thod_type new_threshold); void qspi_dma_enable(qspi_type* qspi_x, confirm_state new_state); diff --git a/libraries/drivers/inc/at32f435_437_scfg.h b/libraries/drivers/inc/at32f435_437_scfg.h index b322e681..507a0b59 100644 --- a/libraries/drivers/inc/at32f435_437_scfg.h +++ b/libraries/drivers/inc/at32f435_437_scfg.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_scfg.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 system config header file ************************************************************************** * Copyright notice & Disclaimer @@ -57,9 +57,9 @@ extern "C" { typedef enum { SCFG_XMC_SWAP_NONE = 0x00, /* no swap */ - SCFG_XMC_SWAP_MODE1 = 0x01, /* sdram nor psram sram nand2 swap */ - SCFG_XMC_SWAP_MODE2 = 0x02, /* nand3 qspi2 swap */ - SCFG_XMC_SWAP_MODE3 = 0x03 /* sdram nor psram sram nand2 nand3 qspi2 swap */ + SCFG_XMC_SWAP_MODE1 = 0x01, /* sdram 0x60000000 and 0x70000000, nor psram sram nand2 0xC00000000 and 0xD0000000 */ + SCFG_XMC_SWAP_MODE2 = 0x02, /* qspi2 0x80000000, nand3 0xB0000000 */ + SCFG_XMC_SWAP_MODE3 = 0x03 /* sdram 0x60000000 and 0x70000000, nor psram sram nand2 0xC00000000 and 0xD0000000, qspi2 0x80000000, nand3 0xB0000000 */ } scfg_xmc_swap_type; /** diff --git a/libraries/drivers/inc/at32f435_437_sdio.h b/libraries/drivers/inc/at32f435_437_sdio.h index 7aa974f5..2577e5f5 100644 --- a/libraries/drivers/inc/at32f435_437_sdio.h +++ b/libraries/drivers/inc/at32f435_437_sdio.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_sdio.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 sdio header file ************************************************************************** * Copyright notice & Disclaimer @@ -578,7 +578,7 @@ typedef struct void sdio_reset(sdio_type *sdio_x); void sdio_power_set(sdio_type *sdio_x, sdio_power_state_type power_state); -flag_status sdio_power_status_get(sdio_type *sdio_x); +sdio_power_state_type sdio_power_status_get(sdio_type *sdio_x); void sdio_clock_config(sdio_type *sdio_x, uint16_t clk_div, sdio_edge_phase_type clk_edg); void sdio_bus_width_config(sdio_type *sdio_x, sdio_bus_width_type width); void sdio_clock_bypass(sdio_type *sdio_x, confirm_state new_state); diff --git a/libraries/drivers/inc/at32f435_437_spi.h b/libraries/drivers/inc/at32f435_437_spi.h index 3b6061d9..136288b5 100644 --- a/libraries/drivers/inc/at32f435_437_spi.h +++ b/libraries/drivers/inc/at32f435_437_spi.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_spi.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 spi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_tmr.h b/libraries/drivers/inc/at32f435_437_tmr.h index e51ef35f..2da8c850 100644 --- a/libraries/drivers/inc/at32f435_437_tmr.h +++ b/libraries/drivers/inc/at32f435_437_tmr.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_tmr.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 tmr header file ************************************************************************** * Copyright notice & Disclaimer @@ -54,6 +54,7 @@ extern "C" { #define TMR_C2_FLAG ((uint32_t)0x000004) /*!< tmr flag channel 2 */ #define TMR_C3_FLAG ((uint32_t)0x000008) /*!< tmr flag channel 3 */ #define TMR_C4_FLAG ((uint32_t)0x000010) /*!< tmr flag channel 4 */ +#define TMR_C5_FLAG ((uint32_t)0x010000) /*!< tmr flag channel 5 */ #define TMR_HALL_FLAG ((uint32_t)0x000020) /*!< tmr flag hall */ #define TMR_TRIGGER_FLAG ((uint32_t)0x000040) /*!< tmr flag trigger */ #define TMR_BRK_FLAG ((uint32_t)0x000080) /*!< tmr flag brake */ @@ -291,17 +292,6 @@ typedef enum TMR_BRK_SWTRIG = 0x00000080 /*!< tmr event triggered by software of brake */ }tmr_event_trigger_type; -/** - * @brief tmr channel output fast type - */ -typedef enum -{ - TMR_CHANNEL1_OUTPUT_FAST = MAKE_VALUE(0x18, 2), /*!< tmr channel 1 output fast mode */ - TMR_CHANNEL2_OUTPUT_FAST = MAKE_VALUE(0x18, 10), /*!< tmr channel 2 output fast mode */ - TMR_CHANNEL3_OUTPUT_FAST = MAKE_VALUE(0x1c, 2), /*!< tmr channel 3 output fast mode */ - TMR_CHANNEL4_OUTPUT_FAST = MAKE_VALUE(0x1c, 10) /*!< tmr channel 4 output fast mode */ -}tmr_channel_output_fast_type; - /** * @brief tmr polarity active type */ @@ -962,7 +952,7 @@ void tmr_input_channel_filter_set(tmr_type *tmr_x, tmr_channel_select_type tmr_c uint16_t filter_value); void tmr_pwm_input_config(tmr_type *tmr_x, tmr_input_config_type *input_struct, \ tmr_channel_input_divider_type divider_factor); -void tmr_channel1_input_select(tmr_type *tmr_x, tmr_channel1_input_connected_type ti1_connect); +void tmr_channel1_input_select(tmr_type *tmr_x, tmr_channel1_input_connected_type ch1_connect); void tmr_input_channel_divider_set(tmr_type *tmr_x, tmr_channel_select_type tmr_channel, \ tmr_channel_input_divider_type divider_factor); void tmr_primary_mode_select(tmr_type *tmr_x, tmr_primary_select_type primary_mode); @@ -980,7 +970,6 @@ void tmr_flag_clear(tmr_type *tmr_x, uint32_t tmr_flag); void tmr_event_sw_trigger(tmr_type *tmr_x, tmr_event_trigger_type tmr_event); void tmr_output_enable(tmr_type *tmr_x, confirm_state new_state); void tmr_internal_clock_set(tmr_type *tmr_x); -void tmr_output_channel_fast_set(tmr_type *tmr_x, tmr_channel_output_fast_type oc_fast); void tmr_output_channel_polarity_set(tmr_type *tmr_x, tmr_channel_select_type tmr_channel, \ tmr_polarity_active_type oc_polarity); void tmr_external_clock_config(tmr_type *tmr_x, tmr_external_signal_divider_type es_divide, \ diff --git a/libraries/drivers/inc/at32f435_437_usart.h b/libraries/drivers/inc/at32f435_437_usart.h index c1562035..036d4512 100644 --- a/libraries/drivers/inc/at32f435_437_usart.h +++ b/libraries/drivers/inc/at32f435_437_usart.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_usart.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 usart header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_usb.h b/libraries/drivers/inc/at32f435_437_usb.h index 59ce6bad..7cb94f11 100644 --- a/libraries/drivers/inc/at32f435_437_usb.h +++ b/libraries/drivers/inc/at32f435_437_usb.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_usb.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 usb header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_wdt.h b/libraries/drivers/inc/at32f435_437_wdt.h index ebe80ad1..4c98906e 100644 --- a/libraries/drivers/inc/at32f435_437_wdt.h +++ b/libraries/drivers/inc/at32f435_437_wdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_wdt.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 wdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_wwdt.h b/libraries/drivers/inc/at32f435_437_wwdt.h index 5a766a63..314869d8 100644 --- a/libraries/drivers/inc/at32f435_437_wwdt.h +++ b/libraries/drivers/inc/at32f435_437_wwdt.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_wwdt.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 wwdt header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/inc/at32f435_437_xmc.h b/libraries/drivers/inc/at32f435_437_xmc.h index 45566dc7..0958369b 100644 --- a/libraries/drivers/inc/at32f435_437_xmc.h +++ b/libraries/drivers/inc/at32f435_437_xmc.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_xmc.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 xmc header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_acc.c b/libraries/drivers/src/at32f435_437_acc.c index 011a9f63..3f85a5c5 100644 --- a/libraries/drivers/src/at32f435_437_acc.c +++ b/libraries/drivers/src/at32f435_437_acc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_acc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the acc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_adc.c b/libraries/drivers/src/at32f435_437_adc.c index e73807af..cf47d7e8 100644 --- a/libraries/drivers/src/at32f435_437_adc.c +++ b/libraries/drivers/src/at32f435_437_adc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_adc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the adc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_can.c b/libraries/drivers/src/at32f435_437_can.c index cd54e109..b963adda 100644 --- a/libraries/drivers/src/at32f435_437_can.c +++ b/libraries/drivers/src/at32f435_437_can.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_can.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the can firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_crc.c b/libraries/drivers/src/at32f435_437_crc.c index b34a0123..b5fa987c 100644 --- a/libraries/drivers/src/at32f435_437_crc.c +++ b/libraries/drivers/src/at32f435_437_crc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_crc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the crc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_crm.c b/libraries/drivers/src/at32f435_437_crm.c index 9fed8601..75d7f5d9 100644 --- a/libraries/drivers/src/at32f435_437_crm.c +++ b/libraries/drivers/src/at32f435_437_crm.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_crm.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the crm firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -61,12 +61,12 @@ void crm_reset(void) /* wait sclk switch status */ while(CRM->cfg_bit.sclksts != CRM_SCLK_HICK); - /* reset cfg register, include sclk switch, ahbdiv, apb1div, apb2div, adcdiv, clkout bits */ - CRM->cfg = 0; - /* reset hexten, hextbyps, cfden and pllen bits */ CRM->ctrl &= ~(0x010D0000U); + /* reset cfg register, include sclk switch, ahbdiv, apb1div, apb2div, adcdiv, clkout bits */ + CRM->cfg = 0; + /* reset pllms pllns pllfr pllrcs bits */ CRM->pllcfg = 0x00033002U; @@ -367,6 +367,7 @@ void crm_flag_clear(uint32_t flag) case CRM_LOWPOWER_RESET_FLAG: case CRM_ALL_RESET_FLAG: CRM->ctrlsts_bit.rstfc = TRUE; + while(CRM->ctrlsts_bit.rstfc == TRUE); break; case CRM_LICK_READY_INT_FLAG: CRM->clkint_bit.lickstblfc = TRUE; diff --git a/libraries/drivers/src/at32f435_437_dac.c b/libraries/drivers/src/at32f435_437_dac.c index 63f0c810..b0b0d19f 100644 --- a/libraries/drivers/src/at32f435_437_dac.c +++ b/libraries/drivers/src/at32f435_437_dac.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_dac.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the dac firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_debug.c b/libraries/drivers/src/at32f435_437_debug.c index 96610e21..b8689e54 100644 --- a/libraries/drivers/src/at32f435_437_debug.c +++ b/libraries/drivers/src/at32f435_437_debug.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_mcudbg.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the mcudbg firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_dma.c b/libraries/drivers/src/at32f435_437_dma.c index b1cb9662..f521c977 100644 --- a/libraries/drivers/src/at32f435_437_dma.c +++ b/libraries/drivers/src/at32f435_437_dma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_dma.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the dma firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_dvp.c b/libraries/drivers/src/at32f435_437_dvp.c index 4a1b5a8d..ad278d65 100644 --- a/libraries/drivers/src/at32f435_437_dvp.c +++ b/libraries/drivers/src/at32f435_437_dvp.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_dvp.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the dvp firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -41,6 +41,17 @@ * @{ */ +/** + * @brief reset the dvp register + * @param none + * @retval none + */ +void dvp_reset(void) +{ + crm_periph_reset(CRM_DVP_PERIPH_RESET, TRUE); + crm_periph_reset(CRM_DVP_PERIPH_RESET, FALSE); +} + /** * @brief enable or disable dvp capture * @param new_state (TRUE or FALSE) @@ -76,16 +87,18 @@ void dvp_window_crop_enable(confirm_state new_state) /** * @brief set dvp cropping window configuration - * @param crop_x(0x0000~0x3FFF): cropping window horizontal start pixel - * @param crop_y(0x0000~0x1FFF): cropping window vertical start pixel - * @param crop_w(0x0001~0x3FFF): cropping window horizontal pixel number - * @param crop_h(0x0001~0x3FFF): cropping window vertical pixel number + * @param crop_x: cropping window horizontal start pixel + * @param crop_y: cropping window vertical start line + * @param crop_w: cropping window horizontal pixel number + * @param crop_h: cropping window vertical line number + * @param bytes: the number of bytes corresponding to one pixel + * eg. y8:bytes = 1, rgb565:bytes = 2 * @retval none */ -void dvp_window_crop_set(uint16_t crop_x, uint16_t crop_y, uint16_t crop_w, uint16_t crop_h) +void dvp_window_crop_set(uint16_t crop_x, uint16_t crop_y, uint16_t crop_w, uint16_t crop_h, uint8_t bytes) { - DVP->cwst = ((crop_x * 2) | (crop_y << 16)); - DVP->cwsz = ((crop_w * 2 - 1) | ((crop_h - 1) << 16)); + DVP->cwst = ((crop_x * bytes) | (crop_y << 16)); + DVP->cwsz = ((crop_w * bytes - 1) | ((crop_h - 1) << 16)); } /** @@ -218,15 +231,15 @@ void dvp_enable(confirm_state new_state) /** * @brief set dvp zoomout select - * @param dvp_pcdse: pixel capture/drop selection extension (Only work when pcdc = 2) + * @param dvp_pcdes: pixel capture/drop selection extension (Only work when pcdc = 2) * this parameter can be one of the following values: - * - DVP_PCDSE_CAP_FIRST - * - DVP_PCDSE_DROP_FIRST + * - DVP_PCDES_CAP_FIRST + * - DVP_PCDES_DROP_FIRST * @retval none */ -void dvp_zoomout_select(dvp_pcdse_type dvp_pcdse) +void dvp_zoomout_select(dvp_pcdes_type dvp_pcdes) { - DVP->actrl_bit.pcdse = dvp_pcdse; + DVP->actrl_bit.pcdes = dvp_pcdes; } /** @@ -265,7 +278,7 @@ void dvp_zoomout_set(dvp_pcdc_type dvp_pcdc, dvp_pcds_type dvp_pcds, dvp_lcdc_ty * this parameter can be one of the following values: * - DVP_STATUS_HSYN * - DVP_STATUS_VSYN - * - DVP_STATUS_OFS + * - DVP_STATUS_OFNE * @retval flag_status (SET or RESET) */ flag_status dvp_basic_status_get(dvp_status_basic_type dvp_status_basic) @@ -406,16 +419,16 @@ void dvp_enhanced_scaling_resize_set(uint16_t src_w, uint16_t des_w, uint16_t sr /** * @brief set enhanced frame rate control configuration - * @param efrcfm(0x00~0x1F): original frame rate contorl factor - * @param efrcfn(0x00~0x1F): enhanced frame rate contorl factor + * @param efrcsf(0x00~0x1F): original frame rate contorl factor + * @param efrctf(0x00~0x1F): enhanced frame rate contorl factor * @param new_state (TRUE or FALSE) * @retval none */ -void dvp_enhanced_framerate_set(uint16_t efrcfm, uint16_t efrcfn, confirm_state new_state) +void dvp_enhanced_framerate_set(uint16_t efrcsf, uint16_t efrctf, confirm_state new_state) { - if((!DVP->ctrl_bit.cfm) && (!DVP->ctrl_bit.bfrc) && (efrcfn <= efrcfm)) + if((!DVP->ctrl_bit.cfm) && (!DVP->ctrl_bit.bfrc) && (efrctf <= efrcsf)) { - DVP->frf = (efrcfm | (efrcfn << 8)); + DVP->frf = (efrcsf | (efrctf << 8)); } DVP->actrl_bit.efrce = new_state; @@ -440,7 +453,7 @@ void dvp_monochrome_image_binarization_set(uint8_t mibthd, confirm_state new_sta * - DVP_EFDF_BYPASS * - DVP_EFDF_YUV422_UYVY * - DVP_EFDF_YUV422_YUYV - * - DVP_EFDF_YUV444 + * - DVP_EFDF_RGB565_555 * - DVP_EFDF_Y8 * @retval none */ @@ -451,10 +464,10 @@ void dvp_enhanced_data_format_set(dvp_efdf_type dvp_efdf) /** * @brief set dvp input data un-used condition/number configuration - * @param dvp_iduc: input data un-used condition + * @param dvp_idus: input data un-used condition * this parameter can be one of the following values: - * - DVP_IDUC_MSB - * - DVP_IDUC_LSB + * - DVP_IDUS_MSB + * - DVP_IDUS_LSB * @param dvp_idun: input data un-used number * this parameter can be one of the following values: * - DVP_IDUN_0 @@ -463,9 +476,9 @@ void dvp_enhanced_data_format_set(dvp_efdf_type dvp_efdf) * - DVP_IDUN_6 * @retval none */ -void dvp_input_data_unused_set(dvp_iduc_type dvp_iduc, dvp_idun_type dvp_idun) +void dvp_input_data_unused_set(dvp_idus_type dvp_idus, dvp_idun_type dvp_idun) { - DVP->actrl_bit.iduc = dvp_iduc; + DVP->actrl_bit.idus = dvp_idus; DVP->actrl_bit.idun = dvp_idun; } @@ -484,20 +497,20 @@ void dvp_dma_burst_set(dvp_dmabt_type dvp_dmabt) /** * @brief set dvp hsync/vsync event interrupt strategy configuration - * @param dvp_hseis: hsync event interrupt strategy + * @param dvp_hseid: hsync event interrupt strategy * this parameter can be one of the following values: - * - DVP_HSEIS_LINE_END - * - DVP_HSEIS_LINE_START - * @param dvp_vseis: vsync event interrupt strategy + * - DVP_HSEID_LINE_END + * - DVP_HSEID_LINE_START + * @param dvp_vseid: vsync event interrupt strategy * this parameter can be one of the following values: - * - DVP_VSEIS_FRAME_END - * - DVP_VSEIS_FRMAE_START + * - DVP_VSEID_FRAME_END + * - DVP_VSEID_FRMAE_START * @retval none */ -void dvp_sync_event_interrupt_set(dvp_hseis_type dvp_hseis, dvp_vseis_type dvp_vseis) +void dvp_sync_event_interrupt_set(dvp_hseid_type dvp_hseid, dvp_vseid_type dvp_vseid) { - DVP->actrl_bit.hseis = dvp_hseis; - DVP->actrl_bit.vseis = dvp_vseis; + DVP->actrl_bit.hseid = dvp_hseid; + DVP->actrl_bit.vseid = dvp_vseid; } /** diff --git a/libraries/drivers/src/at32f435_437_edma.c b/libraries/drivers/src/at32f435_437_edma.c index d7544661..96423074 100644 --- a/libraries/drivers/src/at32f435_437_edma.c +++ b/libraries/drivers/src/at32f435_437_edma.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_edma.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the edma firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_emac.c b/libraries/drivers/src/at32f435_437_emac.c index 4815258d..435b69b0 100644 --- a/libraries/drivers/src/at32f435_437_emac.c +++ b/libraries/drivers/src/at32f435_437_emac.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_emac.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the emac firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_ertc.c b/libraries/drivers/src/at32f435_437_ertc.c index cb3a1a96..a4589087 100644 --- a/libraries/drivers/src/at32f435_437_ertc.c +++ b/libraries/drivers/src/at32f435_437_ertc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_ertc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the ertc firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -406,7 +406,7 @@ void ertc_calendar_get(ertc_time_type* time) ertc_reg_time_type reg_tm; ertc_reg_date_type reg_dt; - (void) (ERTC->sts); + UNUSED(ERTC->sts); reg_tm.time = ERTC->time; reg_dt.date = ERTC->date; @@ -724,8 +724,8 @@ uint32_t ertc_alarm_sub_second_get(ertc_alarm_type alarm_x) * - ERTC_WAT_CLK_ERTCCLK_DIV8: ERTC_CLK / 8. * - ERTC_WAT_CLK_ERTCCLK_DIV4: ERTC_CLK / 4. * - ERTC_WAT_CLK_ERTCCLK_DIV2: ERTC_CLK / 2. - * - ERTC_WAT_CLK_CK_A_16BITS: CK_A, wakeup counter = ERTC_WAT - * - ERTC_WAT_CLK_CK_A_17BITS: CK_A, wakeup counter = ERTC_WAT + 65535. + * - ERTC_WAT_CLK_CK_B_16BITS: CK_B, wakeup counter = ERTC_WAT + * - ERTC_WAT_CLK_CK_B_17BITS: CK_B, wakeup counter = ERTC_WAT + 65535. * @retval none. */ void ertc_wakeup_clock_set(ertc_wakeup_clock_type clock) diff --git a/libraries/drivers/src/at32f435_437_exint.c b/libraries/drivers/src/at32f435_437_exint.c index a88a8520..dfb10526 100644 --- a/libraries/drivers/src/at32f435_437_exint.c +++ b/libraries/drivers/src/at32f435_437_exint.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_exint.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the exint firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_flash.c b/libraries/drivers/src/at32f435_437_flash.c index 837407c3..8819746e 100644 --- a/libraries/drivers/src/at32f435_437_flash.c +++ b/libraries/drivers/src/at32f435_437_flash.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_flash.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the flash firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -359,41 +359,27 @@ flash_status_type flash_sector_erase(uint32_t sector_address) flash_status_type status = FLASH_OPERATE_DONE; if((sector_address >= FLASH_BANK1_START_ADDR) && (sector_address <= FLASH_BANK1_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl_bit.secers = TRUE; + FLASH->addr = sector_address; + FLASH->ctrl_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase the sector */ - FLASH->ctrl_bit.secers = TRUE; - FLASH->addr = sector_address; - FLASH->ctrl_bit.erstr = TRUE; - - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - - /* disable the secers bit */ - FLASH->ctrl_bit.secers = FALSE; - } + /* disable the secers bit */ + FLASH->ctrl_bit.secers = FALSE; } else if((sector_address >= FLASH_BANK2_START_ADDR) && (sector_address <= FLASH_BANK2_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl2_bit.secers = TRUE; + FLASH->addr2 = sector_address; + FLASH->ctrl2_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank2_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase the sector */ - FLASH->ctrl2_bit.secers = TRUE; - FLASH->addr2 = sector_address; - FLASH->ctrl2_bit.erstr = TRUE; - - /* wait for operation to be completed */ - status = flash_bank2_operation_wait_for(ERASE_TIMEOUT); - - /* disable the secers bit */ - FLASH->ctrl2_bit.secers = FALSE; - } + /* disable the secers bit */ + FLASH->ctrl2_bit.secers = FALSE; } /* return the erase status */ @@ -411,41 +397,27 @@ flash_status_type flash_block_erase(uint32_t block_address) flash_status_type status = FLASH_OPERATE_DONE; if((block_address >= FLASH_BANK1_START_ADDR) && (block_address <= FLASH_BANK1_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl_bit.blkers = TRUE; + FLASH->addr = block_address; + FLASH->ctrl_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase the blkers */ - FLASH->ctrl_bit.blkers = TRUE; - FLASH->addr = block_address; - FLASH->ctrl_bit.erstr = TRUE; - - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - - /* disable the blkers bit */ - FLASH->ctrl_bit.blkers = FALSE; - } + /* disable the blkers bit */ + FLASH->ctrl_bit.blkers = FALSE; } else if((block_address >= FLASH_BANK2_START_ADDR) && (block_address <= FLASH_BANK2_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl2_bit.blkers = TRUE; + FLASH->addr2 = block_address; + FLASH->ctrl2_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank2_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase the blkers */ - FLASH->ctrl2_bit.blkers = TRUE; - FLASH->addr2 = block_address; - FLASH->ctrl2_bit.erstr = TRUE; - - /* wait for operation to be completed */ - status = flash_bank2_operation_wait_for(ERASE_TIMEOUT); - - /* disable the blkers bit */ - FLASH->ctrl2_bit.blkers = FALSE; - } + /* disable the blkers bit */ + FLASH->ctrl2_bit.blkers = FALSE; } /* return the erase status */ @@ -461,21 +433,16 @@ flash_status_type flash_block_erase(uint32_t block_address) flash_status_type flash_internal_all_erase(void) { flash_status_type status = FLASH_OPERATE_DONE; - /* wait for last operation to be completed */ + + FLASH->ctrl_bit.bankers = TRUE; + FLASH->ctrl_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase bank1 */ - FLASH->ctrl_bit.bankers = TRUE; - FLASH->ctrl_bit.erstr = TRUE; + /* disable the bankers bit */ + FLASH->ctrl_bit.bankers = FALSE; - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - - /* disable the bankers bit */ - FLASH->ctrl_bit.bankers = FALSE; - } if(status == FLASH_OPERATE_DONE) { /* if the previous operation is completed, continue to erase bank2 */ @@ -501,21 +468,16 @@ flash_status_type flash_internal_all_erase(void) flash_status_type flash_bank1_erase(void) { flash_status_type status = FLASH_OPERATE_DONE; - /* wait for last operation to be completed */ + + FLASH->ctrl_bit.bankers = TRUE; + FLASH->ctrl_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase bank1 */ - FLASH->ctrl_bit.bankers = TRUE; - FLASH->ctrl_bit.erstr = TRUE; + /* disable the bankers bit */ + FLASH->ctrl_bit.bankers = FALSE; - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(ERASE_TIMEOUT); - - /* disable the bankers bit */ - FLASH->ctrl_bit.bankers = FALSE; - } /* return the erase status */ return status; } @@ -529,21 +491,16 @@ flash_status_type flash_bank1_erase(void) flash_status_type flash_bank2_erase(void) { flash_status_type status = FLASH_OPERATE_DONE; - /* wait for last operation to be completed */ + + FLASH->ctrl2_bit.bankers = TRUE; + FLASH->ctrl2_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_bank2_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* if the previous operation is completed, continue to erase bank2 */ - FLASH->ctrl2_bit.bankers = TRUE; - FLASH->ctrl2_bit.erstr = TRUE; + /* disable the bankers bit */ + FLASH->ctrl2_bit.bankers = FALSE; - /* wait for operation to be completed */ - status = flash_bank2_operation_wait_for(ERASE_TIMEOUT); - - /* disable the bankers bit */ - FLASH->ctrl2_bit.bankers = FALSE; - } /* return the erase status */ return status; } @@ -566,41 +523,36 @@ flash_status_type flash_user_system_data_erase(void) fap_val = 0x0000; } - /* wait for last operation to be completed */ + /* unlock the user system data */ + FLASH->usd_unlock = FLASH_UNLOCK_KEY1; + FLASH->usd_unlock = FLASH_UNLOCK_KEY2; + while(FLASH->ctrl_bit.usdulks==RESET); + + /* erase the user system data */ + FLASH->ctrl_bit.usders = TRUE; + FLASH->ctrl_bit.erstr = TRUE; + + /* wait for operation to be completed */ status = flash_operation_wait_for(ERASE_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* unlock the user system data */ - FLASH->usd_unlock = FLASH_UNLOCK_KEY1; - FLASH->usd_unlock = FLASH_UNLOCK_KEY2; - while(FLASH->ctrl_bit.usdulks==RESET); + /* disable the usders bit */ + FLASH->ctrl_bit.usders = FALSE; - /* erase the user system data */ - FLASH->ctrl_bit.usders = TRUE; - FLASH->ctrl_bit.erstr = TRUE; + if((status == FLASH_OPERATE_DONE) && (fap_val == FAP_RELIEVE_KEY)) + { + /* enable the user system data programming operation */ + FLASH->ctrl_bit.usdprgm = TRUE; + + /* restore the last flash access protection value */ + USD->fap = (uint16_t)fap_val; /* wait for operation to be completed */ - status = flash_operation_wait_for(ERASE_TIMEOUT); + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - /* disable the usders bit */ - FLASH->ctrl_bit.usders = FALSE; - - if((status == FLASH_OPERATE_DONE) && (fap_val == FAP_RELIEVE_KEY)) - { - /* enable the user system data programming operation */ - FLASH->ctrl_bit.usdprgm = TRUE; - - /* restore the last flash access protection value */ - USD->fap = (uint16_t)fap_val; - - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - - /*disable the usdprgm bit */ - FLASH->ctrl_bit.usdprgm = FALSE; - } + /*disable the usdprgm bit */ + FLASH->ctrl_bit.usdprgm = FALSE; } + /* return the status */ return status; } @@ -625,28 +577,23 @@ flash_status_type flash_eopb0_config(flash_usd_eopb0_type data) { flash_status_type status = FLASH_OPERATE_DONE; - /* wait for last operation to be completed */ - status = flash_operation_wait_for(ERASE_TIMEOUT); + /* unlock the user system data */ + FLASH->usd_unlock = FLASH_UNLOCK_KEY1; + FLASH->usd_unlock = FLASH_UNLOCK_KEY2; + while(FLASH->ctrl_bit.usdulks==RESET); - if(status == FLASH_OPERATE_DONE) - { - /* unlock the user system data */ - FLASH->usd_unlock = FLASH_UNLOCK_KEY1; - FLASH->usd_unlock = FLASH_UNLOCK_KEY2; - while(FLASH->ctrl_bit.usdulks==RESET); + /* enable the user system data programming operation */ + FLASH->ctrl_bit.usdprgm = TRUE; - /* enable the user system data programming operation */ - FLASH->ctrl_bit.usdprgm = TRUE; + /* restore the default eopb0 value */ + USD->eopb0 = (uint16_t)data; - /* restore the default eopb0 value */ - USD->eopb0 = (uint16_t)data; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + /*disable the usdprgm bit */ + FLASH->ctrl_bit.usdprgm = FALSE; - /*disable the usdprgm bit */ - FLASH->ctrl_bit.usdprgm = FALSE; - } /* return the status */ return status; } @@ -663,35 +610,23 @@ flash_status_type flash_word_program(uint32_t address, uint32_t data) flash_status_type status = FLASH_OPERATE_DONE; if((address >= FLASH_BANK1_START_ADDR) && (address <= FLASH_BANK1_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl_bit.fprgm = TRUE; + *(__IO uint32_t*)address = data; + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - FLASH->ctrl_bit.fprgm = TRUE; - *(__IO uint32_t*)address = data; - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the fprgm bit */ - FLASH->ctrl_bit.fprgm = FALSE; - } + /* disable the fprgm bit */ + FLASH->ctrl_bit.fprgm = FALSE; } else if((address >= FLASH_BANK2_START_ADDR) && (address <= FLASH_BANK2_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl2_bit.fprgm = TRUE; + *(__IO uint32_t*)address = data; + /* wait for operation to be completed */ status = flash_bank2_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - FLASH->ctrl2_bit.fprgm = TRUE; - *(__IO uint32_t*)address = data; - /* wait for operation to be completed */ - status = flash_bank2_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the fprgm bit */ - FLASH->ctrl2_bit.fprgm = FALSE; - } + /* disable the fprgm bit */ + FLASH->ctrl2_bit.fprgm = FALSE; } /* return the program status */ @@ -710,35 +645,23 @@ flash_status_type flash_halfword_program(uint32_t address, uint16_t data) flash_status_type status = FLASH_OPERATE_DONE; if((address >= FLASH_BANK1_START_ADDR) && (address <= FLASH_BANK1_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl_bit.fprgm = TRUE; + *(__IO uint16_t*)address = data; + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - FLASH->ctrl_bit.fprgm = TRUE; - *(__IO uint16_t*)address = data; - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the fprgm bit */ - FLASH->ctrl_bit.fprgm = FALSE; - } + /* disable the fprgm bit */ + FLASH->ctrl_bit.fprgm = FALSE; } else if((address >= FLASH_BANK2_START_ADDR) && (address <= FLASH_BANK2_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl2_bit.fprgm = TRUE; + *(__IO uint16_t*)address = data; + /* wait for operation to be completed */ status = flash_bank2_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - FLASH->ctrl2_bit.fprgm = TRUE; - *(__IO uint16_t*)address = data; - /* wait for operation to be completed */ - status = flash_bank2_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the fprgm bit */ - FLASH->ctrl2_bit.fprgm = FALSE; - } + /* disable the fprgm bit */ + FLASH->ctrl2_bit.fprgm = FALSE; } /* return the program status */ @@ -758,35 +681,23 @@ flash_status_type flash_byte_program(uint32_t address, uint8_t data) flash_status_type status = FLASH_OPERATE_DONE; if((address >= FLASH_BANK1_START_ADDR) && (address <= FLASH_BANK1_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl_bit.fprgm = TRUE; + *(__IO uint8_t*)address = data; + /* wait for operation to be completed */ status = flash_bank1_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - FLASH->ctrl_bit.fprgm = TRUE; - *(__IO uint8_t*)address = data; - /* wait for operation to be completed */ - status = flash_bank1_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the fprgm bit */ - FLASH->ctrl_bit.fprgm = FALSE; - } + /* disable the fprgm bit */ + FLASH->ctrl_bit.fprgm = FALSE; } else if((address >= FLASH_BANK2_START_ADDR) && (address <= FLASH_BANK2_END_ADDR)) { - /* wait for last operation to be completed */ + FLASH->ctrl2_bit.fprgm = TRUE; + *(__IO uint8_t*)address = data; + /* wait for operation to be completed */ status = flash_bank2_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - FLASH->ctrl2_bit.fprgm = TRUE; - *(__IO uint8_t*)address = data; - /* wait for operation to be completed */ - status = flash_bank2_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the fprgm bit */ - FLASH->ctrl2_bit.fprgm = FALSE; - } + /* disable the fprgm bit */ + FLASH->ctrl2_bit.fprgm = FALSE; } /* return the program status */ return status; @@ -802,24 +713,28 @@ flash_status_type flash_byte_program(uint32_t address, uint8_t data) flash_status_type flash_user_system_data_program(uint32_t address, uint8_t data) { flash_status_type status = FLASH_OPERATE_DONE; - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) + + if(address == USD_BASE) { - /* unlock the user system data */ - FLASH->usd_unlock = FLASH_UNLOCK_KEY1; - FLASH->usd_unlock = FLASH_UNLOCK_KEY2; - while(FLASH->ctrl_bit.usdulks==RESET); - - /* enable the user system data programming operation */ - FLASH->ctrl_bit.usdprgm = TRUE; - *(__IO uint16_t*)address = data; - - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the usdprgm bit */ - FLASH->ctrl_bit.usdprgm = FALSE; + if(data != 0xA5) + return FLASH_OPERATE_DONE; } + + /* unlock the user system data */ + FLASH->usd_unlock = FLASH_UNLOCK_KEY1; + FLASH->usd_unlock = FLASH_UNLOCK_KEY2; + while(FLASH->ctrl_bit.usdulks==RESET); + + /* enable the user system data programming operation */ + FLASH->ctrl_bit.usdprgm = TRUE; + *(__IO uint16_t*)address = data; + + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + + /* disable the usdprgm bit */ + FLASH->ctrl_bit.usdprgm = FALSE; + /* return the user system data program status */ return status; } @@ -842,73 +757,69 @@ flash_status_type flash_epp_set(uint32_t *sector_bits) epp_data[1] = (uint16_t)((sector_bits[0] >> 8) & 0xFF); epp_data[2] = (uint16_t)((sector_bits[0] >> 16) & 0xFF); epp_data[3] = (uint16_t)((sector_bits[0] >> 24) & 0xFF); - /* wait for last operation to be completed */ + + /* unlock the user system data */ + FLASH->usd_unlock = FLASH_UNLOCK_KEY1; + FLASH->usd_unlock = FLASH_UNLOCK_KEY2; + while(FLASH->ctrl_bit.usdulks==RESET); + + FLASH->ctrl_bit.usdprgm = TRUE; + USD->epp0 = epp_data[0]; + /* wait for operation to be completed */ status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); if(status == FLASH_OPERATE_DONE) { - /* unlock the user system data */ - FLASH->usd_unlock = FLASH_UNLOCK_KEY1; - FLASH->usd_unlock = FLASH_UNLOCK_KEY2; - while(FLASH->ctrl_bit.usdulks==RESET); - - FLASH->ctrl_bit.usdprgm = TRUE; - USD->epp0 = epp_data[0]; + USD->epp1 = epp_data[1]; /* wait for operation to be completed */ status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - - if(status == FLASH_OPERATE_DONE) - { - USD->epp1 = epp_data[1]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - if(status == FLASH_OPERATE_DONE) - { - USD->epp2 = epp_data[2]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - if(status == FLASH_OPERATE_DONE) - { - USD->epp3 = epp_data[3]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - - sector_bits[1] = (uint32_t)(~sector_bits[1]); - epp_data[0] = (uint16_t)((sector_bits[1] >> 0) & 0xFF); - epp_data[1] = (uint16_t)((sector_bits[1] >> 8) & 0xFF); - epp_data[2] = (uint16_t)((sector_bits[1] >> 16) & 0xFF); - epp_data[3] = (uint16_t)((sector_bits[1] >> 24) & 0xFF); - if(status == FLASH_OPERATE_DONE) - { - USD->epp4 = epp_data[0]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - if(status == FLASH_OPERATE_DONE) - { - USD->epp5 = epp_data[1]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - if(status == FLASH_OPERATE_DONE) - { - USD->epp6 = epp_data[2]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - if(status == FLASH_OPERATE_DONE) - { - USD->epp7 = epp_data[3]; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - } - - /* disable the usdprgm bit */ - FLASH->ctrl_bit.usdprgm = FALSE; } + if(status == FLASH_OPERATE_DONE) + { + USD->epp2 = epp_data[2]; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } + if(status == FLASH_OPERATE_DONE) + { + USD->epp3 = epp_data[3]; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } + + sector_bits[1] = (uint32_t)(~sector_bits[1]); + epp_data[0] = (uint16_t)((sector_bits[1] >> 0) & 0xFF); + epp_data[1] = (uint16_t)((sector_bits[1] >> 8) & 0xFF); + epp_data[2] = (uint16_t)((sector_bits[1] >> 16) & 0xFF); + epp_data[3] = (uint16_t)((sector_bits[1] >> 24) & 0xFF); + if(status == FLASH_OPERATE_DONE) + { + USD->epp4 = epp_data[0]; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } + if(status == FLASH_OPERATE_DONE) + { + USD->epp5 = epp_data[1]; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } + if(status == FLASH_OPERATE_DONE) + { + USD->epp6 = epp_data[2]; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } + if(status == FLASH_OPERATE_DONE) + { + USD->epp7 = epp_data[3]; + /* wait for operation to be completed */ + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } + + /* disable the usdprgm bit */ + FLASH->ctrl_bit.usdprgm = FALSE; + /* return the erase/program protection operation status */ return status; } @@ -937,43 +848,41 @@ void flash_epp_status_get(uint32_t *sector_bits) flash_status_type flash_fap_enable(confirm_state new_state) { flash_status_type status = FLASH_OPERATE_DONE; + + /* unlock the user system data */ + FLASH->usd_unlock = FLASH_UNLOCK_KEY1; + FLASH->usd_unlock = FLASH_UNLOCK_KEY2; + while(FLASH->ctrl_bit.usdulks==RESET); + + FLASH->ctrl_bit.usders = TRUE; + FLASH->ctrl_bit.erstr = TRUE; + /* wait for operation to be completed */ status = flash_operation_wait_for(ERASE_TIMEOUT); + + /* disable the usders bit */ + FLASH->ctrl_bit.usders = FALSE; + if(status == FLASH_OPERATE_DONE) { - /* unlock the user system data */ - FLASH->usd_unlock = FLASH_UNLOCK_KEY1; - FLASH->usd_unlock = FLASH_UNLOCK_KEY2; - while(FLASH->ctrl_bit.usdulks==RESET); + /* enable the user system data programming operation */ + FLASH->ctrl_bit.usdprgm = TRUE; - FLASH->ctrl_bit.usders = TRUE; - FLASH->ctrl_bit.erstr = TRUE; - /* wait for operation to be completed */ + /* restore the default eopb0 value */ + USD->eopb0 = (uint16_t)0x0002; + + /* Wait for operation to be completed */ status = flash_operation_wait_for(ERASE_TIMEOUT); - /* disable the usders bit */ - FLASH->ctrl_bit.usders = FALSE; - - if(status == FLASH_OPERATE_DONE) + if(new_state == FALSE) { - /* enable the user system data programming operation */ - FLASH->ctrl_bit.usdprgm = TRUE; - - /* restore the default eopb0 value */ - USD->eopb0 = (uint16_t)0x0002; - + USD->fap = FAP_RELIEVE_KEY; /* Wait for operation to be completed */ status = flash_operation_wait_for(ERASE_TIMEOUT); - - if(new_state == FALSE) - { - USD->fap = FAP_RELIEVE_KEY; - /* Wait for operation to be completed */ - status = flash_operation_wait_for(ERASE_TIMEOUT); - } - /* disable the usdprgm bit */ - FLASH->ctrl_bit.usdprgm = FALSE; } + /* disable the usdprgm bit */ + FLASH->ctrl_bit.usdprgm = FALSE; } + /* return the flash access protection operation status */ return status; } @@ -1022,26 +931,22 @@ flag_status flash_fap_status_get(void) flash_status_type flash_ssb_set(uint8_t usd_ssb) { flash_status_type status = FLASH_OPERATE_DONE; - /* wait for last operation to be completed */ + + /* unlock the user system data */ + FLASH->usd_unlock = FLASH_UNLOCK_KEY1; + FLASH->usd_unlock = FLASH_UNLOCK_KEY2; + while(FLASH->ctrl_bit.usdulks==RESET); + + /* enable the user system data programming operation */ + FLASH->ctrl_bit.usdprgm = TRUE; + + USD->ssb = usd_ssb; + /* wait for operation to be completed */ status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - if(status == FLASH_OPERATE_DONE) - { - /* unlock the user system data */ - FLASH->usd_unlock = FLASH_UNLOCK_KEY1; - FLASH->usd_unlock = FLASH_UNLOCK_KEY2; - while(FLASH->ctrl_bit.usdulks==RESET); + /* disable the usdprgm bit */ + FLASH->ctrl_bit.usdprgm = FALSE; - /* enable the user system data programming operation */ - FLASH->ctrl_bit.usdprgm = TRUE; - - USD->ssb = usd_ssb; - /* wait for operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - - /* disable the usdprgm bit */ - FLASH->ctrl_bit.usdprgm = FALSE; - } /* return the user system data program status */ return status; } @@ -1097,30 +1002,32 @@ flash_status_type flash_slib_enable(uint32_t pwd, uint16_t start_sector, uint16_ { uint32_t slib_range; flash_status_type status = FLASH_OPERATE_DONE; - /* wait for last operation to be completed */ - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); /*check range param limits*/ if((start_sector>=inst_start_sector) || ((inst_start_sector > end_sector) && \ (inst_start_sector != 0xFFFF)) || (start_sector > end_sector)) return FLASH_PROGRAM_ERROR; + /* unlock slib cfg register */ + FLASH->slib_unlock = SLIB_UNLOCK_KEY; + while(FLASH->slib_misc_sts_bit.slib_ulkf==RESET); + + /* configure slib, set pwd and range */ + FLASH->slib_set_pwd = pwd; + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); if(status == FLASH_OPERATE_DONE) { - /* unlock slib cfg register */ - FLASH->slib_unlock = SLIB_UNLOCK_KEY; - while(FLASH->slib_misc_sts_bit.slib_ulkf==RESET); - - /* configure slib, set pwd and range */ - FLASH->slib_set_pwd = pwd; - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); slib_range = ((uint32_t)(end_sector << 16) & FLASH_SLIB_END_SECTOR) | (start_sector & FLASH_SLIB_START_SECTOR); FLASH->slib_set_range0 = slib_range; status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); - slib_range = (inst_start_sector & FLASH_SLIB_INST_START_SECTOR) | 0x80000000; - FLASH->slib_set_range1 = slib_range; - status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + if(status == FLASH_OPERATE_DONE) + { + slib_range = (inst_start_sector & FLASH_SLIB_INST_START_SECTOR) | 0x80000000; + FLASH->slib_set_range1 = slib_range; + status = flash_operation_wait_for(PROGRAMMING_TIMEOUT); + } } + return status; } diff --git a/libraries/drivers/src/at32f435_437_gpio.c b/libraries/drivers/src/at32f435_437_gpio.c index 7c26e392..56647467 100644 --- a/libraries/drivers/src/at32f435_437_gpio.c +++ b/libraries/drivers/src/at32f435_437_gpio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_gpio.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the gpio firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -357,7 +357,7 @@ void gpio_bits_write(gpio_type *gpio_x, uint16_t pins, confirm_state bit_state) * @param port_value: specifies the value to be written to the port output data register. * @retval none */ -void gpio_port_wirte(gpio_type *gpio_x, uint16_t port_value) +void gpio_port_write(gpio_type *gpio_x, uint16_t port_value) { gpio_x->odt = port_value; } diff --git a/libraries/drivers/src/at32f435_437_i2c.c b/libraries/drivers/src/at32f435_437_i2c.c index d8749340..97d1f3ae 100644 --- a/libraries/drivers/src/at32f435_437_i2c.c +++ b/libraries/drivers/src/at32f435_437_i2c.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_i2c.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the i2c firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -271,11 +271,13 @@ void i2c_transfer_dir_set(i2c_type *i2c_x, i2c_transfer_dir_type i2c_direction) } /** - * @brief get the i2c slave received direction. + * @brief slave get the i2c transfer direction. * @param i2c_x: to select the i2c peripheral. * this parameter can be one of the following values: * I2C1, I2C2, I2C3. - * @retval the value of the received direction. + * @retval the value of the slave direction + * - I2C_DIR_TRANSMIT: master request a write transfer, slave enters receiver mode. + * - I2C_DIR_RECEIVE: master request a read transfer, slave enters transmitter mode. */ i2c_transfer_dir_type i2c_transfer_dir_get(i2c_type *i2c_x) { @@ -595,14 +597,14 @@ void i2c_dma_enable(i2c_type *i2c_x, i2c_dma_request_type dma_req, confirm_state * - I2C_AUTO_STOP_MODE: auto generate stop mode. * - I2C_SOFT_STOP_MODE: soft generate stop mode. * - I2C_RELOAD_MODE: reload mode. - * @param start_stop: config gen start condition mode. + * @param start: config gen start condition mode. * this parameter can be one of the following values: * - I2C_WITHOUT_START: transfer data without start condition. * - I2C_GEN_START_READ: read data and generate start. * - I2C_GEN_START_WRITE: send data and generate start. * @retval none */ -void i2c_transmit_set(i2c_type *i2c_x, uint16_t address, uint8_t cnt, i2c_reload_stop_mode_type rld_stop, i2c_start_stop_mode_type start_stop) +void i2c_transmit_set(i2c_type *i2c_x, uint16_t address, uint8_t cnt, i2c_reload_stop_mode_type rld_stop, i2c_start_mode_type start) { uint32_t temp; @@ -613,7 +615,7 @@ void i2c_transmit_set(i2c_type *i2c_x, uint16_t address, uint8_t cnt, i2c_reload temp &= ~0x03FF67FF; /* transfer mode and address set */ - temp |= address | rld_stop | start_stop; + temp |= address | rld_stop | start; /* transfer counter set */ temp |= (uint32_t)cnt << 16; diff --git a/libraries/drivers/src/at32f435_437_misc.c b/libraries/drivers/src/at32f435_437_misc.c index fb6f2fa5..9aa52396 100644 --- a/libraries/drivers/src/at32f435_437_misc.c +++ b/libraries/drivers/src/at32f435_437_misc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_misc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the misc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_pwc.c b/libraries/drivers/src/at32f435_437_pwc.c index 8f44637f..2b8e7d8a 100644 --- a/libraries/drivers/src/at32f435_437_pwc.c +++ b/libraries/drivers/src/at32f435_437_pwc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_pwc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the pwc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_qspi.c b/libraries/drivers/src/at32f435_437_qspi.c index 181bdd65..d084a74a 100644 --- a/libraries/drivers/src/at32f435_437_qspi.c +++ b/libraries/drivers/src/at32f435_437_qspi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_qspi.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contain all the functions for qspi firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -67,7 +67,7 @@ void qspi_encryption_enable(qspi_type* qspi_x, confirm_state new_state) * - QSPI_SCK_MODE_3 * @retval none */ -void qspi_sck_mode_set( qspi_type* qspi_x, qspi_clk_mode_type new_mode) +void qspi_sck_mode_set(qspi_type* qspi_x, qspi_clk_mode_type new_mode) { qspi_x->ctrl_bit.sckmode = new_mode; } @@ -165,7 +165,7 @@ flag_status qspi_flag_get(qspi_type* qspi_x, uint32_t flag) * - QSPI_CMDSTS_FLAG * @retval none */ -void qspi_flag_clear( qspi_type* qspi_x, uint32_t flag) +void qspi_flag_clear(qspi_type* qspi_x, uint32_t flag) { qspi_x->cmdsts = QSPI_CMDSTS_FLAG; } diff --git a/libraries/drivers/src/at32f435_437_scfg.c b/libraries/drivers/src/at32f435_437_scfg.c index 40533d2b..ca5c0c99 100644 --- a/libraries/drivers/src/at32f435_437_scfg.c +++ b/libraries/drivers/src/at32f435_437_scfg.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_scfg.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the system config firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_sdio.c b/libraries/drivers/src/at32f435_437_sdio.c index a5154cab..aa0710d5 100644 --- a/libraries/drivers/src/at32f435_437_sdio.c +++ b/libraries/drivers/src/at32f435_437_sdio.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_sdio.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the sdio firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -82,22 +82,11 @@ void sdio_power_set(sdio_type *sdio_x, sdio_power_state_type power_state) * @param sdio_x: to select the sdio peripheral. * this parameter can be one of the following values: * SDIO1, SDIO2. - * @retval flag_status (SET or RESET) + * @retval sdio_power_state_type (SDIO_POWER_ON or SDIO_POWER_OFF) */ -flag_status sdio_power_status_get(sdio_type *sdio_x) +sdio_power_state_type sdio_power_status_get(sdio_type *sdio_x) { - flag_status flag = RESET; - - if(sdio_x->pwrctrl_bit.ps == SDIO_POWER_ON) - { - flag = SET; - } - else if(sdio_x->pwrctrl_bit.ps == SDIO_POWER_OFF) - { - flag = RESET; - } - - return flag; + return (sdio_power_state_type)(sdio_x->pwrctrl_bit.ps); } /** diff --git a/libraries/drivers/src/at32f435_437_spi.c b/libraries/drivers/src/at32f435_437_spi.c index d1db9efc..6e33c6e8 100644 --- a/libraries/drivers/src/at32f435_437_spi.c +++ b/libraries/drivers/src/at32f435_437_spi.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_spi.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the spi firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -615,25 +615,23 @@ flag_status spi_i2s_flag_get(spi_type* spi_x, uint32_t spi_i2s_flag) */ void spi_i2s_flag_clear(spi_type* spi_x, uint32_t spi_i2s_flag) { - volatile uint32_t temp = 0; - temp = temp; if(spi_i2s_flag == SPI_CCERR_FLAG) spi_x->sts = ~SPI_CCERR_FLAG; else if(spi_i2s_flag == SPI_I2S_RDBF_FLAG) - temp = REG32(&spi_x->dt); + UNUSED(spi_x->dt); else if(spi_i2s_flag == I2S_TUERR_FLAG) - temp = REG32(&spi_x->sts); + UNUSED(spi_x->sts); else if(spi_i2s_flag == SPI_CSPAS_FLAG) - temp = REG32(&spi_x->sts); + UNUSED(spi_x->sts); else if(spi_i2s_flag == SPI_MMERR_FLAG) { - temp = REG32(&spi_x->sts); + UNUSED(spi_x->sts); spi_x->ctrl1 = spi_x->ctrl1; } else if(spi_i2s_flag == SPI_I2S_ROERR_FLAG) { - temp = REG32(&spi_x->dt); - temp = REG32(&spi_x->sts); + UNUSED(spi_x->dt); + UNUSED(spi_x->sts); } } diff --git a/libraries/drivers/src/at32f435_437_tmr.c b/libraries/drivers/src/at32f435_437_tmr.c index 827bbae5..80048273 100644 --- a/libraries/drivers/src/at32f435_437_tmr.c +++ b/libraries/drivers/src/at32f435_437_tmr.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_tmr.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the tmr firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -1141,15 +1141,15 @@ void tmr_pwm_input_config(tmr_type *tmr_x, tmr_input_config_type *input_struct, * @param tmr_x: select the tmr peripheral. * this parameter can be one of the following values: * TMR1, TMR2, TMR3, TMR4, TMR5, TMR8, TMR20 - * @param ti1_connect + * @param ch1_connect * this parameter can be one of the following values: * - TMR_CHANEL1_CONNECTED_C1IRAW * - TMR_CHANEL1_2_3_CONNECTED_C1IRAW_XOR * @retval none */ -void tmr_channel1_input_select(tmr_type *tmr_x, tmr_channel1_input_connected_type ti1_connect) +void tmr_channel1_input_select(tmr_type *tmr_x, tmr_channel1_input_connected_type ch1_connect) { - tmr_x->ctrl2_bit.c1insel = ti1_connect; + tmr_x->ctrl2_bit.c1insel = ch1_connect; } /** @@ -1411,6 +1411,7 @@ void tmr_interrupt_enable(tmr_type *tmr_x, uint32_t tmr_interrupt, confirm_state * - TMR_C2_FLAG * - TMR_C3_FLAG * - TMR_C4_FLAG + * - TMR_C5_FLAG * - TMR_HALL_FLAG * - TMR_TRIGGER_FLAG * - TMR_BRK_FLAG @@ -1449,6 +1450,7 @@ flag_status tmr_flag_get(tmr_type *tmr_x, uint32_t tmr_flag) * - TMR_C2_FLAG * - TMR_C3_FLAG * - TMR_C4_FLAG + * - TMR_C5_FLAG * - TMR_HALL_FLAG * - TMR_TRIGGER_FLAG * - TMR_BRK_FLAG @@ -1511,25 +1513,6 @@ void tmr_internal_clock_set(tmr_type *tmr_x) tmr_x->stctrl_bit.smsel = TMR_SUB_MODE_DIABLE; } -/** - * @brief set tmr output channel fast - * @param tmr_x: select the tmr peripheral. - * this parameter can be one of the following values: - * TMR1, TMR2, TMR3, TMR4, TMR5, TMR8, TMR9, TMR10, - * TMR11, TMR12, TMR13, TMR14, TMR20 - * @param oc_fast - * this parameter can be one of the following values: - * - TMR_CHANNEL1_OUTPUT_FAST - * - TMR_CHANNEL2_OUTPUT_FAST - * - TMR_CHANNEL3_OUTPUT_FAST - * - TMR_CHANNEL4_OUTPUT_FAST - * @retval none - */ -void tmr_output_channel_fast_set(tmr_type *tmr_x, tmr_channel_output_fast_type oc_fast) -{ - PERIPH_REG((uint32_t)(tmr_x), oc_fast) |= PERIPH_REG_BIT(oc_fast); -} - /** * @brief set tmr output channel polarity * @param tmr_x: select the tmr peripheral. diff --git a/libraries/drivers/src/at32f435_437_usart.c b/libraries/drivers/src/at32f435_437_usart.c index 339627a6..d5c39189 100644 --- a/libraries/drivers/src/at32f435_437_usart.c +++ b/libraries/drivers/src/at32f435_437_usart.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_usart.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the usart firmware library ************************************************************************** * Copyright notice & Disclaimer @@ -618,6 +618,11 @@ flag_status usart_flag_get(usart_type* usart_x, uint32_t flag) * - USART_BFF_FLAG: * - USART_TDC_FLAG: * - USART_RDBF_FLAG: + * - USART_PERR_FLAG: + * - USART_FERR_FLAG: + * - USART_NERR_FLAG: + * - USART_ROERR_FLAG: + * - USART_IDLEF_FLAG: * @note * - USART_PERR_FLAG, USART_FERR_FLAG, USART_NERR_FLAG, USART_ROERR_FLAG and USART_IDLEF_FLAG are cleared by software * sequence: a read operation to usart sts register (usart_flag_get()) @@ -630,7 +635,15 @@ flag_status usart_flag_get(usart_type* usart_x, uint32_t flag) */ void usart_flag_clear(usart_type* usart_x, uint32_t flag) { - usart_x->sts = ~flag; + if(flag & (USART_PERR_FLAG | USART_FERR_FLAG | USART_NERR_FLAG | USART_ROERR_FLAG | USART_IDLEF_FLAG)) + { + UNUSED(usart_x->sts); + UNUSED(usart_x->dt); + } + else + { + usart_x->sts = ~flag; + } } /** diff --git a/libraries/drivers/src/at32f435_437_usb.c b/libraries/drivers/src/at32f435_437_usb.c index 0d8c2aa9..80bffbaf 100644 --- a/libraries/drivers/src/at32f435_437_usb.c +++ b/libraries/drivers/src/at32f435_437_usb.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_usb.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the usb firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_wdt.c b/libraries/drivers/src/at32f435_437_wdt.c index c8fb405f..e7526e6c 100644 --- a/libraries/drivers/src/at32f435_437_wdt.c +++ b/libraries/drivers/src/at32f435_437_wdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_wdt.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the wdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_wwdt.c b/libraries/drivers/src/at32f435_437_wwdt.c index caae27fa..a1c414da 100644 --- a/libraries/drivers/src/at32f435_437_wwdt.c +++ b/libraries/drivers/src/at32f435_437_wwdt.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_wwdt.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the wwdt firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/libraries/drivers/src/at32f435_437_xmc.c b/libraries/drivers/src/at32f435_437_xmc.c index 5ba5d1a2..663823f8 100644 --- a/libraries/drivers/src/at32f435_437_xmc.c +++ b/libraries/drivers/src/at32f435_437_xmc.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_xmc.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief contains all the functions for the xmc firmware library ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/i2c_application_library/i2c_application.c b/middlewares/i2c_application_library/i2c_application.c index 8281197a..b04a1f8f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief the driver library of the i2c peripheral ************************************************************************** * Copyright notice & Disclaimer @@ -182,11 +182,28 @@ i2c_status_type i2c_wait_end(i2c_handle_type* hi2c, uint32_t timeout) } /** - * @brief wait for the flag. + * @brief wait for the flag to be set or reset, only BUSYF flag + * is waiting to be reset, and other flags are waiting to be set * @param hi2c: the handle points to the operation information. - * @param flag: flag to wait. - * @param status: status to wait. - * @param event_check: flag to check while waiting for the flag. + * @param flag: specifies the flag to check. + * this parameter can be one of the following values: + * - I2C_TDBE_FLAG: transmit data buffer empty flag. + * - I2C_TDIS_FLAG: send interrupt status. + * - I2C_RDBF_FLAG: receive data buffer full flag. + * - I2C_ADDRF_FLAG: 0~7 bit address match flag. + * - I2C_ACKFAIL_FLAG: acknowledge failure flag. + * - I2C_STOPF_FLAG: stop condition generation complete flag. + * - I2C_TDC_FLAG: transmit data complete flag. + * - I2C_TCRLD_FLAG: transmission is complete, waiting to load data. + * - I2C_BUSERR_FLAG: bus error flag. + * - I2C_ARLOST_FLAG: arbitration lost flag. + * - I2C_OUF_FLAG: overflow or underflow flag. + * - I2C_PECERR_FLAG: pec receive error flag. + * - I2C_TMOUT_FLAG: smbus timeout flag. + * - I2C_ALERTF_FLAG: smbus alert flag. + * - I2C_BUSYF_FLAG: bus busy flag transmission mode. + * - I2C_SDIR_FLAG: slave data transmit direction. + * @param event_check: check other error flags while waiting for the flag. * parameter as following values: * - I2C_EVENT_CHECK_NONE * - I2C_EVENT_CHECK_ACKFAIL @@ -194,46 +211,62 @@ i2c_status_type i2c_wait_end(i2c_handle_type* hi2c, uint32_t timeout) * @param timeout: maximum waiting time. * @retval i2c status. */ -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_wait_flag(i2c_handle_type* hi2c, uint32_t flag, uint32_t event_check, uint32_t timeout) { - while(i2c_flag_get(hi2c->i2cx, flag) == status) + if(flag == I2C_BUSYF_FLAG) { - /* check the ack fail flag */ - if(event_check & I2C_EVENT_CHECK_ACKFAIL) + while(i2c_flag_get(hi2c->i2cx, flag) != RESET) { - if(hi2c->i2cx->sts & I2C_ACKFAIL_FLAG) + /* check timeout */ + if((timeout--) == 0) { - /* clear ack fail flag */ - i2c_flag_clear(hi2c->i2cx, I2C_ACKFAIL_FLAG); + hi2c->error_code = I2C_ERR_TIMEOUT; - hi2c->error_code = I2C_ERR_ACKFAIL; - - return I2C_ERR_ACKFAIL; + return I2C_ERR_TIMEOUT; } } - - /* check the stop flag */ - if(event_check & I2C_EVENT_CHECK_STOP) + } + else + { + while(i2c_flag_get(hi2c->i2cx, flag) == RESET) { - if(hi2c->i2cx->sts & I2C_STOPF_FLAG) + /* check the ack fail flag */ + if(event_check & I2C_EVENT_CHECK_ACKFAIL) { - /* clear stop flag */ - i2c_flag_clear(hi2c->i2cx, I2C_STOPF_FLAG); + if(i2c_flag_get(hi2c->i2cx, I2C_ACKFAIL_FLAG) != RESET) + { + /* clear ack fail flag */ + i2c_flag_clear(hi2c->i2cx, I2C_ACKFAIL_FLAG); - i2c_reset_ctrl2_register(hi2c); + hi2c->error_code = I2C_ERR_ACKFAIL; - hi2c->error_code = I2C_ERR_STOP; - - return I2C_ERR_STOP; + return I2C_ERR_ACKFAIL; + } } - } - /* check timeout */ - if((timeout--) == 0) - { - hi2c->error_code = I2C_ERR_TIMEOUT; + /* check the stop flag */ + if(event_check & I2C_EVENT_CHECK_STOP) + { + if(i2c_flag_get(hi2c->i2cx, I2C_STOPF_FLAG) != RESET) + { + /* clear stop flag */ + i2c_flag_clear(hi2c->i2cx, I2C_STOPF_FLAG); - return I2C_ERR_TIMEOUT; + i2c_reset_ctrl2_register(hi2c); + + hi2c->error_code = I2C_ERR_STOP; + + return I2C_ERR_STOP; + } + } + + /* check timeout */ + if((timeout--) == 0) + { + hi2c->error_code = I2C_ERR_TIMEOUT; + + return I2C_ERR_TIMEOUT; + } } } @@ -274,26 +307,26 @@ void i2c_dma_config(i2c_handle_type* hi2c, dma_channel_type* dma_channel, uint8_ * @brief start transfer in poll mode or interrupt mode. * @param hi2c: the handle points to the operation information. * @param address: slave address. - * @param start_stop: config gen start condition mode. + * @param start: config gen start condition mode. * parameter as following values: * - I2C_WITHOUT_START: transfer data without start condition. * - I2C_GEN_START_READ: read data and generate start. * - I2C_GEN_START_WRITE: send data and generate start. * @retval i2c status. */ -void i2c_start_transfer(i2c_handle_type* hi2c, uint16_t address, i2c_start_stop_mode_type start_stop) +void i2c_start_transfer(i2c_handle_type* hi2c, uint16_t address, i2c_start_mode_type start) { if (hi2c->pcount > MAX_TRANSFER_CNT) { hi2c->psize = MAX_TRANSFER_CNT; - i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_RELOAD_MODE, start_stop); + i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_RELOAD_MODE, start); } else { hi2c->psize = hi2c->pcount; - i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_AUTO_STOP_MODE, start_stop); + i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_AUTO_STOP_MODE, start); } } @@ -301,14 +334,14 @@ void i2c_start_transfer(i2c_handle_type* hi2c, uint16_t address, i2c_start_stop_ * @brief start transfer in dma mode. * @param hi2c: the handle points to the operation information. * @param address: slave address. - * @param start_stop: config gen start condition mode. + * @param start: config gen start condition mode. * parameter as following values: * - I2C_WITHOUT_START: transfer data without start condition. * - I2C_GEN_START_READ: read data and generate start. * - I2C_GEN_START_WRITE: send data and generate start. * @retval i2c status. */ -void i2c_start_transfer_dma(i2c_handle_type* hi2c, dma_channel_type* dma_channelx, uint16_t address, i2c_start_stop_mode_type start_stop) +void i2c_start_transfer_dma(i2c_handle_type* hi2c, dma_channel_type* dma_channelx, uint16_t address, i2c_start_mode_type start) { if (hi2c->pcount > MAX_TRANSFER_CNT) { @@ -317,7 +350,7 @@ void i2c_start_transfer_dma(i2c_handle_type* hi2c, dma_channel_type* dma_channel /* config dma */ i2c_dma_config(hi2c, dma_channelx, hi2c->pbuff, hi2c->psize); - i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_RELOAD_MODE, start_stop); + i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_RELOAD_MODE, start); } else { @@ -326,7 +359,7 @@ void i2c_start_transfer_dma(i2c_handle_type* hi2c, dma_channel_type* dma_channel /* config dma */ i2c_dma_config(hi2c, dma_channelx, hi2c->pbuff, hi2c->psize); - i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_AUTO_STOP_MODE, start_stop); + i2c_transmit_set(hi2c->i2cx, address, hi2c->psize, I2C_AUTO_STOP_MODE, start); } } @@ -347,8 +380,8 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -358,8 +391,8 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin while (hi2c->pcount > 0) { - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -371,8 +404,8 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin if ((hi2c->psize == 0) && (hi2c->pcount != 0)) { - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -382,8 +415,8 @@ i2c_status_type i2c_master_transmit(i2c_handle_type* hi2c, uint16_t address, uin } } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_4; } @@ -413,8 +446,8 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -422,8 +455,8 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ /* enable acknowledge */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr falg to be set */ - if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the addr flag to be set */ + if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -431,19 +464,10 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ /* clear addr flag */ i2c_flag_clear(hi2c->i2cx, I2C_ADDRF_FLAG); - /* wait for the dir falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_SDIR_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) - { - /* disable acknowledge */ - i2c_ack_enable(hi2c->i2cx, FALSE); - - return I2C_ERR_STEP_3; - } - while (hi2c->pcount > 0) { - /* wait for the rdbf falg to be set */ - if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_STOP, timeout) != I2C_OK) + /* wait for the rdbf flag to be set */ + if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, I2C_EVENT_CHECK_STOP, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -464,8 +488,8 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ hi2c->pcount--; } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -476,8 +500,8 @@ i2c_status_type i2c_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, uint16_ /* clear stop flag */ i2c_flag_clear(hi2c->i2cx, I2C_STOPF_FLAG); - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -505,8 +529,8 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -516,8 +540,8 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint while (hi2c->pcount > 0) { - /* wait for the rdbf falg to be set */ - if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the rdbf flag to be set */ + if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -529,8 +553,8 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint if ((hi2c->psize == 0) && (hi2c->pcount != 0)) { - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -540,8 +564,8 @@ i2c_status_type i2c_master_receive(i2c_handle_type* hi2c, uint16_t address, uint } } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_4; } @@ -571,8 +595,8 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -580,8 +604,8 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 /* enable acknowledge */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr falg to be set */ - if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the addr flag to be set */ + if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -594,8 +618,8 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 /* if 10-bit address mode is used */ if (hi2c->i2cx->ctrl2_bit.addr10 != RESET) { - /* wait for the addr falg to be set */ - if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the addr flag to be set */ + if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -607,19 +631,10 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 i2c_flag_clear(hi2c->i2cx, I2C_ADDRF_FLAG); } - /* wait for the dir falg to be set */ - if (i2c_wait_flag(hi2c, I2C_SDIR_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) - { - /* disable acknowledge */ - i2c_ack_enable(hi2c->i2cx, FALSE); - - return I2C_ERR_STEP_4; - } - while (hi2c->pcount > 0) { - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -632,8 +647,8 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 hi2c->pcount--; } - /* wait for the ackfail falg to be set */ - if(i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the ackfail flag to be set */ + if(i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_6; } @@ -641,8 +656,8 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 /* clear ack fail flag */ i2c_flag_clear(hi2c->i2cx, I2C_ACKFAIL_FLAG); - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -653,8 +668,8 @@ i2c_status_type i2c_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, uint16 /* clear stop flag */ i2c_flag_clear(hi2c->i2cx, I2C_STOPF_FLAG); - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -688,8 +703,8 @@ i2c_status_type i2c_master_transmit_int(i2c_handle_type* hi2c, uint16_t address, hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -722,8 +737,8 @@ i2c_status_type i2c_slave_receive_int(i2c_handle_type* hi2c, uint8_t* pdata, uin hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -757,8 +772,8 @@ i2c_status_type i2c_master_receive_int(i2c_handle_type* hi2c, uint16_t address, hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -791,8 +806,8 @@ i2c_status_type i2c_slave_transmit_int(i2c_handle_type* hi2c, uint8_t* pdata, ui hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -828,8 +843,8 @@ i2c_status_type i2c_master_transmit_dma(i2c_handle_type* hi2c, uint16_t address, hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -868,8 +883,8 @@ i2c_status_type i2c_slave_receive_dma(i2c_handle_type* hi2c, uint8_t* pdata, uin hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -912,8 +927,8 @@ i2c_status_type i2c_master_receive_dma(i2c_handle_type* hi2c, uint16_t address, hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -952,8 +967,8 @@ i2c_status_type i2c_slave_transmit_dma(i2c_handle_type* hi2c, uint8_t* pdata, ui hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -994,8 +1009,8 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1003,8 +1018,8 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 /* start transfer */ i2c_start_transfer(hi2c, address, I2C_GEN_START_WRITE); - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1017,8 +1032,8 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 while (hi2c->pcount > 0) { - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1030,8 +1045,8 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 if ((hi2c->psize == 0) && (hi2c->pcount != 0)) { - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_4; } @@ -1041,8 +1056,8 @@ i2c_status_type i2c_memory_write(i2c_handle_type* hi2c, uint16_t address, uint16 } } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_5; } @@ -1074,8 +1089,8 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1083,8 +1098,8 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* start transfer */ i2c_transmit_set(hi2c->i2cx, address, 1, I2C_SOFT_STOP_MODE, I2C_GEN_START_WRITE); - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1092,8 +1107,8 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdc falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tdc flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TDC_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1103,8 +1118,8 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ while (hi2c->pcount > 0) { - /* wait for the rdbf falg to be set */ - if (i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the rdbf flag to be set */ + if (i2c_wait_flag(hi2c, I2C_RDBF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_4; } @@ -1116,8 +1131,8 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ if ((hi2c->psize == 0) && (hi2c->pcount != 0)) { - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_5; } @@ -1127,8 +1142,8 @@ i2c_status_type i2c_memory_read(i2c_handle_type* hi2c, uint16_t address, uint16_ } } - /* wait for the stop falg to be set */ - if (i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if (i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_6; } @@ -1163,8 +1178,8 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1172,8 +1187,8 @@ i2c_status_type i2c_memory_write_int(i2c_handle_type* hi2c, uint16_t address, ui /* start transfer */ i2c_start_transfer(hi2c, address, I2C_GEN_START_WRITE); - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1210,8 +1225,8 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1219,8 +1234,8 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin /* start transfer */ i2c_transmit_set(hi2c->i2cx, address, 1, I2C_SOFT_STOP_MODE, I2C_GEN_START_WRITE); - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1228,8 +1243,8 @@ i2c_status_type i2c_memory_read_int(i2c_handle_type* hi2c, uint16_t address, uin /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdc falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tdc flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TDC_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1267,8 +1282,8 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui /* disable dma request */ i2c_dma_enable(hi2c->i2cx, I2C_DMA_REQUEST_TX, FALSE); - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1276,8 +1291,8 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui /* transfer config */ i2c_transmit_set(hi2c->i2cx, address, 1, I2C_RELOAD_MODE, I2C_GEN_START_WRITE); - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1285,8 +1300,8 @@ i2c_status_type i2c_memory_write_dma(i2c_handle_type* hi2c, uint16_t address, ui /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1324,8 +1339,8 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if(i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1333,8 +1348,8 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin /* start transfer */ i2c_transmit_set(hi2c->i2cx, address, 1, I2C_SOFT_STOP_MODE, I2C_GEN_START_WRITE); - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1342,8 +1357,8 @@ i2c_status_type i2c_memory_read_dma(i2c_handle_type* hi2c, uint16_t address, uin /* send memory address */ i2c_data_send(hi2c->i2cx, mem_address); - /* wait for the tdc falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TDC_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tdc flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TDC_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1380,8 +1395,8 @@ i2c_status_type i2c_smbus_master_transmit(i2c_handle_type* hi2c, uint16_t addres hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1399,8 +1414,8 @@ i2c_status_type i2c_smbus_master_transmit(i2c_handle_type* hi2c, uint16_t addres while (hi2c->pcount > 0) { - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1412,8 +1427,8 @@ i2c_status_type i2c_smbus_master_transmit(i2c_handle_type* hi2c, uint16_t addres if ((hi2c->psize == 0) && (hi2c->pcount != 0)) { - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1423,8 +1438,8 @@ i2c_status_type i2c_smbus_master_transmit(i2c_handle_type* hi2c, uint16_t addres } } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_4; } @@ -1463,8 +1478,8 @@ i2c_status_type i2c_smbus_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, u /* enable acknowledge */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr falg to be set */ - if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the addr flag to be set */ + if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1478,19 +1493,10 @@ i2c_status_type i2c_smbus_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, u /* clear addr flag */ i2c_flag_clear(hi2c->i2cx, I2C_ADDRF_FLAG); - /* wait for the dir falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_SDIR_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) - { - /* disable acknowledge */ - i2c_ack_enable(hi2c->i2cx, FALSE); - - return I2C_ERR_STEP_2; - } - while (hi2c->pcount > 0) { - /* wait for the rdbf falg to be set */ - if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_STOP, timeout) != I2C_OK) + /* wait for the rdbf flag to be set */ + if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, I2C_EVENT_CHECK_STOP, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1511,8 +1517,8 @@ i2c_status_type i2c_smbus_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, u hi2c->pcount--; } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1523,8 +1529,8 @@ i2c_status_type i2c_smbus_slave_receive(i2c_handle_type* hi2c, uint8_t* pdata, u /* clear stop flag */ i2c_flag_clear(hi2c->i2cx, I2C_STOPF_FLAG); - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1555,8 +1561,8 @@ i2c_status_type i2c_smbus_master_receive(i2c_handle_type* hi2c, uint16_t address hi2c->error_code = I2C_OK; - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_1; } @@ -1572,8 +1578,8 @@ i2c_status_type i2c_smbus_master_receive(i2c_handle_type* hi2c, uint16_t address while (hi2c->pcount > 0) { - /* wait for the rdbf falg to be set */ - if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the rdbf flag to be set */ + if(i2c_wait_flag(hi2c, I2C_RDBF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_2; } @@ -1585,8 +1591,8 @@ i2c_status_type i2c_smbus_master_receive(i2c_handle_type* hi2c, uint16_t address if ((hi2c->psize == 0) && (hi2c->pcount != 0)) { - /* wait for the tcrld falg to be set */ - if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the tcrld flag to be set */ + if (i2c_wait_flag(hi2c, I2C_TCRLD_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_3; } @@ -1596,8 +1602,8 @@ i2c_status_type i2c_smbus_master_receive(i2c_handle_type* hi2c, uint16_t address } } - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { return I2C_ERR_STEP_4; } @@ -1636,8 +1642,8 @@ i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, /* enable acknowledge */ i2c_ack_enable(hi2c->i2cx, TRUE); - /* wait for the addr falg to be set */ - if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the addr flag to be set */ + if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1660,8 +1666,8 @@ i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, /* if 10-bit address mode is used */ if (hi2c->i2cx->ctrl2_bit.addr10 != RESET) { - /* wait for the addr falg to be set */ - if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the addr flag to be set */ + if (i2c_wait_flag(hi2c, I2C_ADDRF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1679,21 +1685,12 @@ i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, i2c_flag_clear(hi2c->i2cx, I2C_ADDRF_FLAG); } - /* wait for the dir falg to be set */ - if (i2c_wait_flag(hi2c, I2C_SDIR_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) - { - /* disable acknowledge */ - i2c_ack_enable(hi2c->i2cx, FALSE); - - return I2C_ERR_STEP_3; - } - hi2c->pcount--; while (hi2c->pcount > 0) { - /* wait for the tdis falg to be set */ - if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, RESET, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) + /* wait for the tdis flag to be set */ + if(i2c_wait_flag(hi2c, I2C_TDIS_FLAG, I2C_EVENT_CHECK_ACKFAIL, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1706,8 +1703,8 @@ i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, hi2c->pcount--; } - /* wait for the ackfail falg to be set */ - if(i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the ackfail flag to be set */ + if(i2c_wait_flag(hi2c, I2C_ACKFAIL_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { return I2C_ERR_STEP_5; } @@ -1715,8 +1712,8 @@ i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, /* clear ack fail flag */ i2c_flag_clear(hi2c->i2cx, I2C_ACKFAIL_FLAG); - /* wait for the stop falg to be set */ - if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, RESET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the stop flag to be set */ + if(i2c_wait_flag(hi2c, I2C_STOPF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); @@ -1727,8 +1724,8 @@ i2c_status_type i2c_smbus_slave_transmit(i2c_handle_type* hi2c, uint8_t* pdata, /* clear stop flag */ i2c_flag_clear(hi2c->i2cx, I2C_STOPF_FLAG); - /* wait for the busy falg to be reset */ - if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, SET, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) + /* wait for the busy flag to be reset */ + if (i2c_wait_flag(hi2c, I2C_BUSYF_FLAG, I2C_EVENT_CHECK_NONE, timeout) != I2C_OK) { /* disable acknowledge */ i2c_ack_enable(hi2c->i2cx, FALSE); diff --git a/middlewares/i2c_application_library/i2c_application.h b/middlewares/i2c_application_library/i2c_application.h index dc6f8b56..08798d0e 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief i2c application libray header file ************************************************************************** * Copyright notice & Disclaimer @@ -134,7 +134,7 @@ 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_wait_flag (i2c_handle_type* hi2c, uint32_t flag, 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); diff --git a/middlewares/usb_drivers/inc/usb_core.h b/middlewares/usb_drivers/inc/usb_core.h index a1abbb8f..aa0826dd 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 df10e43e..06a0a03f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb standard header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usbd_core.h b/middlewares/usb_drivers/inc/usbd_core.h index 7587de2a..916eb154 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb device core header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usbd_int.h b/middlewares/usb_drivers/inc/usbd_int.h index eafccedd..83e16bc5 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 c78275f0..b1ba67ba 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 43a8003f..a7cc2fb3 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host core header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/inc/usbh_ctrl.h b/middlewares/usb_drivers/inc/usbh_ctrl.h index de66a54a..2ffea3df 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 8b4cb78b..13b1095e 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 b4fdfff7..4c9ea7ca 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 60f48b57..86f2bc06 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 eb6021ca..6d39fbac 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 52177beb..53bc7bda 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 fcd0dbce..8eea88df 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host driver ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbh_ctrl.c b/middlewares/usb_drivers/src/usbh_ctrl.c index 020b397b..ed6d0fa5 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host control request ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usb_drivers/src/usbh_int.c b/middlewares/usb_drivers/src/usbh_int.c index 370dd0a3..55ef5ed7 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host interrupt request ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_class.c b/middlewares/usbd_class/audio/audio_class.c index bc4a833f..297ae03b 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_class.h b/middlewares/usbd_class/audio/audio_class.h index b6fe7e0d..8137ff43 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_conf.h b/middlewares/usbd_class/audio/audio_conf.h index 7dc097a4..53e37986 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 affa8070..d81886e5 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio/audio_desc.h b/middlewares/usbd_class/audio/audio_desc.h index 83456a9d..9d7e6e1f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_conf.h b/middlewares/usbd_class/audio_hid/audio_conf.h index 9a736e77..3f7884f2 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 5499ad82..6b9572fb 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_class.h b/middlewares/usbd_class/audio_hid/audio_hid_class.h index 61a0ba88..21ff9784 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.c b/middlewares/usbd_class/audio_hid/audio_hid_desc.c index 095b0bb0..c93ee3f2 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/audio_hid/audio_hid_desc.h b/middlewares/usbd_class/audio_hid/audio_hid_desc.h index 1e978f7c..a93f2e3f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb audio descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_class.c b/middlewares/usbd_class/cdc/cdc_class.c index 78a83bd9..3d2fdf7c 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_class.h b/middlewares/usbd_class/cdc/cdc_class.h index 8cdf35ed..bc355902 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_desc.c b/middlewares/usbd_class/cdc/cdc_desc.c index f9d17043..f856c081 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/cdc/cdc_desc.h b/middlewares/usbd_class/cdc/cdc_desc.h index f6d07689..2cc45e07 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc descriptor header file ************************************************************************** * Copyright notice & Disclaimer 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 f5d3355a..ff18dcd6 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc and keyboard class type ************************************************************************** * Copyright notice & Disclaimer 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 a602acb9..b95d08d0 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc and keyboard class file ************************************************************************** * Copyright notice & Disclaimer 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 3ad56186..bc7031df 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc and keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer 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 74dc8f95..676f3c7f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc and keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c new file mode 100644 index 00000000..9f6d2f01 --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.c @@ -0,0 +1,578 @@ +/** + ************************************************************************** + * @file cdc_msc_class.c + * @version v2.0.9 + * @date 2022-06-28 + * @brief usb cdc class type + ************************************************************************** + * 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 "usbd_core.h" +#include "cdc_msc_class.h" +#include "cdc_msc_desc.h" + +/** @addtogroup AT32F435_437_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_cdc_msc_class + * @brief usb device class cdc msc demo + * @{ + */ + +/** @defgroup USB_cdc_class_private_functions + * @{ + */ + +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_struct_init(cdc_msc_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); + +static usb_sts_type cdc_class_setup_handler(void *udev, usb_setup_type *setup); +static usb_sts_type msc_class_setup_handler(void *udev, usb_setup_type *setup); + +linecoding_type linecoding = +{ + 115200, + 0, + 0, + 8 +}; + +/* cdc data struct */ +cdc_msc_struct_type cdc_msc_struct; + +/* usb device class handler */ +usbd_class_handler cdc_msc_class_handler = +{ + class_init_handler, + class_clear_handler, + class_setup_handler, + class_ept0_tx_handler, + class_ept0_rx_handler, + class_in_handler, + class_out_handler, + class_sof_handler, + class_event_handler, + &cdc_msc_struct //cdc_struct +}; +/** + * @brief initialize usb custom hid endpoint + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_init_handler(void *udev) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdcmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + /* init cdc struct */ + cdc_struct_init(pcdcmsc); + + /* open in endpoint */ + 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_CDC_MSC_IN_MAXPACKET_SIZE); + + /* open out endpoint */ + usbd_ept_open(pudev, USBD_CDC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + /* set out endpoint to receive status */ + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdcmsc->g_rx_buff, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + /* open in endpoint */ + usbd_ept_open(pudev, USBD_MSC_BULK_IN_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_IN_MAXPACKET_SIZE); + + /* open out endpoint */ + usbd_ept_open(pudev, USBD_MSC_BULK_OUT_EPT, EPT_BULK_TYPE, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + bot_scsi_init(udev); + + return status; +} + +/** + * @brief clear endpoint or other state + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +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); + + /* close in endpoint */ + usbd_ept_close(pudev, USBD_CDC_BULK_IN_EPT); + + /* close out endpoint */ + usbd_ept_close(pudev, USBD_CDC_BULK_OUT_EPT); + + /* close in endpoint */ + usbd_ept_close(pudev, USBD_MSC_BULK_IN_EPT); + + /* close out endpoint */ + usbd_ept_close(pudev, USBD_MSC_BULK_OUT_EPT); + + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: to the structure of usbd_core_type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +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 == VCPMSC_MSC_INTERFACE) + { + msc_class_setup_handler(udev, setup); + } + else + { + cdc_class_setup_handler(pudev, setup); + } + break; + case USB_REQ_RECIPIENT_ENDPOINT: + if(setup->wIndex == (USBD_MSC_BULK_IN_EPT | USBD_MSC_BULK_OUT_EPT)) + { + msc_class_setup_handler(udev, setup); + } + else + { + cdc_class_setup_handler(pudev, setup); + } + break; + + } + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: to the structure of usbd_core_type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +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; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) + { + /* class request */ + case USB_REQ_TYPE_CLASS: + if(setup->wLength) + { + if(setup->bmRequestType & USB_REQ_DIR_DTH) + { + usb_vcp_cmd_process(udev, setup->bRequest, pcdc->g_cmd, setup->wLength); + usbd_ctrl_send(pudev, pcdc->g_cmd, setup->wLength); + } + else + { + pcdc->g_req = setup->bRequest; + pcdc->g_len = setup->wLength; + usbd_ctrl_recv(pudev, pcdc->g_cmd, pcdc->g_len); + + } + } + break; + /* standard request */ + case USB_REQ_TYPE_STANDARD: + switch(setup->bRequest) + { + case USB_STD_REQ_GET_DESCRIPTOR: + usbd_ctrl_unsupport(pudev); + break; + case USB_STD_REQ_GET_INTERFACE: + usbd_ctrl_send(pudev, (uint8_t *)&pcdc->alt_setting, 1); + break; + case USB_STD_REQ_SET_INTERFACE: + pcdc->alt_setting = setup->wValue; + break; + default: + break; + } + break; + default: + usbd_ctrl_unsupport(pudev); + break; + } + return status; +} + +/** + * @brief usb device class setup request handler + * @param udev: to the structure of usbd_core_type + * @param setup: setup packet + * @retval status of usb_sts_type + */ +static usb_sts_type msc_class_setup_handler(void *udev, usb_setup_type *setup) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(setup->bmRequestType & USB_REQ_TYPE_RESERVED) + { + /* class request */ + case USB_REQ_TYPE_CLASS: + + switch(setup->bRequest) + { + case MSC_REQ_GET_MAX_LUN: + usbd_ctrl_send(pudev, (uint8_t *)&cdc_msc_struct.max_lun, 1); + break; + case MSC_REQ_BO_RESET: + bot_scsi_reset(udev); + usbd_ctrl_send_status(pudev); + break; + default: + usbd_ctrl_unsupport(pudev); + break; + + } + break; + /* standard request */ + case USB_REQ_TYPE_STANDARD: + + switch(setup->bRequest) + { + case USB_STD_REQ_GET_DESCRIPTOR: + usbd_ctrl_unsupport(pudev); + break; + case USB_STD_REQ_GET_INTERFACE: + usbd_ctrl_send(pudev, (uint8_t *)&pmsc->alt_setting, 1); + break; + case USB_STD_REQ_SET_INTERFACE: + 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) + { + usbd_flush_tx_fifo(pudev, setup->wIndex & 0x7F); + usbd_ept_open(pudev, (uint8_t)setup->wIndex, EPT_BULK_TYPE, USBD_CDC_MSC_IN_MAXPACKET_SIZE); + } + else + { + usbd_ept_open(pudev, (uint8_t)setup->wIndex, EPT_BULK_TYPE, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + } + bot_scsi_clear_feature(udev, setup->wIndex); + break; + default: + break; + } + break; + default: + usbd_ctrl_unsupport(pudev); + break; + } + return status; +} + +/** + * @brief usb device endpoint 0 in status stage complete + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_ept0_tx_handler(void *udev) +{ + usb_sts_type status = USB_OK; + + /* ...user code... */ + + return status; +} + +/** + * @brief usb device endpoint 0 out status stage complete + * @param udev: usb device core handler type + * @retval status of usb_sts_type + */ +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_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint32_t recv_len = usbd_get_recv_len(pudev, 0); + /* ...user code... */ + if( pcdc->g_req == SET_LINE_CODING) + { + /* class process */ + usb_vcp_cmd_process(udev, pcdc->g_req, pcdc->g_cmd, recv_len); + } + + return status; +} + +/** + * @brief usb device transmision complete handler + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval status of usb_sts_type + */ +static usb_sts_type class_in_handler(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdcmsc = (cdc_msc_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); + + if((ept_num & 0x7F) == (USBD_CDC_BULK_IN_EPT & 0x7F)) + { + pcdcmsc->g_tx_completed = 1; + } + if((ept_num & 0x7F) == (USBD_MSC_BULK_IN_EPT & 0x7F)) + { + bot_scsi_datain_handler(udev, ept_num); + } + + return status; +} + +/** + * @brief usb device endpoint receive data + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval status of usb_sts_type + */ +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_msc_struct_type *pcdcmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + + + if((ept_num & 0x7F) == (USBD_CDC_BULK_OUT_EPT & 0x7F)) + { + /* get endpoint receive data length */ + pcdcmsc->g_rxlen = usbd_get_recv_len(pudev, ept_num); + + /*set recv flag*/ + pcdcmsc->g_rx_completed = 1; + } + if((ept_num & 0x7F) == (USBD_MSC_BULK_OUT_EPT & 0x7F)) + { + bot_scsi_dataout_handler(udev, ept_num); + } + + return status; +} + +/** + * @brief usb device sof handler + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +static usb_sts_type class_sof_handler(void *udev) +{ + usb_sts_type status = USB_OK; + + /* ...user code... */ + + return status; +} + +/** + * @brief usb device event handler + * @param udev: to the structure of usbd_core_type + * @param event: usb device event + * @retval status of usb_sts_type + */ +static usb_sts_type class_event_handler(void *udev, usbd_event_type event) +{ + usb_sts_type status = USB_OK; + switch(event) + { + case USBD_RESET_EVENT: + + /* ...user code... */ + + break; + case USBD_SUSPEND_EVENT: + + /* ...user code... */ + + break; + case USBD_WAKEUP_EVENT: + /* ...user code... */ + + break; + case USBD_INISOINCOM_EVENT: + break; + case USBD_OUTISOINCOM_EVENT: + break; + + default: + break; + } + 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_msc_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 + * @param recv_data: receive buffer + * @retval receive data len + */ +uint16_t usb_vcp_get_rxdata(void *udev, uint8_t *recv_data) +{ + uint16_t i_index = 0; + uint16_t tmp_len = 0; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + if(pcdc->g_rx_completed == 0) + { + return 0; + } + 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] = pcdc->g_rx_buff[i_index]; + } + + usbd_ept_recv(pudev, USBD_CDC_BULK_OUT_EPT, pcdc->g_rx_buff, USBD_CDC_MSC_OUT_MAXPACKET_SIZE); + + return tmp_len; +} + +/** + * @brief usb device class send data + * @param udev: to the structure of usbd_core_type + * @param send_data: send data buffer + * @param len: send length + * @retval error status + */ +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; + cdc_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + if(pcdc->g_tx_completed) + { + pcdc->g_tx_completed = 0; + usbd_ept_send(pudev, USBD_CDC_BULK_IN_EPT, send_data, len); + } + else + { + status = ERROR; + } + return status; +} + +/** + * @brief usb device function + * @param udev: to the structure of usbd_core_type + * @param cmd: request number + * @param buff: request buffer + * @param len: buffer length + * @retval none + */ +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_msc_struct_type *pcdc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(cmd) + { + case SET_LINE_CODING: + 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)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: + break; + } +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ + diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h new file mode 100644 index 00000000..ec57aa5b --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_class.h @@ -0,0 +1,338 @@ +/** + ************************************************************************** + * @file cdc_msc_class.h + * @version v2.0.9 + * @date 2022-06-28 + * @brief usb cdc class 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 __CDC_MSC_CLASS_H +#define __CDC_MSC_CLASS_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "usb_std.h" +#include "usbd_core.h" + +/** @addtogroup AT32F435_437_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_cdc_msc_class + * @{ + */ + +/** @defgroup USB_cdc_class_definition + * @{ + */ + +/** + * @brief usb cdc use endpoint define + */ +#define USBD_CDC_INT_EPT 0x82 +#define USBD_CDC_BULK_IN_EPT 0x83 +#define USBD_CDC_BULK_OUT_EPT 0x02 + +#define USBD_MSC_BULK_IN_EPT 0x81 +#define USBD_MSC_BULK_OUT_EPT 0x01 + +/** + * @brief usb cdc in and out max packet size define + */ +#define USBD_CDC_MSC_IN_MAXPACKET_SIZE 0x40 + +#define USBD_CDC_MSC_OUT_MAXPACKET_SIZE 0x40 +#define USBD_CDC_CMD_MAXPACKET_SIZE 0x08 + + + + +/** + * @} + */ + +/** @defgroup USB_cdc_class_exported_types + * @{ + */ + +/** @defgroup USB_msc_bot_scsi_definition + * @{ + */ + +#define MSC_SUPPORT_MAX_LUN 1 +#define MSC_MAX_DATA_BUF_LEN 4096 + +#define MSC_CMD_FORMAT_UNIT 0x04 +#define MSC_CMD_INQUIRY 0x12 +#define MSC_CMD_START_STOP 0x1B +#define MSC_CMD_MODE_SENSE6 0x1A +#define MSC_CMD_MODE_SENSE10 0x5A +#define MSC_CMD_ALLOW_MEDIUM_REMOVAL 0x1E +#define MSC_CMD_READ_10 0x28 +#define MSC_CMD_READ_12 0xA8 +#define MSC_CMD_READ_CAPACITY 0x25 +#define MSC_CMD_READ_FORMAT_CAPACITY 0x23 +#define MSC_CMD_REQUEST_SENSE 0x03 +#define MSC_CMD_TEST_UNIT 0x00 +#define MSC_CMD_VERIFY 0x2F +#define MSC_CMD_WRITE_10 0x2A +#define MSC_CMD_WRITE_12 0xAA +#define MSC_CMD_WRITE_VERIFY 0x2E + +#define MSC_REQ_GET_MAX_LUN 0xFE /*!< get max lun */ +#define MSC_REQ_BO_RESET 0xFF /*!< bulk only mass storage reset */ + +#define SET_LINE_CODING 0x20 +#define GET_LINE_CODING 0x21 + +#define CBW_CMD_LENGTH 31 +#define CBW_DCBWSIGNATURE 0x43425355 +#define CBW_BMCBWFLAGS_DIR_OUT 0x00 +#define CBW_BMCBWFLAGS_DIR_IN 0x80 + +#define CSW_CMD_LENGTH 13 +#define CSW_DCSWSIGNATURE 0x53425355 +#define CSW_BCSWSTATUS_PASS 0x00 +#define CSW_BCSWSTATUS_FAILED 0x01 +#define CSW_BCSWSTATUS_PHASE_ERR 0x02 + +#define MSC_STATE_MACHINE_CMD 0x00 +#define MSC_STATE_MACHINE_DATA_IN 0x01 +#define MSC_STATE_MACHINE_DATA_OUT 0x02 +#define MSC_STATE_MACHINE_SEND_DATA 0x03 +#define MSC_STATE_MACHINE_LAST_DATA 0x04 +#define MSC_STATE_MACHINE_STATUS 0x05 +#define MSC_STATE_MACHINE_FAILED 0x06 +#define MSC_STATE_MACHINE_IDLE 0x07 + +#define MSC_BOT_STATE_IDLE 0x00 +#define MSC_BOT_STATE_RECOVERY 0x01 +#define MSC_BOT_STATE_ERROR 0x02 + +#define REQ_SENSE_STANDARD_DATA_LEN 0x12 +#define SENSE_KEY_NO_SENSE 0x00 +#define SENSE_KEY_RECOVERED_ERROR 0x01 +#define SENSE_KEY_NOT_READY 0x02 +#define SENSE_KEY_MEDIUM_ERROR 0x03 +#define SENSE_KEY_HARDWARE_ERROR 0x04 +#define SENSE_KEY_ILLEGAL_REQUEST 0x05 +#define SENSE_KEY_UNIT_ATTENTION 0x06 +#define SENSE_KEY_DATA_PROTECT 0x07 +#define SENSE_KEY_BLANK_CHECK 0x08 +#define SENSE_KEY_VENDERO_SPECIFIC 0x09 +#define SENSE_KEY_ABORTED_COMMAND 0x0B +#define SENSE_KEY_VOLUME_OVERFLOW 0x0D +#define SENSE_KEY_MISCOMPARE 0x0E + + +#define INVALID_COMMAND 0x20 +#define INVALID_FIELED_IN_COMMAND 0x24 +#define PARAMETER_LIST_LENGTH_ERROR 0x1A +#define INVALID_FIELD_IN_PARAMETER_LIST 0x26 +#define ADDRESS_OUT_OF_RANGE 0x21 +#define MEDIUM_NOT_PRESENT 0x3A +#define MEDIUM_HAVE_CHANGED 0x28 + +#define SCSI_INQUIRY_DATA_LENGTH 36 + +/** + * @brief typical command block description + */ +typedef struct +{ + uint8_t opcode; + uint8_t lun; + uint32_t address; + uint8_t reserved1; + uint32_t alloc_length; + uint16_t reserved2; +}cbd_typical_type; + +/** + * @brief extended command block description + */ +typedef struct +{ + uint8_t opcode; + uint8_t lun; + uint32_t address; + uint8_t reserved1; + uint32_t alloc_length; + uint16_t reserved2; +}cbd_extended_type; + +/** + * @brief command block wrapper + */ +typedef struct +{ + uint32_t dCBWSignature; + uint32_t dCBWTage; + uint32_t dCBWDataTransferLength; + uint8_t bmCBWFlags; + uint8_t bCBWLUN; + uint8_t bCBWCBLength; + uint8_t CBWCB[16]; +}cbw_type; + +/** + * @brief command block wrapper + */ +typedef struct +{ + uint32_t dCSWSignature; + uint32_t dCSWTag; + uint32_t dCSWDataResidue; + uint32_t bCSWStatus; +}csw_type; + +/** + * @brief request sense standard data + */ +typedef struct +{ + uint8_t err_code; + uint8_t reserved1; + uint8_t sense_key; + uint32_t information; + uint8_t as_length; + uint32_t reserved2; + uint8_t asc; + uint8_t ascq; + uint32_t reserved3; +}sense_type; + + +typedef struct +{ + uint8_t msc_state; + uint8_t bot_status; + uint32_t max_lun; + + uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN]; + uint32_t blk_size[MSC_SUPPORT_MAX_LUN]; + + uint32_t blk_addr; + uint32_t blk_len; + + 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; + +/** + * @brief usb cdc class struct + */ +typedef struct +{ + //used for CDC + uint32_t alt_setting; + uint8_t g_rx_buff[USBD_CDC_MSC_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; + + //used for MSC + uint8_t msc_state; + uint8_t bot_status; + uint32_t max_lun; + + uint32_t blk_nbr[MSC_SUPPORT_MAX_LUN]; + uint32_t blk_size[MSC_SUPPORT_MAX_LUN]; + + uint32_t blk_addr; + uint32_t blk_len; + + uint32_t data_len; + uint8_t data[MSC_MAX_DATA_BUF_LEN]; + + cbw_type cbw_struct; + csw_type csw_struct; +}cdc_msc_struct_type; //cdc_struct_type; + + +/** + * @} + */ + +/** @defgroup USB_cdc_msc_class_exported_functions + * @{ + */ +extern usbd_class_handler cdc_msc_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); + +void bot_scsi_init(void *udev); +void bot_scsi_reset(void *udev); +void bot_scsi_datain_handler(void *pudev, uint8_t ept_num); +void bot_scsi_dataout_handler(void *pudev, uint8_t ept_num); +void bot_cbw_decode(void *udev); +void bot_scsi_send_data(void *udev, uint8_t *buffer, uint32_t len); +void bot_scsi_send_csw(void *udev, uint8_t status); +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); +void bot_scsi_stall(void *udev); +usb_sts_type bot_scsi_cmd_process(void *udev); + +usb_sts_type bot_scsi_test_unit(void *udev, uint8_t lun); +usb_sts_type bot_scsi_inquiry(void *udev, uint8_t lun); +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); +usb_sts_type bot_scsi_mode_sense6(void *udev, uint8_t lun); +usb_sts_type bot_scsi_mode_sense10(void *udev, uint8_t lun); +usb_sts_type bot_scsi_read10(void *udev, uint8_t lun); +usb_sts_type bot_scsi_capacity(void *udev, uint8_t lun); +usb_sts_type bot_scsi_format_capacity(void *udev, uint8_t lun); +usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun); +usb_sts_type bot_scsi_verify(void *udev, uint8_t lun); +usb_sts_type bot_scsi_write10(void *udev, uint8_t lun); +void bot_scsi_clear_feature(void *udev, uint8_t ept_num); + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif + + + + diff --git a/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c new file mode 100644 index 00000000..6b6e22bf --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.c @@ -0,0 +1,498 @@ +/** + ************************************************************************** + * @file cdc_msc_desc.c + * @version v2.0.9 + * @date 2022-06-28 + * @brief usb cdc device descriptor + ************************************************************************** + * 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 "stdio.h" +#include "usb_std.h" +#include "usbd_sdr.h" +#include "usbd_core.h" +#include "cdc_msc_desc.h" + +/** @addtogroup AT32F435_437_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_cdc_msc_desc + * @brief usb device cdc msc descriptor + * @{ + */ + +/** @defgroup USB_cdc_msc_desc_private_functions + * @{ + */ + +#define USB_INTERFACE_ASSOCIATION_TYPE 0x0B + +static usbd_desc_t *get_device_descriptor(void); +static usbd_desc_t *get_device_qualifier(void); +static usbd_desc_t *get_device_configuration(void); +static usbd_desc_t *get_device_other_speed(void); +static usbd_desc_t *get_device_lang_id(void); +static usbd_desc_t *get_device_manufacturer_string(void); +static usbd_desc_t *get_device_product_string(void); +static usbd_desc_t *get_device_serial_string(void); +static usbd_desc_t *get_device_interface_string(void); +static usbd_desc_t *get_device_config_string(void); + +static uint16_t usbd_unicode_convert(uint8_t *string, uint8_t *unicode_buf); +static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len); +static void get_serial_num(void); +static uint8_t g_usbd_desc_buffer[256]; + +/** + * @brief device descriptor handler structure + */ +usbd_desc_handler cdc_msc_desc_handler = +{ + get_device_descriptor, + get_device_qualifier, + get_device_configuration, + get_device_other_speed, + get_device_lang_id, + get_device_manufacturer_string, + get_device_product_string, + get_device_serial_string, + get_device_interface_string, + get_device_config_string, +}; + +/** + * @brief usb device standard descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_usbd_descriptor[USB_DEVICE_DESC_LEN] ALIGNED_TAIL = +{ + USB_DEVICE_DESC_LEN, /* bLength */ + USB_DESCIPTOR_TYPE_DEVICE, /* bDescriptorType */ + 0x00, /* bcdUSB */ + 0x02, + 0xEF, /* bDeviceClass */ + 0x02, /* bDeviceSubClass */ + 0x01, /* bDeviceProtocol */ + USB_MAX_EP0_SIZE, /* bMaxPacketSize */ + LBYTE(USBD_CDC_MSC_VENDOR_ID), /* idVendor */ + HBYTE(USBD_CDC_MSC_VENDOR_ID), /* idVendor */ + LBYTE(USBD_CDC_MSC_PRODUCT_ID), /* idProduct */ + HBYTE(USBD_CDC_MSC_PRODUCT_ID), /* idProduct */ + 0x00, /* bcdDevice rel. 2.00 */ + 0x02, + USB_MFC_STRING, /* Index of manufacturer string */ + USB_PRODUCT_STRING, /* Index of product string */ + USB_SERIAL_STRING, /* Index of serial number string */ + 1 /* bNumConfigurations */ +}; + +/** + * @brief usb configuration standard descriptor + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_usbd_configuration[USBD_CDC_MSC_CONFIG_DESC_SIZE] ALIGNED_TAIL = +{ + USB_DEVICE_CFG_DESC_LEN, /* bLength: configuration descriptor size */ + USB_DESCIPTOR_TYPE_CONFIGURATION, /* bDescriptorType: configuration */ + LBYTE(USBD_CDC_MSC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + HBYTE(USBD_CDC_MSC_CONFIG_DESC_SIZE), /* wTotalLength: bytes returned */ + 0x03, /* bNumInterfaces: 3 interface */ + 0x01, /* bConfigurationValue: configuration value */ + 0x00, /* iConfiguration: index of string descriptor describing + the configuration */ + 0xC0, /* bmAttributes: self powered */ + 0x32, /* MaxPower 100 mA: this current is used for detecting vbus */ + + // IAD (Interface Association Descriptor) for MSC + 0x08, /* bLength */ + USB_INTERFACE_ASSOCIATION_TYPE, /* bDescriptorType */ + 0x00, /* bFirstInterface */ + 0x01, /* bInterfaceCount */ + 0x08, /* bFunctionClass */ + 0x06, /* bFunctionSubClass */ + 0x50, /* bFunctionProtocol */ + 0x00, /* iFunction (Index of string descriptor describing this function) */ + + // Configuration Descriptor for MSC + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + VCPMSC_MSC_INTERFACE, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x02, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_MSC, /* bInterfaceClass: msc class code */ + 0x06, /* bInterfaceSubClass: subclass code scsi */ + 0x50, /* bInterfaceProtocol: protocol code BBB */ + 0x00, /* iInterface: index of string descriptor */ + + USB_DEVICE_EPT_LEN, /* bLength: size of endpoint descriptor in bytes */ + USB_DESCIPTOR_TYPE_ENDPOINT, /* bDescriptorType: endpoint descriptor type */ + USBD_MSC_BULK_IN_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_IN_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_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_MSC_BULK_OUT_EPT, /* bEndpointAddress: the address of endpoint on usb device described by this descriptor */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE), /* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ + + // IAD (Interface Association Descriptor) for CDC + 0x08, /* bLength */ + USB_INTERFACE_ASSOCIATION_TYPE, /* bDescriptorType */ + 0x01, /* bFirstInterface */ + 0x02, /* bInterfaceCount */ + USB_CLASS_CODE_CDC, /* bFunctionClass */ + 0x02, /* bFunctionSubClass */ + 0x01, /* bFunctionProtocol */ + 0x00, /* iFunction (Index of string descriptor describing this function) */ + + // Configuration Descriptor for CDC + USB_DEVICE_IF_DESC_LEN, /* bLength: interface descriptor size */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + VCPMSC_CDC_INTERFACE, /* bInterfaceNumber: number of interface */ + 0x00, /* bAlternateSetting: alternate set */ + 0x01, /* bNumEndpoints: number of endpoints */ + USB_CLASS_CODE_CDC, /* bInterfaceClass: CDC class code */ + 0x02, /* bInterfaceSubClass: subclass code, Abstract Control Model*/ + 0x01, /* bInterfaceProtocol: protocol code, AT Command */ + 0x00, /* iInterface: index of string descriptor */ + + 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(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 */ + USBD_CDC_SUBTYPE_CMF, /* bDescriptorSubtype: Call Management function descriptor subtype 0x01 */ + 0x00, /* bmCapabilities: 0x00*/ + 0x01, /* bDataInterface: interface number of data class interface optionally used for call management */ + + 0x04, /* bFunctionLength: size of this descriptor in bytes */ + USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ + USBD_CDC_SUBTYPE_ACM, /* bDescriptorSubtype: Abstract Control Management functional descriptor subtype 0x02 */ + 0x02, /* bmCapabilities: Support Set_Line_Coding and Get_Line_Coding 0x02 */ + + 0x05, /* bFunctionLength: size of this descriptor in bytes */ + USBD_CDC_CS_INTERFACE, /* bDescriptorType: CDC interface descriptor type */ + USBD_CDC_SUBTYPE_UFD, /* bDescriptorSubtype: Union Function Descriptor subtype 0x06 */ + 0x00, /* bControlInterface: The interface number of the communications or data class interface 0x00 */ + 0x01, /* bSubordinateInterface0: interface number of first subordinate interface in the union */ + + 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 */ + USB_EPT_DESC_INTERRUPT, /* bmAttributes: endpoint attributes */ + 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 */ + USB_DESCIPTOR_TYPE_INTERFACE, /* bDescriptorType: interface descriptor type */ + VCPMSC_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 */ + 0x00, /* bInterfaceSubClass: Data interface subclass code 0x00*/ + 0x00, /* bInterfaceProtocol: data class protocol code 0x00 */ + 0x00, /* iInterface: index of string descriptor */ + + 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 */ + USB_EPT_DESC_BULK, /* bmAttributes: endpoint attributes */ + LBYTE(USBD_CDC_MSC_IN_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_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_CDC_MSC_OUT_MAXPACKET_SIZE), + HBYTE(USBD_CDC_MSC_OUT_MAXPACKET_SIZE),/* wMaxPacketSize: maximum packe size this endpoint */ + 0x00, /* bInterval: interval for polling endpoint for data transfers */ + + +}; + +/** + * @brief usb string lang id + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_string_lang_id[USBD_CDC_SIZ_STRING_LANGID] ALIGNED_TAIL = +{ + USBD_CDC_SIZ_STRING_LANGID, + USB_DESCIPTOR_TYPE_STRING, + 0x09, + 0x04, +}; + +/** + * @brief usb string serial + */ +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD static uint8_t g_string_serial[USBD_CDC_SIZ_STRING_SERIAL] ALIGNED_TAIL = +{ + USBD_CDC_SIZ_STRING_SERIAL, + USB_DESCIPTOR_TYPE_STRING, +}; + + +/* device descriptor */ +static usbd_desc_t device_descriptor = +{ + USB_DEVICE_DESC_LEN, + g_usbd_descriptor +}; + +/* config descriptor */ +static usbd_desc_t config_descriptor = +{ + USBD_CDC_MSC_CONFIG_DESC_SIZE, + g_usbd_configuration +}; + +/* langid descriptor */ +static usbd_desc_t langid_descriptor = +{ + USBD_CDC_SIZ_STRING_LANGID, + g_string_lang_id +}; + +/* serial descriptor */ +static usbd_desc_t serial_descriptor = +{ + USBD_CDC_SIZ_STRING_SERIAL, + g_string_serial +}; + +static usbd_desc_t vp_desc; + +/** + * @brief standard usb unicode convert + * @param string: source string + * @param unicode_buf: unicode buffer + * @retval length + */ +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; + + while(*tmp_str != '\0') + { + str_len ++; + unicode_buf[id_pos ++] = *tmp_str ++; + unicode_buf[id_pos ++] = 0x00; + } + + str_len = str_len * 2 + 2; + unicode_buf[0] = (uint8_t)str_len; + unicode_buf[1] = USB_DESCIPTOR_TYPE_STRING; + + return str_len; +} + +/** + * @brief usb int convert to unicode + * @param value: int value + * @param pbus: unicode buffer + * @param len: length + * @retval none + */ +static void usbd_int_to_unicode (uint32_t value , uint8_t *pbuf , uint8_t len) +{ + uint8_t idx = 0; + + for( idx = 0 ; idx < len ; idx ++) + { + if( ((value >> 28)) < 0xA ) + { + pbuf[ 2 * idx] = (value >> 28) + '0'; + } + else + { + pbuf[2 * idx] = (value >> 28) + 'A' - 10; + } + + value = value << 4; + + pbuf[2 * idx + 1] = 0; + } +} + +/** + * @brief usb get serial number + * @param none + * @retval none + */ +static void get_serial_num(void) +{ + uint32_t serial0, serial1, serial2; + + serial0 = *(uint32_t*)MCU_ID1; + serial1 = *(uint32_t*)MCU_ID2; + serial2 = *(uint32_t*)MCU_ID3; + + serial0 += serial2; + + if (serial0 != 0) + { + usbd_int_to_unicode (serial0, &g_string_serial[2] ,8); + usbd_int_to_unicode (serial1, &g_string_serial[18] ,4); + } +} + +/** + * @brief get device descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_descriptor(void) +{ + return &device_descriptor; +} + +/** + * @brief get device qualifier + * @param none + * @retval usbd_desc + */ +static usbd_desc_t * get_device_qualifier(void) +{ + return NULL; +} + +/** + * @brief get config descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_configuration(void) +{ + return &config_descriptor; +} + +/** + * @brief get other speed descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_other_speed(void) +{ + return NULL; +} + +/** + * @brief get lang id descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_lang_id(void) +{ + return &langid_descriptor; +} + + +/** + * @brief get manufacturer descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_manufacturer_string(void) +{ + 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; +} + +/** + * @brief get product descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_product_string(void) +{ + 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; +} + +/** + * @brief get serial descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_serial_string(void) +{ + get_serial_num(); + return &serial_descriptor; +} + +/** + * @brief get interface descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_interface_string(void) +{ + 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; +} + +/** + * @brief get device config descriptor + * @param none + * @retval usbd_desc + */ +static usbd_desc_t *get_device_config_string(void) +{ + 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/composite_cdc_msc/cdc_msc_desc.h b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.h new file mode 100644 index 00000000..dbecff77 --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/cdc_msc_desc.h @@ -0,0 +1,113 @@ +/** + ************************************************************************** + * @file cdc_msc_desc.h + * @version v2.0.9 + * @date 2022-06-28 + * @brief usb cdc descriptor 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 __CDC_MSC_DESC_H +#define __CDC_MSC_DESC_H + +#ifdef __cplusplus +extern "C" { +#endif + +#include "cdc_msc_class.h" +#include "usbd_core.h" + +/** @addtogroup AT32F435_437_middlewares_usbd_class + * @{ + */ + +/** @addtogroup USB_cdc_msc_desc + * @{ + */ + +/** @defgroup USB_cdc_desc_definition + * @{ + */ +/** + * @brief usb bcd number define + */ +#define CDC_BCD_NUM 0x0110 + +/** + * @brief usb vendor id and product id define + */ +#define USBD_CDC_MSC_VENDOR_ID 0x2E3C +#define USBD_CDC_MSC_PRODUCT_ID 0x5760 + +/** + * @brief usb descriptor size define + */ + +#define USBD_CDC_MSC_CONFIG_DESC_SIZE 106 +#define USBD_CDC_SIZ_STRING_LANGID 4 +#define USBD_CDC_SIZ_STRING_SERIAL 0x1A + +/** + * @brief usb string define(vendor, product configuration, interface) + */ +#define USBD_CDC_DESC_MANUFACTURER_STRING "Artery" +#define USBD_CDC_DESC_PRODUCT_STRING "AT32 Composite VCP and MSC " +#define USBD_CDC_DESC_CONFIGURATION_STRING "Composite VCP and MSC Config" +#define USBD_CDC_DESC_INTERFACE_STRING "Composite VCP and MSC Interface" + +/** + * @brief usb endpoint interval define + */ +#define CDC_HID_BINTERVAL_TIME 0xFF + +/** + * @brief usb interface define + */ +#define VCPMSC_MSC_INTERFACE 0x00 +#define VCPMSC_CDC_INTERFACE 0x01 +#define VCPMSC_CDC_DATA_INTERFACE 0x02 + + +/** + * @brief usb mcu id address deine + */ +#define MCU_ID1 (0x1FFFF7E8) +#define MCU_ID2 (0x1FFFF7EC) +#define MCU_ID3 (0x1FFFF7F0) +/** + * @} + */ + +extern usbd_desc_handler cdc_msc_desc_handler; + + +/** + * @} + */ + +/** + * @} + */ +#ifdef __cplusplus +} +#endif + +#endif diff --git a/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c b/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c new file mode 100644 index 00000000..0ba48f2d --- /dev/null +++ b/middlewares/usbd_class/composite_cdc_msc/msc_bot_scsi.c @@ -0,0 +1,826 @@ +/** + ************************************************************************** + * @file msc_bot_scsi.c + * @version v2.0.9 + * @date 2022-06-28 + * @brief usb mass storage bulk-only transport and scsi command + ************************************************************************** + * 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 "cdc_msc_class.h" +#include "msc_diskio.h" + +/** @addtogroup AT32F435_437_middlewares_usbd_class + * @{ + */ + +/** @defgroup USB_msc_bot_scsi + * @brief usb device class mass storage demo + * @{ + */ + +/** @defgroup USB_msc_bot_functions + * @{ + */ + + +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t page00_inquiry_data[] ALIGNED_TAIL = { + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + +}; +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD sense_type sense_data ALIGNED_TAIL = +{ + 0x70, + 0x00, + SENSE_KEY_ILLEGAL_REQUEST, + 0x00000000, + 0x0A, + 0x00000000, + 0x20, + 0x00, + 0x00000000 +}; + +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t mode_sense6_data[8] ALIGNED_TAIL = +{ + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00 +}; + +#if defined ( __ICCARM__ ) /* iar compiler */ + #pragma data_alignment=4 +#endif +ALIGNED_HEAD uint8_t mode_sense10_data[8] ALIGNED_TAIL = +{ + 0x00, + 0x06, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00, + 0x00 +}; +/** + * @brief initialize bulk-only transport and scsi + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_scsi_init(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->msc_state = MSC_STATE_MACHINE_IDLE; + pmsc->bot_status = MSC_BOT_STATE_IDLE; + pmsc->max_lun = MSC_SUPPORT_MAX_LUN - 1; + + pmsc->csw_struct.dCSWSignature = CSW_DCSWSIGNATURE; + pmsc->csw_struct.dCSWDataResidue = 0; + pmsc->csw_struct.dCSWSignature = 0; + pmsc->csw_struct.dCSWTag = CSW_BCSWSTATUS_PASS; + + 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 *)&pmsc->cbw_struct, CBW_CMD_LENGTH); +} + +/** + * @brief reset bulk-only transport and scsi + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_scsi_reset(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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 *)&pmsc->cbw_struct, CBW_CMD_LENGTH); +} + +/** + * @brief bulk-only transport data in handler + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval none + */ +void bot_scsi_datain_handler(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(pmsc->msc_state) + { + case MSC_STATE_MACHINE_DATA_IN: + if(bot_scsi_cmd_process(udev) != USB_OK) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); + } + break; + + case MSC_STATE_MACHINE_LAST_DATA: + case MSC_STATE_MACHINE_SEND_DATA: + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); + break; + + default: + break; + } +} + +/** + * @brief bulk-only transport data out handler + * @param udev: to the structure of usbd_core_type + * @param ept_num: endpoint number + * @retval none + */ +void bot_scsi_dataout_handler(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(pmsc->msc_state) + { + case MSC_STATE_MACHINE_IDLE: + bot_cbw_decode(udev); + break; + + case MSC_STATE_MACHINE_DATA_OUT: + if(bot_scsi_cmd_process(udev) != USB_OK) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); + } + break; + } +} + +/** + * @brief bulk-only cbw decode + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_cbw_decode(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + pmsc->csw_struct.dCSWTag = pmsc->cbw_struct.dCBWTage; + pmsc->csw_struct.dCSWDataResidue = pmsc->cbw_struct.dCBWDataTransferLength; + + /* check param */ + if((pmsc->cbw_struct.dCBWSignature != CBW_DCBWSIGNATURE) || + (usbd_get_recv_len(pudev, USBD_MSC_BULK_OUT_EPT) != CBW_CMD_LENGTH) + || (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); + pmsc->bot_status = MSC_BOT_STATE_ERROR; + bot_scsi_stall(udev); + } + else + { + if(bot_scsi_cmd_process(udev) != USB_OK) + { + bot_scsi_stall(udev); + } + 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(pmsc->data_len == 0) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); + } + else if(pmsc->data_len > 0) + { + bot_scsi_send_data(udev, pmsc->data, pmsc->data_len); + } + } + } +} + +/** + * @brief send bot data + * @param udev: to the structure of usbd_core_type + * @param buffer: data buffer + * @param len: data len + * @retval none + */ +void bot_scsi_send_data(void *udev, uint8_t *buffer, uint32_t len) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint32_t data_len = MIN(len, pmsc->cbw_struct.dCBWDataTransferLength); + + pmsc->csw_struct.dCSWDataResidue -= data_len; + pmsc->csw_struct.bCSWStatus = CSW_BCSWSTATUS_PASS; + + pmsc->msc_state = MSC_STATE_MACHINE_SEND_DATA; + + usbd_ept_send(pudev, USBD_MSC_BULK_IN_EPT, + buffer, data_len); +} + +/** + * @brief send command status + * @param udev: to the structure of usbd_core_type + * @param status: csw status + * @retval none + */ +void bot_scsi_send_csw(void *udev, uint8_t status) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + 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 *)&pmsc->csw_struct, CSW_CMD_LENGTH); + + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, + (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); +} + + +/** + * @brief send scsi sense code + * @param udev: to the structure of usbd_core_type + * @param sense_key: sense key + * @param asc: asc + * @retval none + */ +void bot_scsi_sense_code(void *udev, uint8_t sense_key, uint8_t asc) +{ + sense_data.sense_key = sense_key; + sense_data.asc = asc; +} + + +/** + * @brief check address + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @param blk_offset: blk offset address + * @param blk_count: blk number + * @retval usb_sts_type + */ +usb_sts_type bot_scsi_check_address(void *udev, uint8_t lun, uint32_t blk_offset, uint32_t blk_count) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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; + } + return USB_OK; +} + +/** + * @brief bot endpoint stall + * @param udev: to the structure of usbd_core_type + * @retval none + */ +void bot_scsi_stall(void *udev) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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(pmsc->bot_status == MSC_BOT_STATE_ERROR) + { + usbd_ept_recv(pudev, USBD_MSC_BULK_OUT_EPT, + (uint8_t *)&pmsc->cbw_struct, CBW_CMD_LENGTH); + } +} + +/** + * @brief bulk-only transport scsi command test unit + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_test_unit(void *udev, uint8_t lun) +{ + usb_sts_type status = USB_OK; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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; + } + + pmsc->data_len = 0; + return status; +} + +/** + * @brief bulk-only transport scsi command inquiry + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +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; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + + if(pmsc->cbw_struct.CBWCB[1] & 0x01) + { + pdata = page00_inquiry_data; + trans_len = 5; + } + else + { + pdata = get_inquiry(lun); + if(pmsc->cbw_struct.dCBWDataTransferLength < SCSI_INQUIRY_DATA_LENGTH) + { + trans_len = pmsc->cbw_struct.dCBWDataTransferLength; + } + else + { + trans_len = SCSI_INQUIRY_DATA_LENGTH; + } + } + + pmsc->data_len = trans_len; + while(trans_len) + { + trans_len --; + pmsc->data[trans_len] = pdata[trans_len]; + } + return status; +} + +/** + * @brief bulk-only transport scsi command start stop + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_start_stop(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 0; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command meidum removal + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_allow_medium_removal(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 0; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command mode sense6 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_mode_sense6(void *udev, uint8_t lun) +{ + uint8_t data_len = 8; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 8; + while(data_len) + { + data_len --; + pmsc->data[data_len] = mode_sense6_data[data_len]; + }; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command mode sense10 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_mode_sense10(void *udev, uint8_t lun) +{ + uint8_t data_len = 8; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + pmsc->data_len = 8; + while(data_len) + { + data_len --; + pmsc->data[data_len] = mode_sense10_data[data_len]; + }; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command capacity + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_capacity(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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)((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)((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])); + + pmsc->data_len = 8; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command format capacity + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_format_capacity(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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, &pmsc->blk_nbr[lun], &pmsc->blk_size[lun]); + + 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)((pmsc->blk_size[lun]) >> 16); + pdata[10] = (uint8_t)((pmsc->blk_size[lun]) >> 8); + pdata[11] = (uint8_t)((pmsc->blk_size[lun])); + + pmsc->data_len = 12; + + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command request sense + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_request_sense(void *udev, uint8_t lun) +{ + uint32_t trans_len = 0x12; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *pdata = pmsc->data; + uint8_t *sdata = (uint8_t *)&sense_data; + + while(trans_len) + { + trans_len --; + pdata[trans_len] = sdata[trans_len]; + } + + if(pmsc->cbw_struct.dCBWDataTransferLength < REQ_SENSE_STANDARD_DATA_LEN) + { + pmsc->data_len = pmsc->cbw_struct.dCBWDataTransferLength; + } + else + { + pmsc->data_len = REQ_SENSE_STANDARD_DATA_LEN; + } + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command verify + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_verify(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_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; + } + + 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, pmsc->blk_addr, pmsc->blk_len) != USB_OK) + { + return USB_FAIL; + } + pmsc->data_len = 0; + return USB_OK; +} + +/** + * @brief bulk-only transport scsi command read10 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_read10(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; + uint32_t len; + + if(pmsc->msc_state == MSC_STATE_MACHINE_IDLE) + { + if((pmsc->cbw_struct.bmCBWFlags & 0x80) != 0x80) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + 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, pmsc->blk_addr, pmsc->blk_len) != USB_OK) + { + return USB_FAIL; + } + + pmsc->blk_addr *= pmsc->blk_size[lun]; + pmsc->blk_len *= pmsc->blk_size[lun]; + + if(pmsc->cbw_struct.dCBWDataTransferLength != pmsc->blk_len) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + pmsc->msc_state = MSC_STATE_MACHINE_DATA_IN; + } + pmsc->data_len = MSC_MAX_DATA_BUF_LEN; + + 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, pmsc->data, len); + pmsc->blk_addr += len; + pmsc->blk_len -= len; + + pmsc->csw_struct.dCSWDataResidue -= len; + if(pmsc->blk_len == 0) + { + pmsc->msc_state = MSC_STATE_MACHINE_LAST_DATA; + } + + return USB_OK; +} + + +/** + * @brief bulk-only transport scsi command write10 + * @param udev: to the structure of usbd_core_type + * @param lun: logical units number + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_write10(void *udev, uint8_t lun) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + uint8_t *cmd = pmsc->cbw_struct.CBWCB; + uint32_t len; + + if(pmsc->msc_state == MSC_STATE_MACHINE_IDLE) + { + if((pmsc->cbw_struct.bmCBWFlags & 0x80) == 0x80) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + 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, pmsc->blk_addr, pmsc->blk_len) != USB_OK) + { + return USB_FAIL; + } + + pmsc->blk_addr *= pmsc->blk_size[lun]; + pmsc->blk_len *= pmsc->blk_size[lun]; + + if(pmsc->cbw_struct.dCBWDataTransferLength != pmsc->blk_len) + { + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + return USB_FAIL; + } + + 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(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; + } + + pmsc->blk_addr += len; + pmsc->blk_len -= len; + + pmsc->csw_struct.dCSWDataResidue -= len; + + if(pmsc->blk_len == 0) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_PASS); + } + else + { + 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; +} + +/** + * @brief clear feature + * @param udev: to the structure of usbd_core_type + * @param etp_num: endpoint number + * @retval status of usb_sts_type + */ +void bot_scsi_clear_feature(void *udev, uint8_t ept_num) +{ + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + if(pmsc->bot_status == MSC_BOT_STATE_ERROR) + { + usbd_set_stall(pudev, USBD_MSC_BULK_IN_EPT); + pmsc->bot_status = MSC_BOT_STATE_IDLE; + } + else if(((ept_num & 0x80) == 0x80) && (pmsc->bot_status != MSC_BOT_STATE_RECOVERY)) + { + bot_scsi_send_csw(udev, CSW_BCSWSTATUS_FAILED); + } +} + +/** + * @brief bulk-only transport scsi command process + * @param udev: to the structure of usbd_core_type + * @retval status of usb_sts_type + */ +usb_sts_type bot_scsi_cmd_process(void *udev) +{ + usb_sts_type status = USB_FAIL; + usbd_core_type *pudev = (usbd_core_type *)udev; + cdc_msc_struct_type *pmsc = (cdc_msc_struct_type *)pudev->class_handler->pdata; + switch(pmsc->cbw_struct.CBWCB[0]) + { + case MSC_CMD_INQUIRY: + status = bot_scsi_inquiry(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_START_STOP: + status = bot_scsi_start_stop(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_MODE_SENSE6: + status = bot_scsi_mode_sense6(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_MODE_SENSE10: + status = bot_scsi_mode_sense10(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_ALLOW_MEDIUM_REMOVAL: + status = bot_scsi_allow_medium_removal(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_READ_10: + status = bot_scsi_read10(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_READ_CAPACITY: + status = bot_scsi_capacity(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_REQUEST_SENSE: + status = bot_scsi_request_sense(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_TEST_UNIT: + status = bot_scsi_test_unit(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_VERIFY: + status = bot_scsi_verify(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_WRITE_10: + status = bot_scsi_write10(udev, pmsc->cbw_struct.bCBWLUN); + break; + + case MSC_CMD_READ_FORMAT_CAPACITY: + status = bot_scsi_format_capacity(udev, pmsc->cbw_struct.bCBWLUN); + break; + + default: + bot_scsi_sense_code(udev, SENSE_KEY_ILLEGAL_REQUEST, INVALID_COMMAND); + status = USB_FAIL; + break; + } + return status; +} + +/** + * @} + */ + +/** + * @} + */ + +/** + * @} + */ diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.c b/middlewares/usbd_class/custom_hid/custom_hid_class.c index 315db555..453cb6b7 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb custom hid class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_class.h b/middlewares/usbd_class/custom_hid/custom_hid_class.h index fa2029ff..d5773e0b 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.c b/middlewares/usbd_class/custom_hid/custom_hid_desc.c index 6c550939..35bba052 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/custom_hid/custom_hid_desc.h b/middlewares/usbd_class/custom_hid/custom_hid_desc.h index 62107002..2172c8da 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb custom hid descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.c b/middlewares/usbd_class/hid_iap/hid_iap_class.c index 3a8f0f40..483d159f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid iap class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_class.h b/middlewares/usbd_class/hid_iap/hid_iap_class.h index 5de2d822..0195c75b 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid iap header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.c b/middlewares/usbd_class/hid_iap/hid_iap_desc.c index 8ce94184..b5d8bdd4 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid iap device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/hid_iap/hid_iap_desc.h b/middlewares/usbd_class/hid_iap/hid_iap_desc.h index 3ea06c3e..9cd09951 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid iap descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_class.c b/middlewares/usbd_class/keyboard/keyboard_class.c index 13510e30..6d0d665b 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid keyboard class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_class.h b/middlewares/usbd_class/keyboard/keyboard_class.h index bebc72bb..c3382501 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid keyboard header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.c b/middlewares/usbd_class/keyboard/keyboard_desc.c index 4e0a4b7d..e2be6487 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid keyboard device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/keyboard/keyboard_desc.h b/middlewares/usbd_class/keyboard/keyboard_desc.h index 3608fa77..9958bb07 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb keyboard descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_class.c b/middlewares/usbd_class/mouse/mouse_class.c index 47c402f6..ce9898ed 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid mouse class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_class.h b/middlewares/usbd_class/mouse/mouse_class.h index a706f836..1afdc90f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid mouse header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_desc.c b/middlewares/usbd_class/mouse/mouse_desc.c index 57441a75..5a225304 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb hid mouse device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/mouse/mouse_desc.h b/middlewares/usbd_class/mouse/mouse_desc.h index 8d77a68f..ef9e4f1a 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb mouse descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.c b/middlewares/usbd_class/msc/msc_bot_scsi.c index 8704ae00..e6ced631 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb mass storage bulk-only transport and scsi command ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_bot_scsi.h b/middlewares/usbd_class/msc/msc_bot_scsi.h index 95c31b54..cf8cdbae 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb mass storage bulk-only transport and scsi command header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_class.c b/middlewares/usbd_class/msc/msc_class.c index 8acbec86..a9464d61 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb msc class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_class.h b/middlewares/usbd_class/msc/msc_class.h index fedb43e8..f73167bb 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 b5e7c064..8ca40d79 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb msc device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/msc/msc_desc.h b/middlewares/usbd_class/msc/msc_desc.h index 1ab1f595..96441b64 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb msc descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_class.c b/middlewares/usbd_class/printer/printer_class.c index b34d039a..93550d52 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb printer class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_class.h b/middlewares/usbd_class/printer/printer_class.h index 2d55a1f6..b5409f4d 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb cdc class file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_desc.c b/middlewares/usbd_class/printer/printer_desc.c index c021850b..75869e2b 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb printer device descriptor ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbd_class/printer/printer_desc.h b/middlewares/usbd_class/printer/printer_desc.h index 6dafa91d..fd0f5805 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb printer descriptor header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_class.c b/middlewares/usbh_class/usbh_hid/usbh_hid_class.c index 6da906c9..732744e8 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host hid class type ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_class.h b/middlewares/usbh_class/usbh_hid/usbh_hid_class.h index 1da42c5c..1ad05f6f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host hid class header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c b/middlewares/usbh_class/usbh_hid/usbh_hid_keyboard.c index f8c826a6..6e04eaee 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 f8dc5d05..6ff803e3 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 fcd08da8..b3bfe275 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 f4653044..9825f176 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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 0e742ef8..6a36fd48 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host msc bulk-only transfer and scsi type ************************************************************************** * Copyright notice & Disclaimer @@ -405,6 +405,7 @@ usb_sts_type usbh_msc_bot_scsi_get_inquiry(void *uhost, msc_bot_trans_type *bot { case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_INQUIRY_DATA_LEN, MSC_INQUIRY_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; 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; @@ -443,6 +444,7 @@ usb_sts_type usbh_msc_bot_scsi_capacity(void *uhost, msc_bot_trans_type *bot_tra { case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_CAPACITY10_DATA_LEN, MSC_CAPACITY10_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; 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; @@ -484,6 +486,7 @@ usb_sts_type usbh_msc_bot_scsi_test_unit_ready(void *uhost, msc_bot_trans_type * 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); + bot_trans->cbw.bCBWLUN = lun; 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; @@ -522,6 +525,7 @@ usb_sts_type usbh_msc_bot_scsi_request_sense(void *uhost, msc_bot_trans_type *bo case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, MSC_REQUEST_SENSE_DATA_LEN, MSC_REQUEST_SENSE_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; 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; @@ -564,6 +568,7 @@ usb_sts_type usbh_msc_bot_scsi_write(void *uhost, msc_bot_trans_type *bot_trans, case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, write_len * 512, MSC_WRITE_CMD_LEN, MSC_CBW_FLAG_OUT); + bot_trans->cbw.bCBWLUN = lun; 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; @@ -606,6 +611,7 @@ usb_sts_type usbh_msc_bot_scsi_read(void *uhost, msc_bot_trans_type *bot_trans, case CMD_STATE_SEND: usbh_bot_cbw(&bot_trans->cbw, read_len * 512, MSC_READ_CMD_LEN, MSC_CBW_FLAG_IN); + bot_trans->cbw.bCBWLUN = lun; 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; 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 b4397cdd..ca90c2ce 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host msc bulk-only transfer and scsi header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.c b/middlewares/usbh_class/usbh_msc/usbh_msc_class.c index 340a0494..863ec5db 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host msc class type ************************************************************************** * Copyright notice & Disclaimer @@ -261,7 +261,6 @@ static usb_sts_type uhost_process_handler(void *uhost) USBH_DEBUG("Block num: %d ", pmsc->l_unit_n[pmsc->cur_lun].capacity.blk_nbr); USBH_DEBUG("Block size: %d Byte", pmsc->l_unit_n[pmsc->cur_lun].capacity.blk_size); pmsc->l_unit_n[pmsc->cur_lun].state = USBH_MSC_IDLE; - pmsc->state = USBH_MSC_IDLE; pmsc->cur_lun ++; } else if(status == USB_FAIL) @@ -289,6 +288,11 @@ static usb_sts_type uhost_process_handler(void *uhost) default: break; } + + } + else + { + pmsc->state = USBH_MSC_IDLE; } break; case USBH_MSC_IDLE: diff --git a/middlewares/usbh_class/usbh_msc/usbh_msc_class.h b/middlewares/usbh_class/usbh_msc/usbh_msc_class.h index 5d98add7..8fabff2f 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.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb host msc class header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at32f435_437_board/at32f435_437_board.c b/project/at32f435_437_board/at32f435_437_board.c index b3fca309..a6db156b 100644 --- a/project/at32f435_437_board/at32f435_437_board.c +++ b/project/at32f435_437_board/at32f435_437_board.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_board.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief set of firmware functions to manage leds and push-button. * initialize delay function. ************************************************************************** @@ -269,7 +269,7 @@ void at32_led_off(led_type led) } /** - * @brief turns selected led tooggle. + * @brief turns selected led toggle. * @param led: specifies the led to be set off. * this parameter can be one of following parameters: * @arg LED2 diff --git a/project/at32f435_437_board/at32f435_437_board.h b/project/at32f435_437_board/at32f435_437_board.h index 9fb7e887..67cd1ac3 100644 --- a/project/at32f435_437_board/at32f435_437_board.h +++ b/project/at32f435_437_board/at32f435_437_board.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_board.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @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_f435/examples/acc/calibration/inc/at32f435_437_clock.h b/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_conf.h b/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_int.h b/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/acc/calibration/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/acc/calibration/inc/usb_conf.h b/project/at_start_f435/examples/acc/calibration/inc/usb_conf.h index ae04b5ec..2bb88c19 100644 --- a/project/at_start_f435/examples/acc/calibration/inc/usb_conf.h +++ b/project/at_start_f435/examples/acc/calibration/inc/usb_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file usb_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief usb config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/acc/calibration/readme.txt b/project/at_start_f435/examples/acc/calibration/readme.txt index 315171ac..277fe419 100644 --- a/project/at_start_f435/examples/acc/calibration/readme.txt +++ b/project/at_start_f435/examples/acc/calibration/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/acc/calibration/src/at32f435_437_clock.c b/project/at_start_f435/examples/acc/calibration/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/acc/calibration/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/acc/calibration/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/acc/calibration/src/at32f435_437_int.c b/project/at_start_f435/examples/acc/calibration/src/at32f435_437_int.c index 882b3a07..ac403413 100644 --- a/project/at_start_f435/examples/acc/calibration/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/acc/calibration/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/acc/calibration/src/main.c b/project/at_start_f435/examples/acc/calibration/src/main.c index a1738aa4..9e196c2a 100644 --- a/project/at_start_f435/examples/acc/calibration/src/main.c +++ b/project/at_start_f435/examples/acc/calibration/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/readme.txt b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/readme.txt index 6c8f148b..279a85bc 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_int.c index 86479fef..f4b30cf8 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/main.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/main.c index 687449a0..d09dc766 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma3/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/readme.txt b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/readme.txt index fdf718d3..84a7528e 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_int.c index 92b499e6..c2032b54 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/main.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/main.c index 411bf4f3..df7618e9 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_shift_twoslave_dma4/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/readme.txt b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/readme.txt index 311254cf..ad59b326 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_int.c index ff585327..06aeb35a 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/main.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/main.c index 26215b88..f8e7f086 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_dma2/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/readme.txt b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/readme.txt index 65e34094..d0453750 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_int.c index 4654c7c8..01f7d45c 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/main.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/main.c index 8a663443..6943c57e 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_oneslave_edma/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/readme.txt b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/readme.txt index b02347d7..53bfc429 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_int.c index 8db16998..1acdbcb1 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/main.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/main.c index 9478455b..0e3ba615 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma1/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/readme.txt b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/readme.txt index fae4f823..8818354f 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_int.c index ea0d233d..09818521 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/main.c b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/main.c index 11577af1..560dc054 100644 --- a/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_ordinary_smlt_twoslave_dma5/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/readme.txt b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/readme.txt index 416b1a8b..be60ae31 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/readme.txt +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_int.c index 1a10123d..8d982369 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/main.c b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/main.c index 57c4b855..8d349a66 100644 --- a/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/main.c +++ b/project/at_start_f435/examples/adc/combine_mode_preempt_interltrig_twoslave/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/conversion_abort/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/conversion_abort/readme.txt b/project/at_start_f435/examples/adc/conversion_abort/readme.txt index bc271141..47c7e44c 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/readme.txt +++ b/project/at_start_f435/examples/adc/conversion_abort/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_int.c index 2848b4fe..4dcf2ae6 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/conversion_abort/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/conversion_abort/src/main.c b/project/at_start_f435/examples/adc/conversion_abort/src/main.c index dfb090ef..923085d2 100644 --- a/project/at_start_f435/examples/adc/conversion_abort/src/main.c +++ b/project/at_start_f435/examples/adc/conversion_abort/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/current_vref_value_check/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/readme.txt b/project/at_start_f435/examples/adc/current_vref_value_check/readme.txt index 8597dd4b..6f117861 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/readme.txt +++ b/project/at_start_f435/examples/adc/current_vref_value_check/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_int.c index f55e3439..85e9754e 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/current_vref_value_check/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/current_vref_value_check/src/main.c b/project/at_start_f435/examples/adc/current_vref_value_check/src/main.c index c3f55031..5b1ea3a0 100644 --- a/project/at_start_f435/examples/adc/current_vref_value_check/src/main.c +++ b/project/at_start_f435/examples/adc/current_vref_value_check/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/edma_double_buffer/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/readme.txt b/project/at_start_f435/examples/adc/edma_double_buffer/readme.txt index 4cf9f643..f5f838f6 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/readme.txt +++ b/project/at_start_f435/examples/adc/edma_double_buffer/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_int.c index 9ea45d63..3ea27399 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/edma_double_buffer/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/edma_double_buffer/src/main.c b/project/at_start_f435/examples/adc/edma_double_buffer/src/main.c index f900fb88..cbaac464 100644 --- a/project/at_start_f435/examples/adc/edma_double_buffer/src/main.c +++ b/project/at_start_f435/examples/adc/edma_double_buffer/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/readme.txt b/project/at_start_f435/examples/adc/exint_trigger_partitioned/readme.txt index 76286184..cc25086e 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/readme.txt +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_int.c index dd808f63..f34e0693 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/main.c b/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/main.c index 27ddb64a..25ca1d98 100644 --- a/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/main.c +++ b/project/at_start_f435/examples/adc/exint_trigger_partitioned/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/readme.txt b/project/at_start_f435/examples/adc/internal_temperature_sensor/readme.txt index 0ae52cd0..ac962ee7 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/readme.txt +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_int.c index 1d53de32..b75c1642 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/internal_temperature_sensor/src/main.c b/project/at_start_f435/examples/adc/internal_temperature_sensor/src/main.c index 46af5498..37bb026e 100644 --- a/project/at_start_f435/examples/adc/internal_temperature_sensor/src/main.c +++ b/project/at_start_f435/examples/adc/internal_temperature_sensor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/readme.txt b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/readme.txt index 3b25bd60..7aed0fc7 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/readme.txt +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_int.c index d948fd0b..6b1e972b 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/main.c b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/main.c index fd244c2e..fc118278 100644 --- a/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/main.c +++ b/project/at_start_f435/examples/adc/ordinary_preempt_oversampling/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/resolution_6bit/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/resolution_6bit/readme.txt b/project/at_start_f435/examples/adc/resolution_6bit/readme.txt index 032d171f..003a3576 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/readme.txt +++ b/project/at_start_f435/examples/adc/resolution_6bit/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_int.c index 0481e0c7..4e924a96 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/resolution_6bit/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/resolution_6bit/src/main.c b/project/at_start_f435/examples/adc/resolution_6bit/src/main.c index 45402533..502bffe1 100644 --- a/project/at_start_f435/examples/adc/resolution_6bit/src/main.c +++ b/project/at_start_f435/examples/adc/resolution_6bit/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/readme.txt b/project/at_start_f435/examples/adc/software_trigger_repeat/readme.txt index fc4a3169..b8a810e0 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/readme.txt +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_int.c index 0481e0c7..4e924a96 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/software_trigger_repeat/src/main.c b/project/at_start_f435/examples/adc/software_trigger_repeat/src/main.c index 8ad1438f..dec04faa 100644 --- a/project/at_start_f435/examples/adc/software_trigger_repeat/src/main.c +++ b/project/at_start_f435/examples/adc/software_trigger_repeat/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/readme.txt b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/readme.txt index 429f7eaa..8d9b5f61 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/readme.txt +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_int.c index f0b6b6f1..05b49553 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/main.c b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/main.c index b0c5364f..478af317 100644 --- a/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/main.c +++ b/project/at_start_f435/examples/adc/tmr_trigger_automatic_preempted/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/readme.txt b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/readme.txt index 10a006de..e4f6424b 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/readme.txt +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_int.c index 0be5ff56..c5347827 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/main.c b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/main.c index 9a2e4aff..902156af 100644 --- a/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/main.c +++ b/project/at_start_f435/examples/adc/use_polling_get_conversion_data/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer @@ -35,8 +35,8 @@ * @{ */ -__IO uint16_t adc1_ordinary_valuetab[4][3] = {0}; -__IO uint16_t *p_adc1_ordinary = adc1_ordinary_valuetab[0]; +__IO uint16_t adc1_ordinary_valuetab[3] = {0}; +__IO uint16_t *p_adc1_ordinary = adc1_ordinary_valuetab; __IO uint32_t adc1_overflow_flag = 0; static void gpio_config(void); @@ -78,7 +78,7 @@ static void adc_config(void) adc_common_struct.combine_mode = ADC_INDEPENDENT_MODE; /* config division,adcclk is division by hclk */ - adc_common_struct.div = ADC_HCLK_DIV_17; + adc_common_struct.div = ADC_HCLK_DIV_4; /* config common dma mode,it's not useful in independent mode */ adc_common_struct.common_dma_mode = ADC_COMMON_DMAMODE_DISABLE; @@ -99,7 +99,7 @@ static void adc_config(void) adc_base_default_para_init(&adc_base_struct); adc_base_struct.sequence_mode = TRUE; - adc_base_struct.repeat_mode = TRUE; + adc_base_struct.repeat_mode = FALSE; adc_base_struct.data_align = ADC_RIGHT_ALIGNMENT; adc_base_struct.ordinary_channel_length = 3; adc_base_config(ADC1, &adc_base_struct); @@ -154,7 +154,7 @@ int main(void) at32_led_off(LED2); at32_led_off(LED3); at32_led_off(LED4); - p_adc1_ordinary = adc1_ordinary_valuetab[0]; + p_adc1_ordinary = adc1_ordinary_valuetab; uart_print_init(115200); gpio_config(); adc_config(); @@ -174,18 +174,16 @@ int main(void) printf("adc1_overflow_flag = %d\r\n",adc1_overflow_flag); while(1); } - if(index > 29) + if(index%3 == 0) { - /* printf data when conversion end without error */ printf("conversion end without error\r\n"); - for(index = 0; index < 10; index++) - { - printf("adc1_ordinary_valuetab[%d][0] = 0x%x\r\n",index, adc1_ordinary_valuetab[index][0]); - printf("adc1_ordinary_valuetab[%d][1] = 0x%x\r\n",index, adc1_ordinary_valuetab[index][1]); - printf("adc1_ordinary_valuetab[%d][2] = 0x%x\r\n",index, adc1_ordinary_valuetab[index][2]); - printf("\r\n"); - } - while(1); + printf("adc1_ordinary_valuetab[0] = 0x%x\r\n", adc1_ordinary_valuetab[0]); + printf("adc1_ordinary_valuetab[1] = 0x%x\r\n", adc1_ordinary_valuetab[1]); + printf("adc1_ordinary_valuetab[2] = 0x%x\r\n", adc1_ordinary_valuetab[2]); + printf("\r\n"); + delay_sec(1); + p_adc1_ordinary = adc1_ordinary_valuetab; + adc_ordinary_software_trigger_enable(ADC1, TRUE); } } } diff --git a/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/vbat_monitor/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/vbat_monitor/readme.txt b/project/at_start_f435/examples/adc/vbat_monitor/readme.txt index 1cb3efce..fc462a6c 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/readme.txt +++ b/project/at_start_f435/examples/adc/vbat_monitor/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_int.c index 2c8a905a..4e04e7d7 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/vbat_monitor/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/vbat_monitor/src/main.c b/project/at_start_f435/examples/adc/vbat_monitor/src/main.c index d8392508..7a597d56 100644 --- a/project/at_start_f435/examples/adc/vbat_monitor/src/main.c +++ b/project/at_start_f435/examples/adc/vbat_monitor/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_clock.h b/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_conf.h b/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_int.h b/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/adc/voltage_monitoring/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/readme.txt b/project/at_start_f435/examples/adc/voltage_monitoring/readme.txt index ce1d95b5..aa2a35f1 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/readme.txt +++ b/project/at_start_f435/examples/adc/voltage_monitoring/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_clock.c b/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_int.c b/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_int.c index 6883c066..1cfd19fe 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/adc/voltage_monitoring/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/adc/voltage_monitoring/src/main.c b/project/at_start_f435/examples/adc/voltage_monitoring/src/main.c index 888b2ce5..e5694974 100644 --- a/project/at_start_f435/examples/adc/voltage_monitoring/src/main.c +++ b/project/at_start_f435/examples/adc/voltage_monitoring/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_clock.h b/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_conf.h b/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_int.h b/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/can/communication_mode/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/communication_mode/readme.txt b/project/at_start_f435/examples/can/communication_mode/readme.txt index 3e0ad015..1f874b16 100644 --- a/project/at_start_f435/examples/can/communication_mode/readme.txt +++ b/project/at_start_f435/examples/can/communication_mode/readme.txt @@ -1,16 +1,16 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use - the can normal mode. every 1s transmit one message and the led4 blink,if - receive a message, les2 blink(message id is 0x400) or led3 blink(message id - is not equal to 0x400). + this demo is based on the at-start board and at32-comm-ev, in this demo, + shows how to use the can communication mode. every 1s transmit one message + and the led4 blink, if receive a message, led2 blink(message id is 0x400) or led3 + blink(message id is not equal to 0x400). set-up - can tx ---> pb9 - can rx ---> pb8 diff --git a/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_clock.c b/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_int.c b/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_int.c index 695d298a..e087cfdd 100644 --- a/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/can/communication_mode/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/communication_mode/src/main.c b/project/at_start_f435/examples/can/communication_mode/src/main.c index b28d80bc..059fc623 100644 --- a/project/at_start_f435/examples/can/communication_mode/src/main.c +++ b/project/at_start_f435/examples/can/communication_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/filter/inc/at32f435_437_clock.h b/project/at_start_f435/examples/can/filter/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/can/filter/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/can/filter/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/filter/inc/at32f435_437_conf.h b/project/at_start_f435/examples/can/filter/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/can/filter/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/can/filter/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/filter/inc/at32f435_437_int.h b/project/at_start_f435/examples/can/filter/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/can/filter/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/can/filter/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/filter/readme.txt b/project/at_start_f435/examples/can/filter/readme.txt index 822ea113..acabe7a8 100644 --- a/project/at_start_f435/examples/can/filter/readme.txt +++ b/project/at_start_f435/examples/can/filter/readme.txt @@ -1,17 +1,17 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use - the can filter funciton. the can tool transmit 6 specified messages in total - (3 extended-id messages and 3 standard-id messages), when mcu receive one - expect id message, test_result will add one, if test success, only 4 filter - messages will be received, the three leds will toggle. + this demo is based on the at-start board and at32-comm-ev, in this demo, + shows how to use the can filter funciton. the can tool transmit 6 specified + messages in total (3 extended-id messages and 3 standard-id messages), + when mcu receive one expect id message, test_result will add one, if test + success, only 4 filter messages will be received, the three leds will toggle. set-up - can tx ---> pb9 - can rx ---> pb8 diff --git a/project/at_start_f435/examples/can/filter/src/at32f435_437_clock.c b/project/at_start_f435/examples/can/filter/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/can/filter/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/can/filter/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/filter/src/at32f435_437_int.c b/project/at_start_f435/examples/can/filter/src/at32f435_437_int.c index 21cf8831..49fae778 100644 --- a/project/at_start_f435/examples/can/filter/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/can/filter/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/filter/src/main.c b/project/at_start_f435/examples/can/filter/src/main.c index de5e7c9a..a80e3acc 100644 --- a/project/at_start_f435/examples/can/filter/src/main.c +++ b/project/at_start_f435/examples/can/filter/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_clock.h b/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_conf.h b/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_int.h b/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/can/loopback_mode/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/loopback_mode/readme.txt b/project/at_start_f435/examples/can/loopback_mode/readme.txt index 53010af1..3c737130 100644 --- a/project/at_start_f435/examples/can/loopback_mode/readme.txt +++ b/project/at_start_f435/examples/can/loopback_mode/readme.txt @@ -1,15 +1,15 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ - this demo is based on the at-start board, in this demo, shows how to use - the can loopback mode. every 1s transmit one message and the led4 blink, if - the message can be received, led2 blink. + this demo is based on the at-start board and at32-comm-ev, in this demo, + shows how to use the can loopback mode. every 1s transmit one message + and the led4 blink, if the message can be received, led2 blink. set-up - can tx ---> pb9 - can rx ---> pb8 diff --git a/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_clock.c b/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_int.c b/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_int.c index 5ab6eaeb..c3dacf5d 100644 --- a/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/can/loopback_mode/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/can/loopback_mode/src/main.c b/project/at_start_f435/examples/can/loopback_mode/src/main.c index fe9bd835..6105e52b 100644 --- a/project/at_start_f435/examples/can/loopback_mode/src/main.c +++ b/project/at_start_f435/examples/can/loopback_mode/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_clock.h b/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_conf.h b/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_conf.h index f630a4a2..e2816415 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_int.h b/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/cortex_m4/bit_band/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/readme.txt b/project/at_start_f435/examples/cortex_m4/bit_band/readme.txt index 294b98f0..b65dafb4 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/readme.txt +++ b/project/at_start_f435/examples/cortex_m4/bit_band/readme.txt @@ -1,8 +1,8 @@ /** ************************************************************************** * @file readme.txt - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief readme ************************************************************************** */ diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_clock.c b/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_clock.c index 35fcdfaa..5eb8f824 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_clock.c +++ b/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_clock.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief system clock config program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_int.c b/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_int.c index 230c3115..c0d694b3 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_int.c +++ b/project/at_start_f435/examples/cortex_m4/bit_band/src/at32f435_437_int.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/bit_band/src/main.c b/project/at_start_f435/examples/cortex_m4/bit_band/src/main.c index 9eab2240..2ffed950 100644 --- a/project/at_start_f435/examples/cortex_m4/bit_band/src/main.c +++ b/project/at_start_f435/examples/cortex_m4/bit_band/src/main.c @@ -1,8 +1,8 @@ /** ************************************************************************** * @file main.c - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief main program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_clock.h b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_clock.h index 98d52da8..86a4b828 100644 --- a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_clock.h +++ b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_clock.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_clock.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of clock program ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_conf.h b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_conf.h index c050e1ff..6b437f9d 100644 --- a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_conf.h +++ b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_conf.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_conf.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief at32f435_437 config header file ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_int.h b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_int.h index f5a04afd..80aec042 100644 --- a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_int.h +++ b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/inc/at32f435_437_int.h @@ -1,8 +1,8 @@ /** ************************************************************************** * @file at32f435_437_int.h - * @version v2.0.8 - * @date 2022-04-25 + * @version v2.0.9 + * @date 2022-06-28 * @brief header file of main interrupt service routines. ************************************************************************** * Copyright notice & Disclaimer diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/cmsis_dsp.map b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/cmsis_dsp.map index 36b91aaf..2555c3a3 100644 --- a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/cmsis_dsp.map +++ b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/cmsis_dsp.map @@ -274,7 +274,7 @@ Section Cross References at32f435_437_gpio.o(.ARM.exidx.text.gpio_bits_set) refers to at32f435_437_gpio.o(.text.gpio_bits_set) for [Anonymous Symbol] at32f435_437_gpio.o(.ARM.exidx.text.gpio_bits_reset) refers to at32f435_437_gpio.o(.text.gpio_bits_reset) for [Anonymous Symbol] at32f435_437_gpio.o(.ARM.exidx.text.gpio_bits_write) refers to at32f435_437_gpio.o(.text.gpio_bits_write) for [Anonymous Symbol] - at32f435_437_gpio.o(.ARM.exidx.text.gpio_port_wirte) refers to at32f435_437_gpio.o(.text.gpio_port_wirte) for [Anonymous Symbol] + at32f435_437_gpio.o(.ARM.exidx.text.gpio_port_write) refers to at32f435_437_gpio.o(.text.gpio_port_write) for [Anonymous Symbol] at32f435_437_gpio.o(.ARM.exidx.text.gpio_pin_wp_config) refers to at32f435_437_gpio.o(.text.gpio_pin_wp_config) for [Anonymous Symbol] at32f435_437_gpio.o(.ARM.exidx.text.gpio_pins_huge_driven_config) refers to at32f435_437_gpio.o(.text.gpio_pins_huge_driven_config) for [Anonymous Symbol] at32f435_437_gpio.o(.ARM.exidx.text.gpio_pin_mux_config) refers to at32f435_437_gpio.o(.text.gpio_pin_mux_config) for [Anonymous Symbol] @@ -1801,7 +1801,7 @@ Removing Unused input sections from the image. Removing at32f435_437_crm.o(.text.crm_periph_lowpower_mode_enable), (40 bytes). Removing at32f435_437_crm.o(.ARM.exidx.text.crm_periph_lowpower_mode_enable), (8 bytes). Removing at32f435_437_crm.o(.ARM.exidx.text.crm_clock_source_enable), (8 bytes). - Removing at32f435_437_crm.o(.text.crm_flag_clear), (108 bytes). + Removing at32f435_437_crm.o(.text.crm_flag_clear), (172 bytes). Removing at32f435_437_crm.o(.ARM.exidx.text.crm_flag_clear), (8 bytes). Removing at32f435_437_crm.o(.text.crm_ertc_clock_select), (30 bytes). Removing at32f435_437_crm.o(.ARM.exidx.text.crm_ertc_clock_select), (8 bytes). @@ -1860,8 +1860,8 @@ Removing Unused input sections from the image. Removing at32f435_437_gpio.o(.ARM.exidx.text.gpio_bits_reset), (8 bytes). Removing at32f435_437_gpio.o(.text.gpio_bits_write), (12 bytes). Removing at32f435_437_gpio.o(.ARM.exidx.text.gpio_bits_write), (8 bytes). - Removing at32f435_437_gpio.o(.text.gpio_port_wirte), (4 bytes). - Removing at32f435_437_gpio.o(.ARM.exidx.text.gpio_port_wirte), (8 bytes). + Removing at32f435_437_gpio.o(.text.gpio_port_write), (4 bytes). + Removing at32f435_437_gpio.o(.ARM.exidx.text.gpio_port_write), (8 bytes). Removing at32f435_437_gpio.o(.text.gpio_pin_wp_config), (16 bytes). Removing at32f435_437_gpio.o(.ARM.exidx.text.gpio_pin_wp_config), (8 bytes). Removing at32f435_437_gpio.o(.text.gpio_pins_huge_driven_config), (16 bytes). @@ -1948,7 +1948,7 @@ Removing Unused input sections from the image. Removing at32f435_437_usart.o(.text.usart_hardware_flow_control_set), (66 bytes). Removing at32f435_437_usart.o(.ARM.exidx.text.usart_hardware_flow_control_set), (8 bytes). Removing at32f435_437_usart.o(.ARM.exidx.text.usart_flag_get), (8 bytes). - Removing at32f435_437_usart.o(.text.usart_flag_clear), (6 bytes). + Removing at32f435_437_usart.o(.text.usart_flag_clear), (16 bytes). Removing at32f435_437_usart.o(.ARM.exidx.text.usart_flag_clear), (8 bytes). Removing at32f435_437_usart.o(.text.usart_rs485_delay_time_config), (34 bytes). Removing at32f435_437_usart.o(.ARM.exidx.text.usart_rs485_delay_time_config), (8 bytes). @@ -2955,7 +2955,7 @@ Removing Unused input sections from the image. Removing transformfunctions.o(.text.arm_split_rfft_q31), (274 bytes). Removing transformfunctions.o(.ARM.exidx.text.arm_split_rfft_q31), (8 bytes). -1226 unused section(s) (total 1042467 bytes) removed from the image. +1226 unused section(s) (total 1042541 bytes) removed from the image. ============================================================================== @@ -3203,81 +3203,81 @@ Image Symbol Table [Anonymous Symbol] 0x08000b1c Section 0 at32f435_437_int.o(.text.SVC_Handler) [Anonymous Symbol] 0x08000b20 Section 0 at32f435_437_int.o(.text.SysTick_Handler) [Anonymous Symbol] 0x08000b24 Section 0 system_at32f435_437.o(.text.SystemInit) - [Anonymous Symbol] 0x08000b90 Section 0 at32f435_437_int.o(.text.UsageFault_Handler) - [Anonymous Symbol] 0x08000b94 Section 0 at32f435_437_board.o(.text._sys_exit) - [Anonymous Symbol] 0x08000b98 Section 0 matrixfunctions.o(.text.arm_mat_mult_f32) - [Anonymous Symbol] 0x08000cf0 Section 0 statisticsfunctions.o(.text.arm_max_f32) - [Anonymous Symbol] 0x08000dc0 Section 0 statisticsfunctions.o(.text.arm_mean_f32) - [Anonymous Symbol] 0x08000e40 Section 0 statisticsfunctions.o(.text.arm_min_f32) - [Anonymous Symbol] 0x08000f10 Section 0 statisticsfunctions.o(.text.arm_std_f32) - [Anonymous Symbol] 0x08000f60 Section 0 statisticsfunctions.o(.text.arm_var_f32) - [Anonymous Symbol] 0x0800108c Section 0 at32f435_437_crm.o(.text.crm_ahb_div_set) - [Anonymous Symbol] 0x080010a8 Section 0 at32f435_437_crm.o(.text.crm_apb1_div_set) - [Anonymous Symbol] 0x080010c4 Section 0 at32f435_437_crm.o(.text.crm_apb2_div_set) - [Anonymous Symbol] 0x080010e0 Section 0 at32f435_437_crm.o(.text.crm_auto_step_mode_enable) - [Anonymous Symbol] 0x080010fc Section 0 at32f435_437_crm.o(.text.crm_clock_source_enable) - [Anonymous Symbol] 0x08001178 Section 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) - crm_clocks_freq_get.pll_fr_table 0x08001204 Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) - crm_clocks_freq_get.sclk_ahb_div_table 0x0800120c Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) - crm_clocks_freq_get.ahb_apb1_div_table 0x0800121c Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) - crm_clocks_freq_get.ahb_apb2_div_table 0x0800121c Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) - [Anonymous Symbol] 0x08001224 Section 0 at32f435_437_crm.o(.text.crm_flag_get) - [Anonymous Symbol] 0x08001240 Section 0 at32f435_437_crm.o(.text.crm_hext_stable_wait) - [Anonymous Symbol] 0x08001268 Section 0 at32f435_437_crm.o(.text.crm_periph_clock_enable) - [Anonymous Symbol] 0x08001290 Section 0 at32f435_437_crm.o(.text.crm_pll_config) - [Anonymous Symbol] 0x080012dc Section 0 at32f435_437_crm.o(.text.crm_reset) - [Anonymous Symbol] 0x0800132c Section 0 at32f435_437_crm.o(.text.crm_sysclk_switch) - [Anonymous Symbol] 0x08001340 Section 0 at32f435_437_crm.o(.text.crm_sysclk_switch_status_get) - [Anonymous Symbol] 0x08001350 Section 0 at32f435_437_board.o(.text.fputc) - [Anonymous Symbol] 0x08001374 Section 0 at32f435_437_gpio.o(.text.gpio_default_para_init) - [Anonymous Symbol] 0x08001384 Section 0 at32f435_437_gpio.o(.text.gpio_init) - [Anonymous Symbol] 0x08001408 Section 0 at32f435_437_gpio.o(.text.gpio_pin_mux_config) - [Anonymous Symbol] 0x08001438 Section 0 main.o(.text.main) - [Anonymous Symbol] 0x08001584 Section 0 at32f435_437_clock.o(.text.system_clock_config) - [Anonymous Symbol] 0x08001618 Section 0 system_at32f435_437.o(.text.system_core_clock_update) - system_core_clock_update.pll_fr_table 0x0800168c Number 0 system_at32f435_437.o(.text.system_core_clock_update) - system_core_clock_update.sys_ahb_div_table 0x08001694 Number 0 system_at32f435_437.o(.text.system_core_clock_update) - [Anonymous Symbol] 0x080016a4 Section 0 at32f435_437_board.o(.text.uart_print_init) - [Anonymous Symbol] 0x08001714 Section 0 at32f435_437_usart.o(.text.usart_data_transmit) - [Anonymous Symbol] 0x0800171c Section 0 at32f435_437_usart.o(.text.usart_enable) - [Anonymous Symbol] 0x08001730 Section 0 at32f435_437_usart.o(.text.usart_flag_get) - [Anonymous Symbol] 0x0800173c Section 0 at32f435_437_usart.o(.text.usart_init) - [Anonymous Symbol] 0x080017e4 Section 0 at32f435_437_usart.o(.text.usart_transmitter_enable) - CL$$btod_d2e 0x080017f6 Section 62 btod.o(CL$$btod_d2e) - CL$$btod_d2e_denorm_low 0x08001834 Section 70 btod.o(CL$$btod_d2e_denorm_low) - CL$$btod_d2e_norm_op1 0x0800187a Section 96 btod.o(CL$$btod_d2e_norm_op1) - CL$$btod_div_common 0x080018da Section 824 btod.o(CL$$btod_div_common) - CL$$btod_e2e 0x08001c12 Section 220 btod.o(CL$$btod_e2e) - CL$$btod_ediv 0x08001cee Section 42 btod.o(CL$$btod_ediv) - CL$$btod_emul 0x08001d18 Section 42 btod.o(CL$$btod_emul) - CL$$btod_mult_common 0x08001d42 Section 580 btod.o(CL$$btod_mult_common) - i.__ARM_fpclassify 0x08001f86 Section 0 fpclassify.o(i.__ARM_fpclassify) - i.__hardfp_sqrtf 0x08001fb6 Section 0 sqrtf.o(i.__hardfp_sqrtf) - locale$$code 0x08001ff0 Section 44 lc_numeric_c.o(locale$$code) - $v0 0x0800201c Number 0 dretinf.o(x$fpl$dretinf) - x$fpl$dretinf 0x0800201c Section 12 dretinf.o(x$fpl$dretinf) - $v0 0x08002028 Number 0 f2d.o(x$fpl$f2d) - x$fpl$f2d 0x08002028 Section 86 f2d.o(x$fpl$f2d) - $v0 0x0800207e Number 0 fnaninf.o(x$fpl$fnaninf) - x$fpl$fnaninf 0x0800207e Section 140 fnaninf.o(x$fpl$fnaninf) - $v0 0x0800210a Number 0 fpinit.o(x$fpl$fpinit) - x$fpl$fpinit 0x0800210a Section 26 fpinit.o(x$fpl$fpinit) - $v0 0x08002124 Number 0 printf1.o(x$fpl$printf1) - x$fpl$printf1 0x08002124 Section 4 printf1.o(x$fpl$printf1) - tenpwrs_x 0x08002128 Data 60 bigflt0.o(.constdata) - .constdata 0x08002128 Section 148 bigflt0.o(.constdata) - x$fpl$usenofp 0x08002128 Section 0 usenofp.o(x$fpl$usenofp) - tenpwrs_i 0x08002164 Data 64 bigflt0.o(.constdata) - .L__const.main.dstC 0x080021c0 Data 8 main.o(.rodata..L__const.main.dstC) - .L__const.main.srcA 0x080021c8 Data 8 main.o(.rodata..L__const.main.srcA) - .L__const.main.srcB 0x080021d0 Data 8 main.o(.rodata..L__const.main.srcB) - locale$$data 0x08002348 Section 28 lc_numeric_c.o(locale$$data) - __lcnum_c_name 0x0800234c Data 2 lc_numeric_c.o(locale$$data) - __lcnum_c_start 0x08002354 Data 0 lc_numeric_c.o(locale$$data) - __lcnum_c_point 0x08002360 Data 0 lc_numeric_c.o(locale$$data) - __lcnum_c_thousands 0x08002362 Data 0 lc_numeric_c.o(locale$$data) - __lcnum_c_grouping 0x08002363 Data 0 lc_numeric_c.o(locale$$data) - __lcnum_c_end 0x08002364 Data 0 lc_numeric_c.o(locale$$data) + [Anonymous Symbol] 0x08000b8c Section 0 at32f435_437_int.o(.text.UsageFault_Handler) + [Anonymous Symbol] 0x08000b90 Section 0 at32f435_437_board.o(.text._sys_exit) + [Anonymous Symbol] 0x08000b94 Section 0 matrixfunctions.o(.text.arm_mat_mult_f32) + [Anonymous Symbol] 0x08000cec Section 0 statisticsfunctions.o(.text.arm_max_f32) + [Anonymous Symbol] 0x08000dbc Section 0 statisticsfunctions.o(.text.arm_mean_f32) + [Anonymous Symbol] 0x08000e3c Section 0 statisticsfunctions.o(.text.arm_min_f32) + [Anonymous Symbol] 0x08000f0c Section 0 statisticsfunctions.o(.text.arm_std_f32) + [Anonymous Symbol] 0x08000f5c Section 0 statisticsfunctions.o(.text.arm_var_f32) + [Anonymous Symbol] 0x08001088 Section 0 at32f435_437_crm.o(.text.crm_ahb_div_set) + [Anonymous Symbol] 0x080010a4 Section 0 at32f435_437_crm.o(.text.crm_apb1_div_set) + [Anonymous Symbol] 0x080010c0 Section 0 at32f435_437_crm.o(.text.crm_apb2_div_set) + [Anonymous Symbol] 0x080010dc Section 0 at32f435_437_crm.o(.text.crm_auto_step_mode_enable) + [Anonymous Symbol] 0x080010f8 Section 0 at32f435_437_crm.o(.text.crm_clock_source_enable) + [Anonymous Symbol] 0x08001174 Section 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) + crm_clocks_freq_get.pll_fr_table 0x08001200 Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) + crm_clocks_freq_get.sclk_ahb_div_table 0x08001208 Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) + crm_clocks_freq_get.ahb_apb1_div_table 0x08001218 Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) + crm_clocks_freq_get.ahb_apb2_div_table 0x08001218 Number 0 at32f435_437_crm.o(.text.crm_clocks_freq_get) + [Anonymous Symbol] 0x08001220 Section 0 at32f435_437_crm.o(.text.crm_flag_get) + [Anonymous Symbol] 0x0800123c Section 0 at32f435_437_crm.o(.text.crm_hext_stable_wait) + [Anonymous Symbol] 0x08001264 Section 0 at32f435_437_crm.o(.text.crm_periph_clock_enable) + [Anonymous Symbol] 0x0800128c Section 0 at32f435_437_crm.o(.text.crm_pll_config) + [Anonymous Symbol] 0x080012d8 Section 0 at32f435_437_crm.o(.text.crm_reset) + [Anonymous Symbol] 0x08001328 Section 0 at32f435_437_crm.o(.text.crm_sysclk_switch) + [Anonymous Symbol] 0x0800133c Section 0 at32f435_437_crm.o(.text.crm_sysclk_switch_status_get) + [Anonymous Symbol] 0x0800134c Section 0 at32f435_437_board.o(.text.fputc) + [Anonymous Symbol] 0x08001370 Section 0 at32f435_437_gpio.o(.text.gpio_default_para_init) + [Anonymous Symbol] 0x08001380 Section 0 at32f435_437_gpio.o(.text.gpio_init) + [Anonymous Symbol] 0x08001404 Section 0 at32f435_437_gpio.o(.text.gpio_pin_mux_config) + [Anonymous Symbol] 0x08001434 Section 0 main.o(.text.main) + [Anonymous Symbol] 0x08001580 Section 0 at32f435_437_clock.o(.text.system_clock_config) + [Anonymous Symbol] 0x08001614 Section 0 system_at32f435_437.o(.text.system_core_clock_update) + system_core_clock_update.pll_fr_table 0x08001688 Number 0 system_at32f435_437.o(.text.system_core_clock_update) + system_core_clock_update.sys_ahb_div_table 0x08001690 Number 0 system_at32f435_437.o(.text.system_core_clock_update) + [Anonymous Symbol] 0x080016a0 Section 0 at32f435_437_board.o(.text.uart_print_init) + [Anonymous Symbol] 0x08001710 Section 0 at32f435_437_usart.o(.text.usart_data_transmit) + [Anonymous Symbol] 0x08001718 Section 0 at32f435_437_usart.o(.text.usart_enable) + [Anonymous Symbol] 0x0800172c Section 0 at32f435_437_usart.o(.text.usart_flag_get) + [Anonymous Symbol] 0x08001738 Section 0 at32f435_437_usart.o(.text.usart_init) + [Anonymous Symbol] 0x080017e0 Section 0 at32f435_437_usart.o(.text.usart_transmitter_enable) + CL$$btod_d2e 0x080017f2 Section 62 btod.o(CL$$btod_d2e) + CL$$btod_d2e_denorm_low 0x08001830 Section 70 btod.o(CL$$btod_d2e_denorm_low) + CL$$btod_d2e_norm_op1 0x08001876 Section 96 btod.o(CL$$btod_d2e_norm_op1) + CL$$btod_div_common 0x080018d6 Section 824 btod.o(CL$$btod_div_common) + CL$$btod_e2e 0x08001c0e Section 220 btod.o(CL$$btod_e2e) + CL$$btod_ediv 0x08001cea Section 42 btod.o(CL$$btod_ediv) + CL$$btod_emul 0x08001d14 Section 42 btod.o(CL$$btod_emul) + CL$$btod_mult_common 0x08001d3e Section 580 btod.o(CL$$btod_mult_common) + i.__ARM_fpclassify 0x08001f82 Section 0 fpclassify.o(i.__ARM_fpclassify) + i.__hardfp_sqrtf 0x08001fb2 Section 0 sqrtf.o(i.__hardfp_sqrtf) + locale$$code 0x08001fec Section 44 lc_numeric_c.o(locale$$code) + $v0 0x08002018 Number 0 dretinf.o(x$fpl$dretinf) + x$fpl$dretinf 0x08002018 Section 12 dretinf.o(x$fpl$dretinf) + $v0 0x08002024 Number 0 f2d.o(x$fpl$f2d) + x$fpl$f2d 0x08002024 Section 86 f2d.o(x$fpl$f2d) + $v0 0x0800207a Number 0 fnaninf.o(x$fpl$fnaninf) + x$fpl$fnaninf 0x0800207a Section 140 fnaninf.o(x$fpl$fnaninf) + $v0 0x08002106 Number 0 fpinit.o(x$fpl$fpinit) + x$fpl$fpinit 0x08002106 Section 26 fpinit.o(x$fpl$fpinit) + $v0 0x08002120 Number 0 printf1.o(x$fpl$printf1) + x$fpl$printf1 0x08002120 Section 4 printf1.o(x$fpl$printf1) + tenpwrs_x 0x08002124 Data 60 bigflt0.o(.constdata) + .constdata 0x08002124 Section 148 bigflt0.o(.constdata) + x$fpl$usenofp 0x08002124 Section 0 usenofp.o(x$fpl$usenofp) + tenpwrs_i 0x08002160 Data 64 bigflt0.o(.constdata) + .L__const.main.dstC 0x080021b8 Data 8 main.o(.rodata..L__const.main.dstC) + .L__const.main.srcA 0x080021c0 Data 8 main.o(.rodata..L__const.main.srcA) + .L__const.main.srcB 0x080021c8 Data 8 main.o(.rodata..L__const.main.srcB) + locale$$data 0x08002340 Section 28 lc_numeric_c.o(locale$$data) + __lcnum_c_name 0x08002344 Data 2 lc_numeric_c.o(locale$$data) + __lcnum_c_start 0x0800234c Data 0 lc_numeric_c.o(locale$$data) + __lcnum_c_point 0x08002358 Data 0 lc_numeric_c.o(locale$$data) + __lcnum_c_thousands 0x0800235a Data 0 lc_numeric_c.o(locale$$data) + __lcnum_c_grouping 0x0800235b Data 0 lc_numeric_c.o(locale$$data) + __lcnum_c_end 0x0800235c Data 0 lc_numeric_c.o(locale$$data) .bss 0x20000008 Section 96 libspace.o(.bss) testOutput 0x200000d0 Data 320 main.o(.bss.testOutput) [Anonymous Symbol] 0x200000d0 Section 0 main.o(.bss.testOutput) @@ -3511,65 +3511,65 @@ Image Symbol Table PendSV_Handler 0x08000b19 Thumb Code 2 at32f435_437_int.o(.text.PendSV_Handler) SVC_Handler 0x08000b1d Thumb Code 2 at32f435_437_int.o(.text.SVC_Handler) SysTick_Handler 0x08000b21 Thumb Code 2 at32f435_437_int.o(.text.SysTick_Handler) - SystemInit 0x08000b25 Thumb Code 108 system_at32f435_437.o(.text.SystemInit) - UsageFault_Handler 0x08000b91 Thumb Code 2 at32f435_437_int.o(.text.UsageFault_Handler) - _sys_exit 0x08000b95 Thumb Code 2 at32f435_437_board.o(.text._sys_exit) - arm_mat_mult_f32 0x08000b99 Thumb Code 344 matrixfunctions.o(.text.arm_mat_mult_f32) - arm_max_f32 0x08000cf1 Thumb Code 206 statisticsfunctions.o(.text.arm_max_f32) - arm_mean_f32 0x08000dc1 Thumb Code 128 statisticsfunctions.o(.text.arm_mean_f32) - arm_min_f32 0x08000e41 Thumb Code 206 statisticsfunctions.o(.text.arm_min_f32) - arm_std_f32 0x08000f11 Thumb Code 80 statisticsfunctions.o(.text.arm_std_f32) - arm_var_f32 0x08000f61 Thumb Code 300 statisticsfunctions.o(.text.arm_var_f32) - crm_ahb_div_set 0x0800108d Thumb Code 26 at32f435_437_crm.o(.text.crm_ahb_div_set) - crm_apb1_div_set 0x080010a9 Thumb Code 26 at32f435_437_crm.o(.text.crm_apb1_div_set) - crm_apb2_div_set 0x080010c5 Thumb Code 26 at32f435_437_crm.o(.text.crm_apb2_div_set) - crm_auto_step_mode_enable 0x080010e1 Thumb Code 26 at32f435_437_crm.o(.text.crm_auto_step_mode_enable) - crm_clock_source_enable 0x080010fd Thumb Code 122 at32f435_437_crm.o(.text.crm_clock_source_enable) - crm_clocks_freq_get 0x08001179 Thumb Code 172 at32f435_437_crm.o(.text.crm_clocks_freq_get) - crm_flag_get 0x08001225 Thumb Code 26 at32f435_437_crm.o(.text.crm_flag_get) - crm_hext_stable_wait 0x08001241 Thumb Code 40 at32f435_437_crm.o(.text.crm_hext_stable_wait) - crm_periph_clock_enable 0x08001269 Thumb Code 40 at32f435_437_crm.o(.text.crm_periph_clock_enable) - crm_pll_config 0x08001291 Thumb Code 76 at32f435_437_crm.o(.text.crm_pll_config) - crm_reset 0x080012dd Thumb Code 80 at32f435_437_crm.o(.text.crm_reset) - crm_sysclk_switch 0x0800132d Thumb Code 18 at32f435_437_crm.o(.text.crm_sysclk_switch) - crm_sysclk_switch_status_get 0x08001341 Thumb Code 16 at32f435_437_crm.o(.text.crm_sysclk_switch_status_get) - fputc 0x08001351 Thumb Code 36 at32f435_437_board.o(.text.fputc) - gpio_default_para_init 0x08001375 Thumb Code 14 at32f435_437_gpio.o(.text.gpio_default_para_init) - gpio_init 0x08001385 Thumb Code 132 at32f435_437_gpio.o(.text.gpio_init) - gpio_pin_mux_config 0x08001409 Thumb Code 46 at32f435_437_gpio.o(.text.gpio_pin_mux_config) - main 0x08001439 Thumb Code 332 main.o(.text.main) - system_clock_config 0x08001585 Thumb Code 148 at32f435_437_clock.o(.text.system_clock_config) - system_core_clock_update 0x08001619 Thumb Code 140 system_at32f435_437.o(.text.system_core_clock_update) - uart_print_init 0x080016a5 Thumb Code 110 at32f435_437_board.o(.text.uart_print_init) - usart_data_transmit 0x08001715 Thumb Code 8 at32f435_437_usart.o(.text.usart_data_transmit) - usart_enable 0x0800171d Thumb Code 18 at32f435_437_usart.o(.text.usart_enable) - usart_flag_get 0x08001731 Thumb Code 10 at32f435_437_usart.o(.text.usart_flag_get) - usart_init 0x0800173d Thumb Code 166 at32f435_437_usart.o(.text.usart_init) - usart_transmitter_enable 0x080017e5 Thumb Code 18 at32f435_437_usart.o(.text.usart_transmitter_enable) - _btod_d2e 0x080017f7 Thumb Code 62 btod.o(CL$$btod_d2e) - _d2e_denorm_low 0x08001835 Thumb Code 70 btod.o(CL$$btod_d2e_denorm_low) - _d2e_norm_op1 0x0800187b Thumb Code 96 btod.o(CL$$btod_d2e_norm_op1) - __btod_div_common 0x080018db Thumb Code 696 btod.o(CL$$btod_div_common) - _e2e 0x08001c13 Thumb Code 220 btod.o(CL$$btod_e2e) - _btod_ediv 0x08001cef Thumb Code 42 btod.o(CL$$btod_ediv) - _btod_emul 0x08001d19 Thumb Code 42 btod.o(CL$$btod_emul) - __btod_mult_common 0x08001d43 Thumb Code 580 btod.o(CL$$btod_mult_common) - __ARM_fpclassify 0x08001f87 Thumb Code 48 fpclassify.o(i.__ARM_fpclassify) - __hardfp_sqrtf 0x08001fb7 Thumb Code 58 sqrtf.o(i.__hardfp_sqrtf) - _get_lc_numeric 0x08001ff1 Thumb Code 44 lc_numeric_c.o(locale$$code) - __fpl_dretinf 0x0800201d Thumb Code 12 dretinf.o(x$fpl$dretinf) - __aeabi_f2d 0x08002029 Thumb Code 0 f2d.o(x$fpl$f2d) - _f2d 0x08002029 Thumb Code 86 f2d.o(x$fpl$f2d) - __fpl_fnaninf 0x0800207f Thumb Code 140 fnaninf.o(x$fpl$fnaninf) - _fp_init 0x0800210b Thumb Code 26 fpinit.o(x$fpl$fpinit) - __fplib_config_fpu_vfp 0x08002123 Thumb Code 0 fpinit.o(x$fpl$fpinit) - __fplib_config_pureend_doubles 0x08002123 Thumb Code 0 fpinit.o(x$fpl$fpinit) - _printf_fp_dec 0x08002125 Thumb Code 4 printf1.o(x$fpl$printf1) - __I$use$fp 0x08002128 Number 0 usenofp.o(x$fpl$usenofp) - testMarks_f32 0x080021d8 Data 320 main.o(.rodata.testMarks_f32) - testUnity_f32 0x08002318 Data 16 main.o(.rodata.testUnity_f32) - Region$$Table$$Base 0x08002328 Number 0 anon$$obj.o(Region$$Table) - Region$$Table$$Limit 0x08002348 Number 0 anon$$obj.o(Region$$Table) + SystemInit 0x08000b25 Thumb Code 104 system_at32f435_437.o(.text.SystemInit) + UsageFault_Handler 0x08000b8d Thumb Code 2 at32f435_437_int.o(.text.UsageFault_Handler) + _sys_exit 0x08000b91 Thumb Code 2 at32f435_437_board.o(.text._sys_exit) + arm_mat_mult_f32 0x08000b95 Thumb Code 344 matrixfunctions.o(.text.arm_mat_mult_f32) + arm_max_f32 0x08000ced Thumb Code 206 statisticsfunctions.o(.text.arm_max_f32) + arm_mean_f32 0x08000dbd Thumb Code 128 statisticsfunctions.o(.text.arm_mean_f32) + arm_min_f32 0x08000e3d Thumb Code 206 statisticsfunctions.o(.text.arm_min_f32) + arm_std_f32 0x08000f0d Thumb Code 80 statisticsfunctions.o(.text.arm_std_f32) + arm_var_f32 0x08000f5d Thumb Code 300 statisticsfunctions.o(.text.arm_var_f32) + crm_ahb_div_set 0x08001089 Thumb Code 26 at32f435_437_crm.o(.text.crm_ahb_div_set) + crm_apb1_div_set 0x080010a5 Thumb Code 26 at32f435_437_crm.o(.text.crm_apb1_div_set) + crm_apb2_div_set 0x080010c1 Thumb Code 26 at32f435_437_crm.o(.text.crm_apb2_div_set) + crm_auto_step_mode_enable 0x080010dd Thumb Code 26 at32f435_437_crm.o(.text.crm_auto_step_mode_enable) + crm_clock_source_enable 0x080010f9 Thumb Code 122 at32f435_437_crm.o(.text.crm_clock_source_enable) + crm_clocks_freq_get 0x08001175 Thumb Code 172 at32f435_437_crm.o(.text.crm_clocks_freq_get) + crm_flag_get 0x08001221 Thumb Code 26 at32f435_437_crm.o(.text.crm_flag_get) + crm_hext_stable_wait 0x0800123d Thumb Code 40 at32f435_437_crm.o(.text.crm_hext_stable_wait) + crm_periph_clock_enable 0x08001265 Thumb Code 40 at32f435_437_crm.o(.text.crm_periph_clock_enable) + crm_pll_config 0x0800128d Thumb Code 76 at32f435_437_crm.o(.text.crm_pll_config) + crm_reset 0x080012d9 Thumb Code 80 at32f435_437_crm.o(.text.crm_reset) + crm_sysclk_switch 0x08001329 Thumb Code 18 at32f435_437_crm.o(.text.crm_sysclk_switch) + crm_sysclk_switch_status_get 0x0800133d Thumb Code 16 at32f435_437_crm.o(.text.crm_sysclk_switch_status_get) + fputc 0x0800134d Thumb Code 36 at32f435_437_board.o(.text.fputc) + gpio_default_para_init 0x08001371 Thumb Code 14 at32f435_437_gpio.o(.text.gpio_default_para_init) + gpio_init 0x08001381 Thumb Code 132 at32f435_437_gpio.o(.text.gpio_init) + gpio_pin_mux_config 0x08001405 Thumb Code 46 at32f435_437_gpio.o(.text.gpio_pin_mux_config) + main 0x08001435 Thumb Code 332 main.o(.text.main) + system_clock_config 0x08001581 Thumb Code 148 at32f435_437_clock.o(.text.system_clock_config) + system_core_clock_update 0x08001615 Thumb Code 140 system_at32f435_437.o(.text.system_core_clock_update) + uart_print_init 0x080016a1 Thumb Code 110 at32f435_437_board.o(.text.uart_print_init) + usart_data_transmit 0x08001711 Thumb Code 8 at32f435_437_usart.o(.text.usart_data_transmit) + usart_enable 0x08001719 Thumb Code 18 at32f435_437_usart.o(.text.usart_enable) + usart_flag_get 0x0800172d Thumb Code 10 at32f435_437_usart.o(.text.usart_flag_get) + usart_init 0x08001739 Thumb Code 166 at32f435_437_usart.o(.text.usart_init) + usart_transmitter_enable 0x080017e1 Thumb Code 18 at32f435_437_usart.o(.text.usart_transmitter_enable) + _btod_d2e 0x080017f3 Thumb Code 62 btod.o(CL$$btod_d2e) + _d2e_denorm_low 0x08001831 Thumb Code 70 btod.o(CL$$btod_d2e_denorm_low) + _d2e_norm_op1 0x08001877 Thumb Code 96 btod.o(CL$$btod_d2e_norm_op1) + __btod_div_common 0x080018d7 Thumb Code 696 btod.o(CL$$btod_div_common) + _e2e 0x08001c0f Thumb Code 220 btod.o(CL$$btod_e2e) + _btod_ediv 0x08001ceb Thumb Code 42 btod.o(CL$$btod_ediv) + _btod_emul 0x08001d15 Thumb Code 42 btod.o(CL$$btod_emul) + __btod_mult_common 0x08001d3f Thumb Code 580 btod.o(CL$$btod_mult_common) + __ARM_fpclassify 0x08001f83 Thumb Code 48 fpclassify.o(i.__ARM_fpclassify) + __hardfp_sqrtf 0x08001fb3 Thumb Code 58 sqrtf.o(i.__hardfp_sqrtf) + _get_lc_numeric 0x08001fed Thumb Code 44 lc_numeric_c.o(locale$$code) + __fpl_dretinf 0x08002019 Thumb Code 12 dretinf.o(x$fpl$dretinf) + __aeabi_f2d 0x08002025 Thumb Code 0 f2d.o(x$fpl$f2d) + _f2d 0x08002025 Thumb Code 86 f2d.o(x$fpl$f2d) + __fpl_fnaninf 0x0800207b Thumb Code 140 fnaninf.o(x$fpl$fnaninf) + _fp_init 0x08002107 Thumb Code 26 fpinit.o(x$fpl$fpinit) + __fplib_config_fpu_vfp 0x0800211f Thumb Code 0 fpinit.o(x$fpl$fpinit) + __fplib_config_pureend_doubles 0x0800211f Thumb Code 0 fpinit.o(x$fpl$fpinit) + _printf_fp_dec 0x08002121 Thumb Code 4 printf1.o(x$fpl$printf1) + __I$use$fp 0x08002124 Number 0 usenofp.o(x$fpl$usenofp) + testMarks_f32 0x080021d0 Data 320 main.o(.rodata.testMarks_f32) + testUnity_f32 0x08002310 Data 16 main.o(.rodata.testUnity_f32) + Region$$Table$$Base 0x08002320 Number 0 anon$$obj.o(Region$$Table) + Region$$Table$$Limit 0x08002340 Number 0 anon$$obj.o(Region$$Table) numStudents 0x20000000 Data 4 main.o(.data.numStudents) system_core_clock 0x20000004 Data 4 system_at32f435_437.o(.data.system_core_clock) __libspace_start 0x20000008 Data 96 libspace.o(.bss) @@ -3590,9 +3590,9 @@ Memory Map of the image Image Entry point : 0x0800020d - Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002370, Max: 0x003f0000, ABSOLUTE) + Load Region LR_IROM1 (Base: 0x08000000, Size: 0x00002368, Max: 0x003f0000, ABSOLUTE) - Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x00002364, Max: 0x003f0000, ABSOLUTE) + Execution Region ER_IROM1 (Exec base: 0x08000000, Load base: 0x08000000, Size: 0x0000235c, Max: 0x003f0000, ABSOLUTE) Exec Addr Load Addr Size Type Attr Idx E Section Name Object @@ -3688,92 +3688,91 @@ Memory Map of the image 0x08000b1e 0x08000b1e 0x00000002 PAD 0x08000b20 0x08000b20 0x00000002 Code RO 41 .text.SysTick_Handler at32f435_437_int.o 0x08000b22 0x08000b22 0x00000002 PAD - 0x08000b24 0x08000b24 0x0000006c Code RO 105 .text.SystemInit system_at32f435_437.o - 0x08000b90 0x08000b90 0x00000002 Code RO 33 .text.UsageFault_Handler at32f435_437_int.o + 0x08000b24 0x08000b24 0x00000068 Code RO 105 .text.SystemInit system_at32f435_437.o + 0x08000b8c 0x08000b8c 0x00000002 Code RO 33 .text.UsageFault_Handler at32f435_437_int.o + 0x08000b8e 0x08000b8e 0x00000002 PAD + 0x08000b90 0x08000b90 0x00000002 Code RO 58 .text._sys_exit at32f435_437_board.o 0x08000b92 0x08000b92 0x00000002 PAD - 0x08000b94 0x08000b94 0x00000002 Code RO 58 .text._sys_exit at32f435_437_board.o - 0x08000b96 0x08000b96 0x00000002 PAD - 0x08000b98 0x08000b98 0x00000158 Code RO 1032 .text.arm_mat_mult_f32 matrixfunctions.o - 0x08000cf0 0x08000cf0 0x000000ce Code RO 1106 .text.arm_max_f32 statisticsfunctions.o - 0x08000dbe 0x08000dbe 0x00000002 PAD - 0x08000dc0 0x08000dc0 0x00000080 Code RO 1116 .text.arm_mean_f32 statisticsfunctions.o - 0x08000e40 0x08000e40 0x000000ce Code RO 1124 .text.arm_min_f32 statisticsfunctions.o - 0x08000f0e 0x08000f0e 0x00000002 PAD - 0x08000f10 0x08000f10 0x00000050 Code RO 1146 .text.arm_std_f32 statisticsfunctions.o - 0x08000f60 0x08000f60 0x0000012c Code RO 1148 .text.arm_var_f32 statisticsfunctions.o - 0x0800108c 0x0800108c 0x0000001a Code RO 155 .text.crm_ahb_div_set at32f435_437_crm.o - 0x080010a6 0x080010a6 0x00000002 PAD - 0x080010a8 0x080010a8 0x0000001a Code RO 157 .text.crm_apb1_div_set at32f435_437_crm.o - 0x080010c2 0x080010c2 0x00000002 PAD - 0x080010c4 0x080010c4 0x0000001a Code RO 159 .text.crm_apb2_div_set at32f435_437_crm.o - 0x080010de 0x080010de 0x00000002 PAD - 0x080010e0 0x080010e0 0x0000001a Code RO 167 .text.crm_auto_step_mode_enable at32f435_437_crm.o - 0x080010fa 0x080010fa 0x00000002 PAD - 0x080010fc 0x080010fc 0x0000007a Code RO 147 .text.crm_clock_source_enable at32f435_437_crm.o - 0x08001176 0x08001176 0x00000002 PAD - 0x08001178 0x08001178 0x000000ac Code RO 183 .text.crm_clocks_freq_get at32f435_437_crm.o - 0x08001224 0x08001224 0x0000001a Code RO 133 .text.crm_flag_get at32f435_437_crm.o - 0x0800123e 0x0800123e 0x00000002 PAD - 0x08001240 0x08001240 0x00000028 Code RO 135 .text.crm_hext_stable_wait at32f435_437_crm.o - 0x08001268 0x08001268 0x00000028 Code RO 141 .text.crm_periph_clock_enable at32f435_437_crm.o - 0x08001290 0x08001290 0x0000004c Code RO 177 .text.crm_pll_config at32f435_437_crm.o - 0x080012dc 0x080012dc 0x00000050 Code RO 127 .text.crm_reset at32f435_437_crm.o - 0x0800132c 0x0800132c 0x00000012 Code RO 179 .text.crm_sysclk_switch at32f435_437_crm.o - 0x0800133e 0x0800133e 0x00000002 PAD - 0x08001340 0x08001340 0x00000010 Code RO 181 .text.crm_sysclk_switch_status_get at32f435_437_crm.o - 0x08001350 0x08001350 0x00000024 Code RO 62 .text.fputc at32f435_437_board.o - 0x08001374 0x08001374 0x0000000e Code RO 209 .text.gpio_default_para_init at32f435_437_gpio.o - 0x08001382 0x08001382 0x00000002 PAD - 0x08001384 0x08001384 0x00000084 Code RO 207 .text.gpio_init at32f435_437_gpio.o - 0x08001408 0x08001408 0x0000002e Code RO 231 .text.gpio_pin_mux_config at32f435_437_gpio.o - 0x08001436 0x08001436 0x00000002 PAD - 0x08001438 0x08001438 0x0000014c Code RO 2 .text.main main.o - 0x08001584 0x08001584 0x00000094 Code RO 50 .text.system_clock_config at32f435_437_clock.o - 0x08001618 0x08001618 0x0000008c Code RO 107 .text.system_core_clock_update system_at32f435_437.o - 0x080016a4 0x080016a4 0x0000006e Code RO 64 .text.uart_print_init at32f435_437_board.o - 0x08001712 0x08001712 0x00000002 PAD - 0x08001714 0x08001714 0x00000008 Code RO 309 .text.usart_data_transmit at32f435_437_usart.o - 0x0800171c 0x0800171c 0x00000012 Code RO 283 .text.usart_enable at32f435_437_usart.o - 0x0800172e 0x0800172e 0x00000002 PAD - 0x08001730 0x08001730 0x0000000a Code RO 331 .text.usart_flag_get at32f435_437_usart.o - 0x0800173a 0x0800173a 0x00000002 PAD - 0x0800173c 0x0800173c 0x000000a6 Code RO 279 .text.usart_init at32f435_437_usart.o - 0x080017e2 0x080017e2 0x00000002 PAD - 0x080017e4 0x080017e4 0x00000012 Code RO 285 .text.usart_transmitter_enable at32f435_437_usart.o - 0x080017f6 0x080017f6 0x0000003e Code RO 1701 CL$$btod_d2e c_w.l(btod.o) - 0x08001834 0x08001834 0x00000046 Code RO 1703 CL$$btod_d2e_denorm_low c_w.l(btod.o) - 0x0800187a 0x0800187a 0x00000060 Code RO 1702 CL$$btod_d2e_norm_op1 c_w.l(btod.o) - 0x080018da 0x080018da 0x00000338 Code RO 1711 CL$$btod_div_common c_w.l(btod.o) - 0x08001c12 0x08001c12 0x000000dc Code RO 1708 CL$$btod_e2e c_w.l(btod.o) - 0x08001cee 0x08001cee 0x0000002a Code RO 1705 CL$$btod_ediv c_w.l(btod.o) - 0x08001d18 0x08001d18 0x0000002a Code RO 1704 CL$$btod_emul c_w.l(btod.o) - 0x08001d42 0x08001d42 0x00000244 Code RO 1710 CL$$btod_mult_common c_w.l(btod.o) - 0x08001f86 0x08001f86 0x00000030 Code RO 1734 i.__ARM_fpclassify m_wm.l(fpclassify.o) - 0x08001fb6 0x08001fb6 0x0000003a Code RO 1573 i.__hardfp_sqrtf m_wm.l(sqrtf.o) - 0x08001ff0 0x08001ff0 0x0000002c Code RO 1730 locale$$code c_w.l(lc_numeric_c.o) - 0x0800201c 0x0800201c 0x0000000c Code RO 1623 x$fpl$dretinf fz_wm.l(dretinf.o) - 0x08002028 0x08002028 0x00000056 Code RO 1509 x$fpl$f2d fz_wm.l(f2d.o) - 0x0800207e 0x0800207e 0x0000008c Code RO 1625 x$fpl$fnaninf fz_wm.l(fnaninf.o) - 0x0800210a 0x0800210a 0x0000001a Code RO 1816 x$fpl$fpinit fz_wm.l(fpinit.o) - 0x08002124 0x08002124 0x00000004 Code RO 1515 x$fpl$printf1 fz_wm.l(printf1.o) - 0x08002128 0x08002128 0x00000000 Code RO 1631 x$fpl$usenofp fz_wm.l(usenofp.o) - 0x08002128 0x08002128 0x00000094 Data RO 1699 .constdata c_w.l(bigflt0.o) - 0x080021bc 0x080021bc 0x00000004 PAD - 0x080021c0 0x080021c0 0x00000008 Data RO 11 .rodata..L__const.main.dstC main.o - 0x080021c8 0x080021c8 0x00000008 Data RO 8 .rodata..L__const.main.srcA main.o - 0x080021d0 0x080021d0 0x00000008 Data RO 9 .rodata..L__const.main.srcB main.o - 0x080021d8 0x080021d8 0x00000140 Data RO 4 .rodata.testMarks_f32 main.o - 0x08002318 0x08002318 0x00000010 Data RO 5 .rodata.testUnity_f32 main.o - 0x08002328 0x08002328 0x00000020 Data RO 1882 Region$$Table anon$$obj.o - 0x08002348 0x08002348 0x0000001c Data RO 1729 locale$$data c_w.l(lc_numeric_c.o) + 0x08000b94 0x08000b94 0x00000158 Code RO 1032 .text.arm_mat_mult_f32 matrixfunctions.o + 0x08000cec 0x08000cec 0x000000ce Code RO 1106 .text.arm_max_f32 statisticsfunctions.o + 0x08000dba 0x08000dba 0x00000002 PAD + 0x08000dbc 0x08000dbc 0x00000080 Code RO 1116 .text.arm_mean_f32 statisticsfunctions.o + 0x08000e3c 0x08000e3c 0x000000ce Code RO 1124 .text.arm_min_f32 statisticsfunctions.o + 0x08000f0a 0x08000f0a 0x00000002 PAD + 0x08000f0c 0x08000f0c 0x00000050 Code RO 1146 .text.arm_std_f32 statisticsfunctions.o + 0x08000f5c 0x08000f5c 0x0000012c Code RO 1148 .text.arm_var_f32 statisticsfunctions.o + 0x08001088 0x08001088 0x0000001a Code RO 155 .text.crm_ahb_div_set at32f435_437_crm.o + 0x080010a2 0x080010a2 0x00000002 PAD + 0x080010a4 0x080010a4 0x0000001a Code RO 157 .text.crm_apb1_div_set at32f435_437_crm.o + 0x080010be 0x080010be 0x00000002 PAD + 0x080010c0 0x080010c0 0x0000001a Code RO 159 .text.crm_apb2_div_set at32f435_437_crm.o + 0x080010da 0x080010da 0x00000002 PAD + 0x080010dc 0x080010dc 0x0000001a Code RO 167 .text.crm_auto_step_mode_enable at32f435_437_crm.o + 0x080010f6 0x080010f6 0x00000002 PAD + 0x080010f8 0x080010f8 0x0000007a Code RO 147 .text.crm_clock_source_enable at32f435_437_crm.o + 0x08001172 0x08001172 0x00000002 PAD + 0x08001174 0x08001174 0x000000ac Code RO 183 .text.crm_clocks_freq_get at32f435_437_crm.o + 0x08001220 0x08001220 0x0000001a Code RO 133 .text.crm_flag_get at32f435_437_crm.o + 0x0800123a 0x0800123a 0x00000002 PAD + 0x0800123c 0x0800123c 0x00000028 Code RO 135 .text.crm_hext_stable_wait at32f435_437_crm.o + 0x08001264 0x08001264 0x00000028 Code RO 141 .text.crm_periph_clock_enable at32f435_437_crm.o + 0x0800128c 0x0800128c 0x0000004c Code RO 177 .text.crm_pll_config at32f435_437_crm.o + 0x080012d8 0x080012d8 0x00000050 Code RO 127 .text.crm_reset at32f435_437_crm.o + 0x08001328 0x08001328 0x00000012 Code RO 179 .text.crm_sysclk_switch at32f435_437_crm.o + 0x0800133a 0x0800133a 0x00000002 PAD + 0x0800133c 0x0800133c 0x00000010 Code RO 181 .text.crm_sysclk_switch_status_get at32f435_437_crm.o + 0x0800134c 0x0800134c 0x00000024 Code RO 62 .text.fputc at32f435_437_board.o + 0x08001370 0x08001370 0x0000000e Code RO 209 .text.gpio_default_para_init at32f435_437_gpio.o + 0x0800137e 0x0800137e 0x00000002 PAD + 0x08001380 0x08001380 0x00000084 Code RO 207 .text.gpio_init at32f435_437_gpio.o + 0x08001404 0x08001404 0x0000002e Code RO 231 .text.gpio_pin_mux_config at32f435_437_gpio.o + 0x08001432 0x08001432 0x00000002 PAD + 0x08001434 0x08001434 0x0000014c Code RO 2 .text.main main.o + 0x08001580 0x08001580 0x00000094 Code RO 50 .text.system_clock_config at32f435_437_clock.o + 0x08001614 0x08001614 0x0000008c Code RO 107 .text.system_core_clock_update system_at32f435_437.o + 0x080016a0 0x080016a0 0x0000006e Code RO 64 .text.uart_print_init at32f435_437_board.o + 0x0800170e 0x0800170e 0x00000002 PAD + 0x08001710 0x08001710 0x00000008 Code RO 309 .text.usart_data_transmit at32f435_437_usart.o + 0x08001718 0x08001718 0x00000012 Code RO 283 .text.usart_enable at32f435_437_usart.o + 0x0800172a 0x0800172a 0x00000002 PAD + 0x0800172c 0x0800172c 0x0000000a Code RO 331 .text.usart_flag_get at32f435_437_usart.o + 0x08001736 0x08001736 0x00000002 PAD + 0x08001738 0x08001738 0x000000a6 Code RO 279 .text.usart_init at32f435_437_usart.o + 0x080017de 0x080017de 0x00000002 PAD + 0x080017e0 0x080017e0 0x00000012 Code RO 285 .text.usart_transmitter_enable at32f435_437_usart.o + 0x080017f2 0x080017f2 0x0000003e Code RO 1701 CL$$btod_d2e c_w.l(btod.o) + 0x08001830 0x08001830 0x00000046 Code RO 1703 CL$$btod_d2e_denorm_low c_w.l(btod.o) + 0x08001876 0x08001876 0x00000060 Code RO 1702 CL$$btod_d2e_norm_op1 c_w.l(btod.o) + 0x080018d6 0x080018d6 0x00000338 Code RO 1711 CL$$btod_div_common c_w.l(btod.o) + 0x08001c0e 0x08001c0e 0x000000dc Code RO 1708 CL$$btod_e2e c_w.l(btod.o) + 0x08001cea 0x08001cea 0x0000002a Code RO 1705 CL$$btod_ediv c_w.l(btod.o) + 0x08001d14 0x08001d14 0x0000002a Code RO 1704 CL$$btod_emul c_w.l(btod.o) + 0x08001d3e 0x08001d3e 0x00000244 Code RO 1710 CL$$btod_mult_common c_w.l(btod.o) + 0x08001f82 0x08001f82 0x00000030 Code RO 1734 i.__ARM_fpclassify m_wm.l(fpclassify.o) + 0x08001fb2 0x08001fb2 0x0000003a Code RO 1573 i.__hardfp_sqrtf m_wm.l(sqrtf.o) + 0x08001fec 0x08001fec 0x0000002c Code RO 1730 locale$$code c_w.l(lc_numeric_c.o) + 0x08002018 0x08002018 0x0000000c Code RO 1623 x$fpl$dretinf fz_wm.l(dretinf.o) + 0x08002024 0x08002024 0x00000056 Code RO 1509 x$fpl$f2d fz_wm.l(f2d.o) + 0x0800207a 0x0800207a 0x0000008c Code RO 1625 x$fpl$fnaninf fz_wm.l(fnaninf.o) + 0x08002106 0x08002106 0x0000001a Code RO 1816 x$fpl$fpinit fz_wm.l(fpinit.o) + 0x08002120 0x08002120 0x00000004 Code RO 1515 x$fpl$printf1 fz_wm.l(printf1.o) + 0x08002124 0x08002124 0x00000000 Code RO 1631 x$fpl$usenofp fz_wm.l(usenofp.o) + 0x08002124 0x08002124 0x00000094 Data RO 1699 .constdata c_w.l(bigflt0.o) + 0x080021b8 0x080021b8 0x00000008 Data RO 11 .rodata..L__const.main.dstC main.o + 0x080021c0 0x080021c0 0x00000008 Data RO 8 .rodata..L__const.main.srcA main.o + 0x080021c8 0x080021c8 0x00000008 Data RO 9 .rodata..L__const.main.srcB main.o + 0x080021d0 0x080021d0 0x00000140 Data RO 4 .rodata.testMarks_f32 main.o + 0x08002310 0x08002310 0x00000010 Data RO 5 .rodata.testUnity_f32 main.o + 0x08002320 0x08002320 0x00000020 Data RO 1882 Region$$Table anon$$obj.o + 0x08002340 0x08002340 0x0000001c Data RO 1729 locale$$data c_w.l(lc_numeric_c.o) - Execution Region RW_IRAM1 (Exec base: 0x20000000, Load base: 0x08002368, Size: 0x00000818, Max: 0x00060000, ABSOLUTE) + Execution Region RW_IRAM1 (Exec base: 0x20000000, Load base: 0x08002360, Size: 0x00000818, Max: 0x00060000, ABSOLUTE) Exec Addr Load Addr Size Type Attr Idx E Section Name Object - 0x20000000 0x08002368 0x00000004 Data RW 6 .data.numStudents main.o - 0x20000004 0x0800236c 0x00000004 Data RW 109 .data.system_core_clock system_at32f435_437.o + 0x20000000 0x08002360 0x00000004 Data RW 6 .data.numStudents main.o + 0x20000004 0x08002364 0x00000004 Data RW 109 .data.system_core_clock system_at32f435_437.o 0x20000008 - 0x00000060 Zero RW 1737 .bss c_w.l(libspace.o) 0x20000068 - 0x00000054 Zero RW 96 .bss.__stdout at32f435_437_board.o 0x200000bc - 0x00000004 Zero RW 12 .bss.max_marks main.o @@ -3783,7 +3782,7 @@ Memory Map of the image 0x200000cc - 0x00000004 Zero RW 13 .bss.student_num main.o 0x200000d0 - 0x00000140 Zero RW 10 .bss.testOutput main.o 0x20000210 - 0x00000004 Zero RW 17 .bss.var main.o - 0x20000214 0x08002370 0x00000004 PAD + 0x20000214 0x08002368 0x00000004 PAD 0x20000218 - 0x00000200 Zero RW 118 HEAP startup_at32f435_437.o 0x20000418 - 0x00000400 Zero RW 117 STACK startup_at32f435_437.o @@ -3797,18 +3796,18 @@ Image component sizes 148 0 0 0 84 14952 at32f435_437_board.o 148 0 0 0 0 8562 at32f435_437_clock.o - 694 38 0 0 0 28043 at32f435_437_crm.o + 694 38 0 0 0 28141 at32f435_437_crm.o 192 0 0 0 0 12063 at32f435_437_gpio.o 18 0 0 0 0 1083 at32f435_437_int.o - 220 0 0 0 0 12604 at32f435_437_usart.o + 220 0 0 0 0 12665 at32f435_437_usart.o 332 64 360 4 344 1461 main.o 344 4 0 0 0 43566 matrixfunctions.o 64 26 524 0 1536 1044 startup_at32f435_437.o 920 12 0 0 0 23010 statisticsfunctions.o - 248 24 0 4 0 11841 system_at32f435_437.o + 244 24 0 4 0 11833 system_at32f435_437.o ---------------------------------------------------------------------- - 3378 168 916 8 1968 158229 Object Totals + 3374 168 916 8 1968 158380 Object Totals 0 0 32 0 0 0 (incl. Generated) 50 0 0 0 4 0 (incl. Padding) @@ -3863,8 +3862,8 @@ Image component sizes 58 0 0 0 0 136 sqrtf.o ---------------------------------------------------------------------- - 4586 200 180 0 96 3348 Library Totals - 12 0 4 0 0 0 (incl. Padding) + 4586 200 176 0 96 3348 Library Totals + 12 0 0 0 0 0 (incl. Padding) ---------------------------------------------------------------------- @@ -3875,7 +3874,7 @@ Image component sizes 106 0 0 0 0 260 m_wm.l ---------------------------------------------------------------------- - 4586 200 180 0 96 3348 Library Totals + 4586 200 176 0 96 3348 Library Totals ---------------------------------------------------------------------- @@ -3884,15 +3883,15 @@ Image component sizes Code (inc. data) RO Data RW Data ZI Data Debug - 7964 368 1096 8 2064 159633 Grand Totals - 7964 368 1096 8 2064 159633 ELF Image Totals - 7964 368 1096 8 0 0 ROM Totals + 7960 368 1092 8 2064 159784 Grand Totals + 7960 368 1092 8 2064 159784 ELF Image Totals + 7960 368 1092 8 0 0 ROM Totals ============================================================================== - Total RO Size (Code + RO Data) 9060 ( 8.85kB) + Total RO Size (Code + RO Data) 9052 ( 8.84kB) Total RW Size (RW Data + ZI Data) 2072 ( 2.02kB) - Total ROM Size (Code + RO Data + RW Data) 9068 ( 8.86kB) + Total ROM Size (Code + RO Data + RW Data) 9060 ( 8.85kB) ============================================================================== diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/startup_at32f435_437.lst b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/startup_at32f435_437.lst index fbbb4995..b5c5f052 100644 --- a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/startup_at32f435_437.lst +++ b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Listings/startup_at32f435_437.lst @@ -7,8 +7,8 @@ ARM Macro Assembler Page 1 1 00000000 ;******************************************************* ******************* 2 00000000 ;* @file startup_at32f435_437.s - 3 00000000 ;* @version v2.0.8 - 4 00000000 ;* @date 2022-04-25 + 3 00000000 ;* @version v2.0.9 + 4 00000000 ;* @date 2022-06-28 5 00000000 ;* @brief at32f435_437 startup file for keil 6 00000000 ;******************************************************* ******************* diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_board.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_board.o index be7fd85e..243feaf1 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_board.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_board.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_clock.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_clock.o index c2cf7c76..310a2b1c 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_clock.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_clock.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_crm.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_crm.o index a6def3e9..57dc8f1a 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_crm.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_crm.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_gpio.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_gpio.o index 4a38ca2d..891a4bd1 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_gpio.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_gpio.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_int.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_int.o index 14634746..338e8820 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_int.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_int.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_misc.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_misc.o index 0d88204a..d9354ae5 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_misc.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_misc.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_usart.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_usart.o index c4fc7896..ef05dd69 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_usart.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/at32f435_437_usart.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/basicmathfunctions.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/basicmathfunctions.o index 2aac7766..75c48107 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/basicmathfunctions.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/basicmathfunctions.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/bayesfunctions.o b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/bayesfunctions.o index d4b7e729..3b4f214e 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/bayesfunctions.o and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/bayesfunctions.o differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.axf b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.axf index 3af128e0..e3d78e5b 100644 Binary files a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.axf and b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.axf differ diff --git a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.build_log.htm b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.build_log.htm index 6f7026f2..84db4009 100644 --- a/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.build_log.htm +++ b/project/at_start_f435/examples/cortex_m4/cmsis_dsp/mdk_v5/Objects/cmsis_dsp.build_log.htm @@ -21,37 +21,37 @@ Target DLL: UL2CM3.DLL V1.163.4.0 Dialog DLL: TCM.DLL V1.46.0.0