From 358656acc397992154c5ee4f42b06947f963b284 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Wed, 27 Sep 2017 03:52:29 -0500 Subject: [PATCH] Tweak HAL_adc_start_conversion --- Marlin/src/HAL/HAL_DUE/HAL_Due.cpp | 2 +- Marlin/src/HAL/HAL_DUE/HAL_Due.h | 2 +- Marlin/src/HAL/HAL_LPC1768/HAL.cpp | 2 +- Marlin/src/HAL/HAL_LPC1768/HAL.h | 2 +- Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Marlin/src/HAL/HAL_DUE/HAL_Due.cpp b/Marlin/src/HAL/HAL_DUE/HAL_Due.cpp index 078857ec0a..b3a5d469a2 100644 --- a/Marlin/src/HAL/HAL_DUE/HAL_Due.cpp +++ b/Marlin/src/HAL/HAL_DUE/HAL_Due.cpp @@ -112,7 +112,7 @@ int freeMemory() { // ADC // -------------------------------------------------------------------------- -void HAL_adc_start_conversion(uint8_t adc_pin) { +void HAL_adc_start_conversion(const uint8_t adc_pin) { HAL_adc_result = analogRead(adc_pin); } diff --git a/Marlin/src/HAL/HAL_DUE/HAL_Due.h b/Marlin/src/HAL/HAL_DUE/HAL_Due.h index 2b8cca8098..f71b8ff493 100644 --- a/Marlin/src/HAL/HAL_DUE/HAL_Due.h +++ b/Marlin/src/HAL/HAL_DUE/HAL_Due.h @@ -150,7 +150,7 @@ inline void HAL_adc_init(void) {}//todo #define HAL_READ_ADC HAL_adc_result -void HAL_adc_start_conversion (uint8_t adc_pin); +void HAL_adc_start_conversion(const uint8_t adc_pin); uint16_t HAL_adc_get_result(void); diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp index 181180fe46..5f5c3f047c 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.cpp +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.cpp @@ -113,7 +113,7 @@ void HAL_adc_enable_channel(int pin) { }; } -void HAL_adc_start_conversion(uint8_t adc_pin) { +void HAL_adc_start_conversion(const uint8_t adc_pin) { if (adc_pin >= (NUM_ANALOG_INPUTS) || adc_pin_map[adc_pin].port == 0xFF) { usb_serial.printf("HAL: HAL_adc_start_conversion: no pinmap for %d\n", adc_pin); return; diff --git a/Marlin/src/HAL/HAL_LPC1768/HAL.h b/Marlin/src/HAL/HAL_LPC1768/HAL.h index 96b4478d5f..e1b52a6819 100644 --- a/Marlin/src/HAL/HAL_LPC1768/HAL.h +++ b/Marlin/src/HAL/HAL_LPC1768/HAL.h @@ -91,7 +91,7 @@ uint8_t spiRec(uint32_t chan); void HAL_adc_init(void); void HAL_adc_enable_channel(int pin); -void HAL_adc_start_conversion (uint8_t adc_pin); +void HAL_adc_start_conversion(const uint8_t adc_pin); uint16_t HAL_adc_get_result(void); #endif // _HAL_LPC1768_H diff --git a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h index fc24b5a921..e4c020847b 100644 --- a/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h +++ b/Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h @@ -122,7 +122,7 @@ void HAL_adc_init(); #define HAL_ANALOG_SELECT(pin) NOOP; -void HAL_adc_start_conversion(uint8_t adc_pin); +void HAL_adc_start_conversion(const uint8_t adc_pin); uint16_t HAL_adc_get_result(void);