diff --git a/analog.c b/analog.c index e618e19..2d1478e 100644 --- a/analog.c +++ b/analog.c @@ -1,5 +1,7 @@ #include "analog.h" +#include "arduino.h" + void analog_init() { PRR &= ~MASK(PRADC); ADMUX = REFERENCE; diff --git a/analog.h b/analog.h index 49bc7b5..10e2f93 100644 --- a/analog.h +++ b/analog.h @@ -1,10 +1,14 @@ #ifndef _ANALOG_H #define _ANALOG_H +#include + #define REFERENCE_AREF 0 #define REFERENCE_AVCC 64 #define REFERENCE_1V1 192 +#include "machine.h" + #ifndef REFERENCE #warning define REFERENCE as one of #warning REFERENCE_AREF, REFERENCE_AVCC or REFERENCE_1V1 @@ -12,7 +16,7 @@ #error REFERENCE undefined #endif -void analog_init(); +void analog_init(void); uint16_t analog_read(uint8_t channel); #endif /* _ANALOG_H */ diff --git a/machine.h b/machine.h index 067391e..13ff441 100644 --- a/machine.h +++ b/machine.h @@ -70,4 +70,8 @@ */ #define MOVEBUFFER_SIZE 8 +/* +*/ +#define REFERENCE REFERENCE_AREF + #endif /* _MACHINE_H */