Tweak HAL_adc_start_conversion

This commit is contained in:
Scott Lahteine 2017-09-27 03:52:29 -05:00
parent 0cb4d25431
commit 358656acc3
5 changed files with 5 additions and 5 deletions

View file

@ -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);
}

View file

@ -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);

View file

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

View file

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

View file

@ -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);