mirror of
https://github.com/MarlinFirmware/Marlin.git
synced 2024-11-23 12:04:19 +00:00
🐛 STM32 ADC Resolution = 12 bit (or ADC_RESOLUTION) (#22789)
This commit is contained in:
parent
f46e05fcb1
commit
d7e597f3df
@ -183,8 +183,13 @@ static inline int freeMemory() {
|
||||
|
||||
#define HAL_ANALOG_SELECT(pin) pinMode(pin, INPUT)
|
||||
|
||||
#ifdef ADC_RESOLUTION
|
||||
#define HAL_ADC_RESOLUTION ADC_RESOLUTION
|
||||
#else
|
||||
#define HAL_ADC_RESOLUTION 12
|
||||
#endif
|
||||
|
||||
#define HAL_ADC_VREF 3.3
|
||||
#define HAL_ADC_RESOLUTION ADC_RESOLUTION // 12
|
||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||
#define HAL_READ_ADC() HAL_adc_result
|
||||
#define HAL_ADC_READY() true
|
||||
|
@ -237,8 +237,13 @@ static inline int freeMemory() {
|
||||
|
||||
void HAL_adc_init();
|
||||
|
||||
#ifdef ADC_RESOLUTION
|
||||
#define HAL_ADC_RESOLUTION ADC_RESOLUTION
|
||||
#else
|
||||
#define HAL_ADC_RESOLUTION 12
|
||||
#endif
|
||||
|
||||
#define HAL_ADC_VREF 3.3
|
||||
#define HAL_ADC_RESOLUTION 10
|
||||
#define HAL_START_ADC(pin) HAL_adc_start_conversion(pin)
|
||||
#define HAL_READ_ADC() HAL_adc_result
|
||||
#define HAL_ADC_READY() true
|
||||
|
@ -16,7 +16,6 @@ build_flags = ${common.build_flags}
|
||||
-std=gnu++14 -DHAL_STM32
|
||||
-DUSBCON -DUSBD_USE_CDC
|
||||
-DTIM_IRQ_PRIO=13
|
||||
-DADC_RESOLUTION=12
|
||||
build_unflags = -std=gnu++11
|
||||
src_filter = ${common.default_src_filter} +<src/HAL/STM32> +<src/HAL/shared/backtrace>
|
||||
extra_scripts = ${common.extra_scripts}
|
||||
|
Loading…
Reference in New Issue
Block a user