diff options
Diffstat (limited to 'wirish/wirish_analog.c')
-rw-r--r-- | wirish/wirish_analog.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/wirish/wirish_analog.c b/wirish/wirish_analog.c index 3c63342..a658184 100644 --- a/wirish/wirish_analog.c +++ b/wirish/wirish_analog.c @@ -33,9 +33,9 @@ /* Assumes that the ADC has been initialized and that the pin is set * to ANALOG_INPUT */ uint32 analogRead(uint8 pin) { - if(PIN_MAP[pin].adc == ADC_INVALID) { + if(PIN_MAP[pin].adc_channel == ADC_INVALID) { return 0; } - return adc_read(PIN_MAP[pin].adc); + return adc_read(ADC1, PIN_MAP[pin].adc_channel); } |