🎨 Misc. tweaks to HALs

This commit is contained in:
Scott Lahteine
2022-04-23 09:31:38 -05:00
parent 5859ff0280
commit 4e1bfc4e0d
14 changed files with 100 additions and 118 deletions

View File

@@ -52,8 +52,7 @@ uint8_t MarlinHAL::active_ch = 0;
uint16_t MarlinHAL::adc_value() {
const pin_t pin = analogInputToDigitalPin(active_ch);
if (!VALID_PIN(pin)) return 0;
const uint16_t data = ((Gpio::get(pin) >> 2) & 0x3FF);
return data; // return 10bit value as Marlin expects
return uint16_t((Gpio::get(pin) >> 2) & 0x3FF); // return 10bit value as Marlin expects
}
void MarlinHAL::reboot() { /* Reset the application state and GPIO */ }