Tweak HAL_adc_start_conversion
This commit is contained in:
parent
0cb4d25431
commit
358656acc3
|
@ -112,7 +112,7 @@ int freeMemory() {
|
||||||
// ADC
|
// 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);
|
HAL_adc_result = analogRead(adc_pin);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -150,7 +150,7 @@ inline void HAL_adc_init(void) {}//todo
|
||||||
#define HAL_READ_ADC HAL_adc_result
|
#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);
|
uint16_t HAL_adc_get_result(void);
|
||||||
|
|
||||||
|
|
|
@ -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) {
|
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);
|
usb_serial.printf("HAL: HAL_adc_start_conversion: no pinmap for %d\n", adc_pin);
|
||||||
return;
|
return;
|
||||||
|
|
|
@ -91,7 +91,7 @@ uint8_t spiRec(uint32_t chan);
|
||||||
|
|
||||||
void HAL_adc_init(void);
|
void HAL_adc_init(void);
|
||||||
void HAL_adc_enable_channel(int pin);
|
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);
|
uint16_t HAL_adc_get_result(void);
|
||||||
|
|
||||||
#endif // _HAL_LPC1768_H
|
#endif // _HAL_LPC1768_H
|
||||||
|
|
|
@ -122,7 +122,7 @@ void HAL_adc_init();
|
||||||
|
|
||||||
#define HAL_ANALOG_SELECT(pin) NOOP;
|
#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);
|
uint16_t HAL_adc_get_result(void);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue