diff --git a/CHANGELOG.md b/CHANGELOG.md index 8282ea18..de626175 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/). ### Added - Minimal Wire mocks. Will not provide support for unit testing I2C communication yet, but will allow compilation of libraries that use I2C. +- Provide pin definitions for A0 to A7. ### Changed diff --git a/cpp/arduino/ArduinoDefines.h b/cpp/arduino/ArduinoDefines.h index f34aca6d..e5c25319 100644 --- a/cpp/arduino/ArduinoDefines.h +++ b/cpp/arduino/ArduinoDefines.h @@ -1,5 +1,6 @@ #pragma once +#include #include #define HIGH 0x1 @@ -91,4 +92,23 @@ #if defined(__AVR_ATmega328P__) || defined(__AVR_ATmega32U4__) || defined(__AVR_ATmega328__) || defined(__AVR_ATmega168__) || defined(__AVR_ATmega1280__) || defined(__AVR_ATmega2560__) #define LED_BUILTIN 13 + +#define PIN_A0 (14) +#define PIN_A1 (15) +#define PIN_A2 (16) +#define PIN_A3 (17) +#define PIN_A4 (18) +#define PIN_A5 (19) +#define PIN_A6 (20) +#define PIN_A7 (21) + +constexpr uint8_t A0 = PIN_A0; +constexpr uint8_t A1 = PIN_A1; +constexpr uint8_t A2 = PIN_A2; +constexpr uint8_t A3 = PIN_A3; +constexpr uint8_t A4 = PIN_A4; +constexpr uint8_t A5 = PIN_A5; +constexpr uint8_t A6 = PIN_A6; +constexpr uint8_t A7 = PIN_A7; + #endif diff --git a/cpp/arduino/Godmode.cpp b/cpp/arduino/Godmode.cpp index 102afca6..58013d2f 100644 --- a/cpp/arduino/Godmode.cpp +++ b/cpp/arduino/Godmode.cpp @@ -1,3 +1,5 @@ +#include + #include "Godmode.h" #include "HardwareSerial.h" #include "SPI.h"