feat: 更新CMSIS和GD32C10x_DFP包版本并优化代码
- 升级ARM::CMSIS从4.5.0到6.1.0版本 - 添加ARM::CMSIS-DSP@1.16.2依赖包 - 升级GigaDevice::GD32C10x_DFP从1.0.1到1.5.0版本 - 移除FOC.cpp中未使用的systick.h头文件 - 移除pid.cpp中未使用的<algorithm>头文件 - 更新GD32C10x固件库至V1.7.0版本(2026-01-30) - 修复ADC驱动中的无符号整数运算问题 - 优化BKP、CAN、CTC等外设驱动中的FlagStatus返回逻辑 - 改进CAN驱动的消息发送和传输停止函数实现 - 修复CRC、DMA、FMC等驱动中的数据类型和变量声明问题 - 清理和修正各驱动文件中的文档注释
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
\file gd32c10x_rcu.c
|
||||
\brief RCU driver
|
||||
|
||||
\version 2025-08-07, V1.6.0, firmware for GD32C10x
|
||||
\version 2026-01-30, V1.7.0, firmware for GD32C10x
|
||||
*/
|
||||
|
||||
/*
|
||||
Copyright (c) 2025, GigaDevice Semiconductor Inc.
|
||||
Copyright (c) 2026, GigaDevice Semiconductor Inc.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without modification,
|
||||
are permitted provided that the following conditions are met:
|
||||
@@ -565,7 +565,7 @@ void rcu_adc_clock_config(uint32_t adc_psc)
|
||||
|
||||
/*!
|
||||
\brief configure the USBFS prescaler factor
|
||||
\param[in] adc_div: USB prescaler factor
|
||||
\param[in] usb_psc: USB prescaler factor
|
||||
only one parameter can be selected which is shown as below:
|
||||
\arg RCU_CKUSB_CKPLL_DIV1_5: USBFS prescaler select CK_PLL/1.5
|
||||
\arg RCU_CKUSB_CKPLL_DIV1: USBFS prescaler select CK_PLL/1
|
||||
@@ -690,12 +690,16 @@ void rcu_ck48m_clock_config(uint32_t ck48m_clock_source)
|
||||
*/
|
||||
FlagStatus rcu_flag_get(rcu_flag_enum flag)
|
||||
{
|
||||
FlagStatus rcu_flag = RESET;
|
||||
|
||||
/* get the rcu flag */
|
||||
if(RESET != (RCU_REG_VAL(flag) & BIT(RCU_BIT_POS(flag)))){
|
||||
return SET;
|
||||
rcu_flag = SET;
|
||||
}else{
|
||||
return RESET;
|
||||
rcu_flag = RESET;
|
||||
}
|
||||
|
||||
return rcu_flag;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -727,12 +731,16 @@ void rcu_all_reset_flag_clear(void)
|
||||
*/
|
||||
FlagStatus rcu_interrupt_flag_get(rcu_int_flag_enum int_flag)
|
||||
{
|
||||
FlagStatus rcu_int_flag = RESET;
|
||||
|
||||
/* get the rcu interrupt flag */
|
||||
if(RESET != (RCU_REG_VAL(int_flag) & BIT(RCU_BIT_POS(int_flag)))){
|
||||
return SET;
|
||||
rcu_int_flag = SET;
|
||||
}else{
|
||||
return RESET;
|
||||
rcu_int_flag = RESET;
|
||||
}
|
||||
|
||||
return rcu_int_flag;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user