13 #ifndef MOZZI_ANALOG_H_
14 #define MOZZI_ANALOG_H_
21 enum ANALOG_READ_SPEED {FAST_ADC,FASTER_ADC,FASTEST_ADC};
59 void setupMozziADC(int8_t speed=FAST_ADC);
88 DIDR0 |= 1<<channel_num;
101 DIDR0 &= ~(1<<channel_num);
113 for (uint8_t i = 0; i<NUM_ANALOG_INPUTS; i++){
126 for (uint8_t i = 0; i<NUM_ANALOG_INPUTS; i++){
141 void adcStartConversion(uint8_t channel);
146 template<byte RES> uint16_t mozziAnalogRead(uint8_t pin);
154 #if defined(FOR_DOXYGEN_ONLY) || defined(MOZZI_ANALOG_READ_RESOLUTION)
174 inline uint16_t mozziAnalogRead(uint8_t pin) {
return mozziAnalogRead<MOZZI_ANALOG_READ_RESOLUTION>(pin); }
176 MOZZI_DEPRECATED(
"2.0",
"This use of mozziAnalogRead() is not portable. Refer to the API documentation for suggested alternatives.")
inline uint16_t mozziAnalogRead(uint8_t pin) {
return mozziAnalogRead<MOZZI__INTERNAL_ANALOG_READ_RESOLUTION>(pin); }
179 uint8_t adcPinToChannelNum(uint8_t pin);