Browse Source

Tweak HAL_adc_start_conversion

Scott Lahteine 7 years ago
parent
commit
358656acc3

+ 1
- 1
Marlin/src/HAL/HAL_DUE/HAL_Due.cpp View File

112
 // ADC
112
 // ADC
113
 // --------------------------------------------------------------------------
113
 // --------------------------------------------------------------------------
114
 
114
 
115
-void HAL_adc_start_conversion(uint8_t adc_pin) {
115
+void HAL_adc_start_conversion(const uint8_t adc_pin) {
116
   HAL_adc_result = analogRead(adc_pin);
116
   HAL_adc_result = analogRead(adc_pin);
117
 }
117
 }
118
 
118
 

+ 1
- 1
Marlin/src/HAL/HAL_DUE/HAL_Due.h View File

150
 #define HAL_READ_ADC        HAL_adc_result
150
 #define HAL_READ_ADC        HAL_adc_result
151
 
151
 
152
 
152
 
153
-void HAL_adc_start_conversion (uint8_t adc_pin);
153
+void HAL_adc_start_conversion(const uint8_t adc_pin);
154
 
154
 
155
 uint16_t HAL_adc_get_result(void);
155
 uint16_t HAL_adc_get_result(void);
156
 
156
 

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/HAL.cpp View File

113
   };
113
   };
114
 }
114
 }
115
 
115
 
116
-void HAL_adc_start_conversion(uint8_t adc_pin) {
116
+void HAL_adc_start_conversion(const uint8_t adc_pin) {
117
   if (adc_pin >= (NUM_ANALOG_INPUTS) || adc_pin_map[adc_pin].port == 0xFF) {
117
   if (adc_pin >= (NUM_ANALOG_INPUTS) || adc_pin_map[adc_pin].port == 0xFF) {
118
     usb_serial.printf("HAL: HAL_adc_start_conversion: no pinmap for %d\n", adc_pin);
118
     usb_serial.printf("HAL: HAL_adc_start_conversion: no pinmap for %d\n", adc_pin);
119
     return;
119
     return;

+ 1
- 1
Marlin/src/HAL/HAL_LPC1768/HAL.h View File

91
 
91
 
92
 void HAL_adc_init(void);
92
 void HAL_adc_init(void);
93
 void HAL_adc_enable_channel(int pin);
93
 void HAL_adc_enable_channel(int pin);
94
-void HAL_adc_start_conversion (uint8_t adc_pin);
94
+void HAL_adc_start_conversion(const uint8_t adc_pin);
95
 uint16_t HAL_adc_get_result(void);
95
 uint16_t HAL_adc_get_result(void);
96
 
96
 
97
 #endif // _HAL_LPC1768_H
97
 #endif // _HAL_LPC1768_H

+ 1
- 1
Marlin/src/HAL/HAL_TEENSY35_36/HAL_Teensy.h View File

122
 
122
 
123
 #define HAL_ANALOG_SELECT(pin) NOOP;
123
 #define HAL_ANALOG_SELECT(pin) NOOP;
124
 
124
 
125
-void HAL_adc_start_conversion(uint8_t adc_pin);
125
+void HAL_adc_start_conversion(const uint8_t adc_pin);
126
 
126
 
127
 uint16_t HAL_adc_get_result(void);
127
 uint16_t HAL_adc_get_result(void);
128
 
128
 

Loading…
Cancel
Save