mirror of
https://github.com/ArteryTek/AT32F415_Firmware_Library.git
synced 2026-05-21 01:12:20 +00:00
update version to v2.1.5
This commit is contained in:
@@ -128,7 +128,7 @@ extern "C" {
|
||||
*/
|
||||
#define __AT32F415_LIBRARY_VERSION_MAJOR (0x02) /*!< [31:24] major version */
|
||||
#define __AT32F415_LIBRARY_VERSION_MIDDLE (0x01) /*!< [23:16] middle version */
|
||||
#define __AT32F415_LIBRARY_VERSION_MINOR (0x04) /*!< [15:8] minor version */
|
||||
#define __AT32F415_LIBRARY_VERSION_MINOR (0x05) /*!< [15:8] minor version */
|
||||
#define __AT32F415_LIBRARY_VERSION_RC (0x00) /*!< [7:0] release candidate */
|
||||
#define __AT32F415_LIBRARY_VERSION ((__AT32F415_LIBRARY_VERSION_MAJOR << 24) | \
|
||||
(__AT32F415_LIBRARY_VERSION_MIDDLE << 16) | \
|
||||
|
||||
Binary file not shown.
@@ -85,6 +85,7 @@ extern "C" {
|
||||
typedef enum
|
||||
{
|
||||
EXINT_LINE_INTERRUPUT = 0x00, /*!< external interrupt line interrupt mode */
|
||||
EXINT_LINE_INTERRUPT = 0x00, /*!< same as EXINT_LINE_INTERRUPUT, fixed spelling error */
|
||||
EXINT_LINE_EVENT = 0x01 /*!< external interrupt line event mode */
|
||||
} exint_line_mode_type;
|
||||
|
||||
|
||||
@@ -83,7 +83,7 @@ void exint_init(exint_init_type *exint_struct)
|
||||
|
||||
if(exint_struct->line_enable != FALSE)
|
||||
{
|
||||
if(exint_struct->line_mode == EXINT_LINE_INTERRUPUT)
|
||||
if(exint_struct->line_mode == EXINT_LINE_INTERRUPT)
|
||||
{
|
||||
EXINT->inten |= line_index;
|
||||
}
|
||||
|
||||
@@ -362,7 +362,7 @@ flash_status_type flash_user_system_data_program(uint32_t address, uint8_t data)
|
||||
|
||||
/**
|
||||
* @brief config erase/program protection for the desired sectors.
|
||||
* @param sector_bits:
|
||||
* @param sector_bits(1:ENABLE, 0:DISABLE)
|
||||
* the pointer of the address of the sectors to be erase/program protected.
|
||||
* the first 31 bits general every bit is used to protect 2 sectors. the bit
|
||||
* 31 is used to protect the rest sectors and extension memory.
|
||||
|
||||
@@ -164,7 +164,14 @@ void i2c_init(i2c_type *i2c_x, i2c_fsmode_duty_cycle_type duty, uint32_t speed)
|
||||
i2c_x->clkctrl_bit.speedmode = TRUE;
|
||||
|
||||
/* set the maximum rise time */
|
||||
i2c_x->tmrise_bit.risetime = (uint16_t)(((freq_mhz * (uint16_t)300) / (uint16_t)1000) + (uint16_t)1);
|
||||
if(speed <= 400000)
|
||||
{
|
||||
i2c_x->tmrise_bit.risetime = (uint16_t)(((freq_mhz * (uint16_t)300) / (uint16_t)1000) + (uint16_t)1);
|
||||
}
|
||||
else
|
||||
{
|
||||
i2c_x->tmrise_bit.risetime = (uint16_t)(((freq_mhz * (uint16_t)120) / (uint16_t)1000) + (uint16_t)1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -695,13 +702,15 @@ void i2c_flag_clear(i2c_type *i2c_x, uint32_t flag)
|
||||
{
|
||||
i2c_x->sts1 = (uint16_t)~(flag & (uint32_t)0x0000DF00);
|
||||
|
||||
if(i2c_x->sts1 & I2C_ADDR7F_FLAG)
|
||||
if(flag & I2C_ADDR7F_FLAG)
|
||||
{
|
||||
UNUSED(i2c_x->sts1);
|
||||
UNUSED(i2c_x->sts2);
|
||||
}
|
||||
|
||||
if(i2c_x->sts1 & I2C_STOPF_FLAG)
|
||||
|
||||
if(flag & I2C_STOPF_FLAG)
|
||||
{
|
||||
UNUSED(i2c_x->sts1);
|
||||
i2c_x->ctrl1_bit.i2cen = TRUE;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user