feat(cbuild): 更新GD32C10x_DFP包到1.5.0版本并修复多个设备驱动文件
更新了项目中使用的GD32C10x_DFP包从1.0.1版本升级到1.5.0版本, 同时更新了多个RTE设备驱动文件以匹配新版本固件,包括ADC、BKP、CAN、CRC、CTC、DAC、DBG、DMA、EXMC、EXTI、FMC等外设驱动。修复了CAN驱动中的消息传输逻辑,改进了错误处理机制,并统一了标志位获取函数的返回值处理方式。
This commit is contained in:
@@ -2,11 +2,11 @@
|
||||
\file gd32c10x_ctc.c
|
||||
\brief CTC 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:
|
||||
@@ -79,7 +79,7 @@ void ctc_counter_disable(void)
|
||||
|
||||
/*!
|
||||
\brief configure the IRC48M trim value
|
||||
\param[in] ctc_trim_value: 8-bit IRC48M trim value
|
||||
\param[in] trim_value: 8-bit IRC48M trim value
|
||||
\arg 0x00 - 0x3F
|
||||
\param[out] none
|
||||
\retval none
|
||||
@@ -218,11 +218,14 @@ uint16_t ctc_counter_capture_value_read(void)
|
||||
*/
|
||||
FlagStatus ctc_counter_direction_read(void)
|
||||
{
|
||||
FlagStatus ret;
|
||||
|
||||
if(RESET != (CTC_STAT & CTC_STAT_REFDIR)){
|
||||
return SET;
|
||||
ret = SET;
|
||||
}else{
|
||||
return RESET;
|
||||
ret = RESET;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -300,7 +303,8 @@ void ctc_interrupt_disable(uint32_t interrupt)
|
||||
FlagStatus ctc_interrupt_flag_get(uint32_t interrupt)
|
||||
{
|
||||
uint32_t intflag = 0U, intenable = 0U;
|
||||
|
||||
FlagStatus ret;
|
||||
|
||||
/* check whether the interrupt is enabled */
|
||||
if(RESET != (interrupt & CTC_FLAG_MASK)){
|
||||
intenable = CTC_CTL0 & CTC_CTL0_ERRIE;
|
||||
@@ -312,10 +316,11 @@ FlagStatus ctc_interrupt_flag_get(uint32_t interrupt)
|
||||
intflag = CTC_STAT & interrupt;
|
||||
|
||||
if(intflag && intenable){
|
||||
return SET;
|
||||
ret = SET;
|
||||
}else{
|
||||
return RESET;
|
||||
ret = RESET;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
@@ -357,11 +362,14 @@ void ctc_interrupt_flag_clear(uint32_t interrupt)
|
||||
*/
|
||||
FlagStatus ctc_flag_get(uint32_t flag)
|
||||
{
|
||||
FlagStatus ret;
|
||||
|
||||
if(RESET != (CTC_STAT & flag)){
|
||||
return SET;
|
||||
ret = SET;
|
||||
}else{
|
||||
return RESET;
|
||||
ret = RESET;
|
||||
}
|
||||
return ret;
|
||||
}
|
||||
|
||||
/*!
|
||||
|
||||
Reference in New Issue
Block a user