Skip to content

Commit

Permalink
fix board common variant inclusion for deprecated BUILTIN_LED (#4366)
Browse files Browse the repository at this point in the history
  • Loading branch information
d-a-v authored and devyte committed Feb 17, 2018
1 parent 5328a8b commit d0f220f
Show file tree
Hide file tree
Showing 18 changed files with 39 additions and 40 deletions.
4 changes: 2 additions & 2 deletions variants/ESPDuino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -35,4 +33,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 16

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/adafruit/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -36,4 +34,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 0

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/arduino_spi/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define LED_BUILTIN 2

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/arduino_uart/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,8 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define LED_BUILTIN 14

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/d1/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -53,4 +51,6 @@ static const uint8_t D13 = 14;
static const uint8_t D14 = 4;
static const uint8_t D15 = 5;

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/d1_mini/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -48,4 +46,6 @@ static const uint8_t D8 = 15;
static const uint8_t RX = 3;
static const uint8_t TX = 1;

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
3 changes: 1 addition & 2 deletions variants/espino/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -40,5 +38,6 @@ static const uint8_t LED_BUILTIN_G = 4;
static const uint8_t LED_BUILTIN_B = 5;
static const uint8_t BUTTON_BUILTIN = 0;

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/espinotee/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -36,4 +34,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 16

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/espresso_lite_v1/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define ESPRESSO_LITE_VERSION 1

#define PIN_WIRE_SDA (4)
Expand All @@ -38,4 +36,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 16

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/espresso_lite_v2/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define ESPRESSO_LITE_VERSION 2

#define PIN_WIRE_SDA (4)
Expand All @@ -38,4 +36,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 2

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/generic/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -38,4 +36,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;
#define LED_BUILTIN 1
#endif

#include "common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/nodemcu/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -48,4 +46,6 @@ static const uint8_t D8 = 15;
static const uint8_t D9 = 3;
static const uint8_t D10 = 1;

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
9 changes: 1 addition & 8 deletions variants/oak/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (2)
#define PIN_WIRE_SCL (0)

Expand All @@ -47,13 +45,8 @@ static const uint8_t P11 = 17;
static const uint8_t SDA = PIN_WIRE_SDA;
static const uint8_t SCL = PIN_WIRE_SCL;

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 LED_BUILTIN 5

static const uint8_t A0 = 17;
#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/phoenix_v1/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PHOENIX_VERSION 1

#define PIN_WIRE_SDA (4)
Expand All @@ -38,4 +36,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 16

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/phoenix_v2/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PHOENIX_VERSION 2

#define PIN_WIRE_SDA (4)
Expand All @@ -38,4 +36,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 2

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/thing/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (2)
#define PIN_WIRE_SCL (14)

Expand All @@ -36,4 +34,6 @@ static const uint8_t SCL = PIN_WIRE_SCL;

#define LED_BUILTIN 5

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
4 changes: 2 additions & 2 deletions variants/wifinfo/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,6 @@
#ifndef Pins_Arduino_h
#define Pins_Arduino_h

#include "../generic/common.h"

#define PIN_WIRE_SDA (4)
#define PIN_WIRE_SCL (5)

Expand All @@ -53,4 +51,6 @@ static const uint8_t D8 = 15;
static const uint8_t D9 = 3;
static const uint8_t D10 = 1;

#include "../generic/common.h"

#endif /* Pins_Arduino_h */
7 changes: 7 additions & 0 deletions variants/wifio/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,11 @@ static const uint8_t E16 = ESP_PINS_OFFSET + 16;
#define SERIAL_PORT_HARDWARE Serial
#define SERIAL_PORT_HARDWARE_OPEN Serial

#ifdef LED_BUILTIN
#ifdef __cplusplus
extern "C"
#endif
const int BUILTIN_LED __attribute__((deprecated, weak)) = LED_BUILTIN;
#endif

#endif /* Pins_Arduino_h */

0 comments on commit d0f220f

Please sign in to comment.