Merge branch 'V0.1' of https://gitee.com/SXDT-Embedded/BLE_TYQ_CH584M into V0.1
This commit is contained in:
commit
1713871387
|
@ -30,6 +30,7 @@ uint16_t max_number = 0;
|
||||||
double voltage = 0;
|
double voltage = 0;
|
||||||
|
|
||||||
// https://www.cnblogs.com/iot-fan/p/14304854.html
|
// https://www.cnblogs.com/iot-fan/p/14304854.html
|
||||||
|
__HIGH_CODE
|
||||||
uint8_t BSP_ReadVbat(void)
|
uint8_t BSP_ReadVbat(void)
|
||||||
{
|
{
|
||||||
uint8_t i;
|
uint8_t i;
|
||||||
|
@ -43,6 +44,7 @@ uint8_t BSP_ReadVbat(void)
|
||||||
// DelayUs(50);
|
// DelayUs(50);
|
||||||
ADC_InterBATSampInit();
|
ADC_InterBATSampInit();
|
||||||
DelayUs(1);
|
DelayUs(1);
|
||||||
|
// TODO:这里有死循环
|
||||||
ADC_ExcutSingleConver();
|
ADC_ExcutSingleConver();
|
||||||
DelayUs(1);
|
DelayUs(1);
|
||||||
ADC_ExcutSingleConver();
|
ADC_ExcutSingleConver();
|
||||||
|
|
Loading…
Reference in New Issue