🐛 Restore STM32 / STM32F1 12-bit ADC (#23871)
This commit is contained in:
@@ -335,7 +335,7 @@ void MarlinHAL::adc_start(const pin_t pin) {
|
||||
_TCASE(POWER_MONITOR_CURRENT, POWER_MONITOR_CURRENT_PIN, POWERMON_CURRENT)
|
||||
_TCASE(POWER_MONITOR_VOLTAGE, POWER_MONITOR_VOLTAGE_PIN, POWERMON_VOLTS)
|
||||
}
|
||||
adc_result = adc_results[(int)pin_index] >> (12 - HAL_ADC_RESOLUTION); // shift out unused bits
|
||||
adc_result = (adc_results[(int)pin_index] & 0xFFF) >> (12 - HAL_ADC_RESOLUTION); // shift out unused bits
|
||||
}
|
||||
|
||||
#endif // __STM32F1__
|
||||
|
||||
Reference in New Issue
Block a user