From a47f559db15ad550930f0d49d352e73852ff900d Mon Sep 17 00:00:00 2001 From: Robby Candra Date: Sun, 26 Dec 2021 10:36:09 +0700 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20HAL=20refactor=20followup=20(#23?= =?UTF-8?q?354)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Marlin/src/HAL/SAMD51/HAL.h | 2 +- Marlin/src/HAL/STM32/HAL_SPI.cpp | 2 +- Marlin/src/HAL/STM32F1/HAL.h | 2 +- Marlin/src/HAL/TEENSY31_32/HAL.h | 2 +- Marlin/src/HAL/TEENSY40_41/HAL.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/HAL/SAMD51/HAL.h b/Marlin/src/HAL/SAMD51/HAL.h index e9d4a70c3f..a88ed9ba79 100644 --- a/Marlin/src/HAL/SAMD51/HAL.h +++ b/Marlin/src/HAL/SAMD51/HAL.h @@ -186,7 +186,7 @@ public: static void adc_init(); // Called by Temperature::init for each sensor at startup - static void adc_enable(const uint8_t ch); + static inline void adc_enable(const uint8_t ch) {} // Begin ADC sampling on the given channel static void adc_start(const pin_t pin); diff --git a/Marlin/src/HAL/STM32/HAL_SPI.cpp b/Marlin/src/HAL/STM32/HAL_SPI.cpp index 7737245de8..40d320d5e8 100644 --- a/Marlin/src/HAL/STM32/HAL_SPI.cpp +++ b/Marlin/src/HAL/STM32/HAL_SPI.cpp @@ -104,7 +104,7 @@ static SPISettings spiConfig; uint8_t spiRec() { hal.isr_off(); // No interrupts during byte receive const uint8_t data = HAL_SPI_STM32_SpiTransfer_Mode_3(0xFF); - hal.isr_off(); // Enable interrupts + hal.isr_on(); // Enable interrupts return data; } diff --git a/Marlin/src/HAL/STM32F1/HAL.h b/Marlin/src/HAL/STM32F1/HAL.h index bdbf4a1885..9b973c3ea4 100644 --- a/Marlin/src/HAL/STM32F1/HAL.h +++ b/Marlin/src/HAL/STM32F1/HAL.h @@ -280,7 +280,7 @@ public: static void adc_init(); // Called by Temperature::init for each sensor at startup - static void adc_enable(const pin_t pin); + static inline void adc_enable(const pin_t pin) { pinMode(pin, INPUT_ANALOG); } // Begin ADC sampling on the given channel static void adc_start(const pin_t pin); diff --git a/Marlin/src/HAL/TEENSY31_32/HAL.h b/Marlin/src/HAL/TEENSY31_32/HAL.h index 0661b55f53..14f463708b 100644 --- a/Marlin/src/HAL/TEENSY31_32/HAL.h +++ b/Marlin/src/HAL/TEENSY31_32/HAL.h @@ -163,7 +163,7 @@ public: static void adc_init(); // Called by Temperature::init for each sensor at startup - static void adc_enable(const pin_t ch); + static inline void adc_enable(const pin_t ch) {} // Begin ADC sampling on the given channel static void adc_start(const pin_t ch); diff --git a/Marlin/src/HAL/TEENSY40_41/HAL.h b/Marlin/src/HAL/TEENSY40_41/HAL.h index 7bad143179..b7a8070281 100644 --- a/Marlin/src/HAL/TEENSY40_41/HAL.h +++ b/Marlin/src/HAL/TEENSY40_41/HAL.h @@ -192,7 +192,7 @@ public: static void adc_init(); // Called by Temperature::init for each sensor at startup - static void adc_enable(const pin_t pin); + static inline void adc_enable(const pin_t pin) {} // Begin ADC sampling on the given channel static void adc_start(const pin_t pin);