clean up after detecting thermistor
This commit is contained in:
parent
8795579c4f
commit
1e9dc049bf
@ -68,6 +68,13 @@ bool thermistor_driver_init(void) {
|
|||||||
// value should be >15000 and <55000 and (between -4° and 76° C)
|
// value should be >15000 and <55000 and (between -4° and 76° C)
|
||||||
if (value < 15000 || value > 55000) has_thermistor = false;
|
if (value < 15000 || value > 55000) has_thermistor = false;
|
||||||
|
|
||||||
|
// clean up, disable everything we enabled earlier.
|
||||||
|
watch_disable_adc();
|
||||||
|
HAL_GPIO_TEMPSENSE_off();
|
||||||
|
HAL_GPIO_TEMPSENSE_pmuxdis();
|
||||||
|
HAL_GPIO_TS_ENABLE_write(!THERMISTOR_ENABLE_VALUE);
|
||||||
|
HAL_GPIO_TS_ENABLE_off();
|
||||||
|
|
||||||
return has_thermistor;
|
return has_thermistor;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user