mirror of
https://github.com/jam422470459/EPD-nRF52-hema213.git
synced 2025-12-06 08:32:54 +08:00
fix nrf51 voltage refresh
fix the problem that the voltage will not update until a full restart
This commit is contained in:
committed by
Shuanglei Tao
parent
6dbc899bdd
commit
ee34fe7519
@@ -306,6 +306,7 @@ float EPD_ReadVoltage(void)
|
||||
(ADC_CONFIG_EXTREFSEL_None << ADC_CONFIG_EXTREFSEL_Pos);
|
||||
NRF_ADC->TASKS_START = 1;
|
||||
while(!NRF_ADC->EVENTS_END);
|
||||
NRF_ADC->EVENTS_END = 0;
|
||||
uint16_t value = NRF_ADC->RESULT;
|
||||
NRF_ADC->TASKS_STOP = 1;
|
||||
NRF_ADC->ENABLE = 0;
|
||||
|
||||
Reference in New Issue
Block a user