Skip to content

Commit cace964

Browse files
committed
Allow pins [0:7] to be analog(as long as digital) on ATmega16
1 parent 72b05ae commit cace964

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

libraries/Firmata/Boards.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -152,11 +152,11 @@ writePort(port, value, bitmask): Write an 8 bit port.
152152
#define ARDUINO_PINOUT_OPTIMIZE 1
153153

154154
#elif defined(__AVR_ATmega16__)
155-
#define TOTAL_ANALOG_PINS 0
156-
#define TOTAL_PINS 32 // 32 digital
155+
#define TOTAL_ANALOG_PINS 8
156+
#define TOTAL_PINS 32 // 32 digital(8 of them analog)
157157
#define VERSION_BLINK_PIN 0
158158
#define IS_PIN_DIGITAL(p) ((p) >= 0 && (p) <= 31)
159-
#define IS_PIN_ANALOG(p) (0)
159+
#define IS_PIN_ANALOG(p) ((p) >= 0 && (p) <= 7)
160160
#define IS_PIN_PWM(p) IS_PIN_DIGITAL(p)
161161
#define IS_PIN_SERVO(p) (0)
162162
#define IS_PIN_I2C(p) (0)

0 commit comments

Comments
 (0)