This commit is contained in:
qiyongshuang
2023-12-01 10:33:09 +08:00
parent de6d68c654
commit ec059e0b18
395 changed files with 37947 additions and 28760 deletions
+3 -3
View File
@@ -16,7 +16,7 @@
*ADC1 channel 1 (PA1), ADC2 channel 3 (PA3)), and the rule group channel obtains
*dual ADC conversion data through DMA interrupt.
*
*Note��only applied toCH32V203
*Note:only applied toCH32V203
*/
#include "debug.h"
@@ -162,9 +162,9 @@ u16 Get_ConversionVal1(s16 val)
*/
u16 Get_ConversionVal2(s16 val)
{
if((val + Calibrattion_Val2) < 0)
if((val + Calibrattion_Val2) < 0||val==0)
return 0;
if((Calibrattion_Val2 + val) > 4095)
if((Calibrattion_Val2 + val) > 4095||val==4095)
return 4095;
return (val + Calibrattion_Val2);
}
@@ -205,6 +205,7 @@ void SystemCoreClockUpdate (void)
*/
static void SetSysClock(void)
{
//GPIO_IPD_Unused();
#ifdef SYSCLK_FREQ_HSE
SetSysClockToHSE();
#elif defined SYSCLK_FREQ_48MHz_HSE