1
0
mirror of https://github.com/esp8266/Arduino.git synced 2025-07-27 18:02:17 +03:00

Add PIN defines, so the pins can easily be used by external libraries

See: arduino/Arduino#4814

For instance this is used by the USB Host library: 231fb542a8
This commit is contained in:
Kristian Sloth Lauszus
2016-10-26 01:29:14 -05:00
parent 4897e0006b
commit 6d6f22e6be
16 changed files with 113 additions and 47 deletions

View File

@ -37,12 +37,19 @@
#define digitalPinToInterrupt(p) (((p) < EXTERNAL_NUM_INTERRUPTS)? (p) : NOT_AN_INTERRUPT)
#define digitalPinHasPWM(p) (((p) < NUM_DIGITAL_PINS && !isFlashInterfacePin(p))? 1 : 0)
static const uint8_t SS = 15;
static const uint8_t MOSI = 13;
static const uint8_t MISO = 12;
static const uint8_t SCK = 14;
#define PIN_SPI_SS (15)
#define PIN_SPI_MOSI (13)
#define PIN_SPI_MISO (12)
#define PIN_SPI_SCK (14)
static const uint8_t A0 = 17;
static const uint8_t SS = PIN_SPI_SS;
static const uint8_t MOSI = PIN_SPI_MOSI;
static const uint8_t MISO = PIN_SPI_MISO;
static const uint8_t SCK = PIN_SPI_SCK;
#define PIN_A0 (17)
static const uint8_t A0 = PIN_A0;
// These serial port names are intended to allow libraries and architecture-neutral
// sketches to automatically default to the correct port name for a particular type