update version to v2.0.7

This commit is contained in:
Artery-MCU
2022-08-26 14:45:50 +08:00
parent ac9d1046b7
commit d95c5fb9e8
1103 changed files with 13792 additions and 2269 deletions

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_adc.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 adc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_can.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 can header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_cmp.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 cmp header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_crc.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 crc header file
**************************************************************************
* Copyright notice & Disclaimer
@@ -148,7 +148,7 @@ uint32_t crc_one_word_calculate(uint32_t data);
uint32_t crc_block_calculate(uint32_t *pbuffer, uint32_t length);
uint32_t crc_data_get(void);
void crc_common_data_set(uint8_t cdt_value);
uint8_t crc_common_date_get(void);
uint8_t crc_common_data_get(void);
void crc_init_data_set(uint32_t value);
void crc_reverse_input_data_set(crc_reverse_input_type value);
void crc_reverse_output_data_set(crc_reverse_output_type value);

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_crm.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 crm header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_debug.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 debug header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_def.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 macros header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_dma.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 dma header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_ertc.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 ertc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_exint.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 exint header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_flash.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 flash header file
**************************************************************************
* Copyright notice & Disclaimer
@@ -141,7 +141,7 @@ extern "C" {
* - FLASH_WAIT_CYCLE_3
* - FLASH_WAIT_CYCLE_4
*/
#define flash_psr_set(wtcyc) (FLASH->psr |= (uint32_t)(0x150 | wtcyc))
#define flash_psr_set(wtcyc) (FLASH->psr = (uint32_t)(0x150 | wtcyc))
/** @defgroup FLASH_exported_types
* @{

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_gpio.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 gpio header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_i2c.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 i2c header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_misc.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 misc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_pwc.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 pwc header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_sdio.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 sdio header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_spi.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 spi header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_tmr.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 tmr header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_usart.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 usart header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_usb.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 usb header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_wdt.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 wdt header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_wwdt.h
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief at32f415 wwdt header file
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_adc.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the adc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_can.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the can firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_cmp.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the gpio firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_crc.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the crc firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -106,7 +106,7 @@ void crc_common_data_set(uint8_t cdt_value)
* @param none
* @retval 8-bit value of the common data register
*/
uint8_t crc_common_date_get(void)
uint8_t crc_common_data_get(void)
{
return (CRC->cdt_bit.cdt);
}

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_crm.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the crm firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_debug.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the debug firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_dma.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the dma firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_ertc.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the ertc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_exint.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the exint firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_flash.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the flash firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_gpio.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the gpio firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_i2c.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the i2c firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_misc.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the misc firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_pwc.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the pwc firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -228,7 +228,10 @@ void pwc_standby_mode_enter(void)
#if defined (__CC_ARM)
__force_stores();
#endif
__WFI();
while(1)
{
__WFI();
}
}
/**

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_sdio.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the sdio firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_spi.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the spi firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_tmr.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the tmr firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -225,11 +225,7 @@ void tmr_cnt_dir_set(tmr_type *tmr_x, tmr_count_mode_type tmr_cnt_dir)
void tmr_repetition_counter_set(tmr_type *tmr_x, uint8_t tmr_rpr_value)
{
/* set the repetition counter value */
if(tmr_x == TMR1)
{
tmr_x->rpr_bit.rpr = tmr_rpr_value;
}
tmr_x->rpr_bit.rpr = tmr_rpr_value;
}
/**
@@ -304,23 +300,23 @@ uint32_t tmr_div_value_get(tmr_type *tmr_x)
void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_channel,
tmr_output_config_type *tmr_output_struct)
{
uint16_t channel_index = 0, channel_c_index = 0, channel = 0;
uint16_t channel_index = 0, channel_c_index = 0, channel = 0, chx_offset, chcx_offset;
chx_offset = (8 + tmr_channel);
chcx_offset = (9 + tmr_channel);
/* get channel idle state bit position in ctrl2 register */
channel_index = (uint16_t)(tmr_output_struct->oc_idle_state << (8 + tmr_channel));
channel_index = (uint16_t)(tmr_output_struct->oc_idle_state << chx_offset);
/* get channel complementary idle state bit position in ctrl2 register */
channel_c_index = (uint16_t)(tmr_output_struct->occ_idle_state << (9 + tmr_channel));
channel_c_index = (uint16_t)(tmr_output_struct->occ_idle_state << chcx_offset);
if(tmr_x == TMR1)
{
/* set output channel complementary idle state */
tmr_x->ctrl2 &= ~channel_c_index;
tmr_x->ctrl2 |= channel_c_index;
}
/* set output channel complementary idle state */
tmr_x->ctrl2 &= ~(1<<chcx_offset);
tmr_x->ctrl2 |= channel_c_index;
/* set output channel idle state */
tmr_x->ctrl2 &= ~channel_index;
tmr_x->ctrl2 &= ~(1<<chx_offset);
tmr_x->ctrl2 |= channel_index;
/* set channel output mode */
@@ -348,38 +344,38 @@ void tmr_output_channel_config(tmr_type *tmr_x, tmr_channel_select_type tmr_chan
break;
}
chx_offset = ((tmr_channel * 2) + 1);
chcx_offset = ((tmr_channel * 2) + 3);
/* get channel polarity bit position in cctrl register */
channel_index = (uint16_t)(tmr_output_struct->oc_polarity << ((tmr_channel * 2) + 1));
channel_index = (uint16_t)(tmr_output_struct->oc_polarity << chx_offset);
/* get channel complementary polarity bit position in cctrl register */
channel_c_index = (uint16_t)(tmr_output_struct->occ_polarity << ((tmr_channel * 2) + 3));
channel_c_index = (uint16_t)(tmr_output_struct->occ_polarity << chcx_offset);
if(tmr_x == TMR1)
{
/* set output channel complementary polarity */
tmr_x->cctrl &= ~channel_c_index;
tmr_x->cctrl |= channel_c_index;
}
/* set output channel complementary polarity */
tmr_x->cctrl &= ~(1<<chcx_offset);
tmr_x->cctrl |= channel_c_index;
/* set output channel polarity */
tmr_x->cctrl &= ~channel_index;
tmr_x->cctrl &= ~(1<<chx_offset);
tmr_x->cctrl |= channel_index;
chx_offset = (tmr_channel * 2);
chcx_offset = ((tmr_channel * 2) + 2);
/* get channel enable bit position in cctrl register */
channel_index = (uint16_t)(tmr_output_struct->oc_output_state << (tmr_channel * 2));
/* get channel complementary enable bit position in cctrl register */
channel_c_index = (uint16_t)(tmr_output_struct->occ_output_state << ((tmr_channel * 2) + 2));
if(tmr_x == TMR1)
{
/* set output channel complementary enable bit */
tmr_x->cctrl &= ~channel_c_index;
tmr_x->cctrl |= channel_c_index;
}
/* set output channel complementary enable bit */
tmr_x->cctrl &= ~(1<<chcx_offset);
tmr_x->cctrl |= channel_c_index;
/* set output channel enable bit */
tmr_x->cctrl &= ~channel_index;
tmr_x->cctrl &= ~(1<<chx_offset);
tmr_x->cctrl |= channel_index;
}
@@ -788,6 +784,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
switch(channel)
{
case TMR_SELECT_CHANNEL_1:
tmr_x->cctrl_bit.c1en = FALSE;
tmr_x->cctrl_bit.c1p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cctrl_bit.c1cp = (input_struct->input_polarity_select & 0x2) >> 1;
tmr_x->cm1_input_bit.c1c = input_struct->input_mapped_select;
@@ -797,6 +794,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
break;
case TMR_SELECT_CHANNEL_2:
tmr_x->cctrl_bit.c2en = FALSE;
tmr_x->cctrl_bit.c2p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cctrl_bit.c2cp = (input_struct->input_polarity_select & 0x2) >> 1;
tmr_x->cm1_input_bit.c2c = input_struct->input_mapped_select;
@@ -806,6 +804,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
break;
case TMR_SELECT_CHANNEL_3:
tmr_x->cctrl_bit.c3en = FALSE;
tmr_x->cctrl_bit.c3p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cctrl_bit.c3cp = (input_struct->input_polarity_select & 0x2) >> 1;
tmr_x->cm2_input_bit.c3c = input_struct->input_mapped_select;
@@ -815,6 +814,7 @@ void tmr_input_channel_init(tmr_type *tmr_x, tmr_input_config_type *input_struct
break;
case TMR_SELECT_CHANNEL_4:
tmr_x->cctrl_bit.c4en = FALSE;
tmr_x->cctrl_bit.c4p = (uint32_t)input_struct->input_polarity_select;
tmr_x->cm2_input_bit.c4c = input_struct->input_mapped_select;
tmr_x->cm2_input_bit.c4df = input_struct->input_filter_value;

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_usart.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the usart firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_usb.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the usb firmware library
**************************************************************************
* Copyright notice & Disclaimer
@@ -1015,11 +1015,10 @@ void usb_hch_halt(otg_global_type *usbx, uint8_t chn)
usb_chh->hcchar_bit.eptype == EPT_BULK_TYPE)
{
usb_chh->hcchar_bit.chdis = TRUE;
if((usbx->gnptxsts & 0xFFFF) == 0)
if((usbx->gnptxsts_bit.nptxqspcavail) == 0)
{
usb_chh->hcchar_bit.chena = FALSE;
usb_chh->hcchar_bit.chena = TRUE;
usb_chh->hcchar_bit.eptdir = 0;
do
{
if(count ++ > 1000)
@@ -1034,11 +1033,10 @@ void usb_hch_halt(otg_global_type *usbx, uint8_t chn)
else
{
usb_chh->hcchar_bit.chdis = TRUE;
if((usb_host->hptxsts & 0xFFFF) == 0)
if((usb_host->hptxsts_bit.ptxqspcavil) == 0)
{
usb_chh->hcchar_bit.chena = FALSE;
usb_chh->hcchar_bit.chena = TRUE;
usb_chh->hcchar_bit.eptdir = 0;
do
{
if(count ++ > 1000)

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_wdt.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the wdt firmware library
**************************************************************************
* Copyright notice & Disclaimer

View File

@@ -1,8 +1,8 @@
/**
**************************************************************************
* @file at32f415_wwdt.c
* @version v2.0.6
* @date 2022-06-28
* @version v2.0.7
* @date 2022-08-16
* @brief contains all the functions for the wwdt firmware library
**************************************************************************
* Copyright notice & Disclaimer