This commit is contained in:
stark1898y 2025-06-03 08:46:43 +08:00
commit 1713871387
1 changed files with 2 additions and 0 deletions

View File

@ -30,6 +30,7 @@ uint16_t max_number = 0;
double voltage = 0;
// https://www.cnblogs.com/iot-fan/p/14304854.html
__HIGH_CODE
uint8_t BSP_ReadVbat(void)
{
uint8_t i;
@ -43,6 +44,7 @@ uint8_t BSP_ReadVbat(void)
// DelayUs(50);
ADC_InterBATSampInit();
DelayUs(1);
// TODO这里有死循环
ADC_ExcutSingleConver();
DelayUs(1);
ADC_ExcutSingleConver();