12-bit ADC resolution for STM32 (#20519)

This commit is contained in:
LinFor
2020-12-22 03:30:03 +03:00
committed by GitHub
parent ba1176108a
commit 36aff1e464
3 changed files with 7 additions and 3 deletions

View File

@ -27,6 +27,8 @@
#define THERMISTOR_TABLE_SCALE (HAL_ADC_RANGE / _BV(THERMISTOR_TABLE_ADC_RESOLUTION))
#if ENABLED(HAL_ADC_FILTERED)
#define OVERSAMPLENR 1
#elif HAL_ADC_RESOLUTION > 10
#define OVERSAMPLENR (20 - HAL_ADC_RESOLUTION)
#else
#define OVERSAMPLENR 16
#endif