12-bit ADC resolution for STM32 (#20519)

This commit is contained in:
LinFor
2020-12-22 03:30:03 +03:00
committed by Scott Lahteine
parent 231e5a5eed
commit 076f12e82d
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