Skip to content

Commit

Permalink
Add analouge pin definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
hlovdal committed Feb 25, 2019
1 parent 4c4def9 commit 76909d9
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cpp/arduino/ArduinoDefines.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#pragma once

#include <stdint.h>
#include <avr/pgmspace.h>

#define HIGH 0x1
Expand Down Expand Up @@ -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

0 comments on commit 76909d9

Please sign in to comment.