ardupilot/libraries/AP_AnalogSource/AP_AnalogSource_Arduino.cpp
Pat Hickey 0caf351c32 purple: Added AnalogSource library
this library abstracts out the way of getting an analog value. If the
ADC library is being used then it calls the ADC Ch() method, otherwise
it calls analogRead()
2011-11-25 20:00:16 -08:00

9 lines
132 B
C++

#include "wiring.h"
#include "AP_AnalogSource_Arduino.h"
int AP_AnalogSource_Arduino::read(void)
{
return analogRead(_pin);
}