🐛 Restore STM32 / STM32F1 12-bit ADC (#23871)

This commit is contained in:
tombrazier
2022-03-11 23:09:04 +00:00
committed by GitHub
parent 79b38e0e14
commit b123fa763d
3 changed files with 2 additions and 2 deletions

View File

@@ -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__