update version to v2.1.6

This commit is contained in:
Artery-MCU
2025-04-29 13:41:48 +08:00
parent f6fe62dfec
commit f4e3505c4a
66 changed files with 2914 additions and 13481 deletions

View File

@@ -764,6 +764,7 @@ flag_status gpio_output_data_bit_read(gpio_type *gpio_x, uint16_t pins);
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_toggle(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_write(gpio_type *gpio_x, uint16_t port_value);
void gpio_pin_wp_config(gpio_type *gpio_x, uint16_t pins);

View File

@@ -239,7 +239,7 @@ void flash_spim_unlock(void)
{
FLASH->unlock3 = FLASH_UNLOCK_KEY1;
FLASH->unlock3 = FLASH_UNLOCK_KEY2;
UNUSED(*(__IO uint32_t*)USD_BASE);
UNUSED(*(__IO uint32_t*)USD_BASE);
}
/**
@@ -744,8 +744,8 @@ void flash_interrupt_enable(uint32_t flash_int, confirm_state new_state)
*/
void flash_spim_model_select(flash_spim_model_type mode)
{
UNUSED(*(__IO uint32_t*)USD_BASE);
FLASH->select = mode;
/* dummy read */
flash_spim_dummy_read();
}

View File

@@ -341,6 +341,37 @@ void gpio_bits_reset(gpio_type *gpio_x, uint16_t pins)
gpio_x->clr = pins;
}
/**
* @brief toggle the selected data port bits.
* @param gpio_x: to select the gpio peripheral.
* this parameter can be one of the following values:
* GPIOA, GPIOB, GPIOC, GPIOD, GPIOF.
* @param pins: gpio pin number
* parameter can be any combination of gpio_pin_x, gpio_pin_x as following values:
* - GPIO_PINS_0
* - GPIO_PINS_1
* - GPIO_PINS_2
* - GPIO_PINS_3
* - GPIO_PINS_4
* - GPIO_PINS_5
* - GPIO_PINS_6
* - GPIO_PINS_7
* - GPIO_PINS_8
* - GPIO_PINS_9
* - GPIO_PINS_10
* - GPIO_PINS_11
* - GPIO_PINS_12
* - GPIO_PINS_13
* - GPIO_PINS_14
* - GPIO_PINS_15
* - GPIO_PINS_ALL
* @retval none
*/
void gpio_bits_toggle(gpio_type *gpio_x, uint16_t pins)
{
gpio_x->odt ^= pins;
}
/**
* @brief set or clear the selected data port bit.
* @param gpio_x: to select the gpio peripheral.

View File

@@ -58,11 +58,11 @@ void rtc_counter_set(uint32_t counter_value)
}
/**
* @brief rtc counter get
* @brief rtc lowlevel counter get
* @param none
* @retval rtc counter
*/
uint32_t rtc_counter_get(void)
uint32_t rtc_lowlevel_counter_get(void)
{
uint32_t cnt = 0;
@@ -72,6 +72,28 @@ uint32_t rtc_counter_get(void)
return cnt;
}
/**
* @brief rtc counter get
* @param none
* @retval rtc counter
*/
uint32_t rtc_counter_get(void)
{
uint32_t cnt1 = 0;
uint32_t cnt2 = 0;
while(1)
{
cnt1 = rtc_lowlevel_counter_get();
cnt2 = rtc_lowlevel_counter_get();
if(cnt1 == cnt2)
{
return cnt1;
}
}
}
/**
* @brief rtc divider set
* @param div_value (0x0000_0000 ~ 0x000F_FFFF)

View File

@@ -90,7 +90,7 @@ void usart_reset(usart_type* usart_x)
* this parameter can be one of the following values:
* - USART_DATA_8BITS
* - USART_DATA_9BITS.
* note
* note:
* - when parity check is disabled, the data bit width is the actual data bit number.
* - when parity check is enabled, the data bit width is the actual data bit number minus 1, and the MSB bit is replaced with the parity bit.
* @param stop_bit: stop bits transmitted