Mozzi  alpha 0.01.1t
sound synthesis library for Arduino
 All Classes Functions Typedefs
mozzi_analog.h
00001 #ifndef MOZZI_ANALOG_H_
00002 #define MOZZI_ANALOG_H_
00003 
00004 #include "Arduino.h"
00005 #include "utils.h"
00006 
00010 void initADC();
00011 void startRead();
00012 int getSensor(unsigned char channel_num);
00013 
00014 
00015 // hack for Teensy 2 (32u4), pasted from hardware/arduino/variants/leonardo/pins_arduino.h
00016 #if defined(__AVR_ATmega32U4__)
00017 //              __AVR_ATmega32U4__ has an unusual mapping of pins to channels
00018 extern const uint8_t PROGMEM analog_pin_to_channel_PGM[];
00019 #define analogPinToChannel(P)  ( pgm_read_byte( analog_pin_to_channel_PGM + (P) ) )
00020 #endif
00021 
00022 void setupFastAnalogRead();
00023 void disconnectDigitalIn(byte channel_num);
00024 void reconnectDigitalIn(byte channel_num);
00025 void startAnalogRead(unsigned char pin);
00026 int receiveAnalogRead();
00027 
00028 
00029 #endif /* MOZZI_ANALOG_H_ */