Skip to content

Commit d0f220f

Browse files
d-a-vdevyte
authored andcommitted
fix board common variant inclusion for deprecated BUILTIN_LED (#4366)
1 parent 5328a8b commit d0f220f

File tree

18 files changed

+39
-40
lines changed

18 files changed

+39
-40
lines changed

variants/ESPDuino/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,6 @@
2525
#ifndef Pins_Arduino_h
2626
#define Pins_Arduino_h
2727

28-
#include "../generic/common.h"
29-
3028
#define PIN_WIRE_SDA (4)
3129
#define PIN_WIRE_SCL (5)
3230

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

3634
#define LED_BUILTIN 16
3735

36+
#include "../generic/common.h"
37+
3838
#endif /* Pins_Arduino_h */

variants/adafruit/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

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

3735
#define LED_BUILTIN 0
3836

37+
#include "../generic/common.h"
38+
3939
#endif /* Pins_Arduino_h */

variants/arduino_spi/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#ifndef Pins_Arduino_h
3232
#define Pins_Arduino_h
3333

34-
#include "../generic/common.h"
35-
3634
#define LED_BUILTIN 2
3735

36+
#include "../generic/common.h"
37+
3838
#endif /* Pins_Arduino_h */

variants/arduino_uart/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,8 @@
3131
#ifndef Pins_Arduino_h
3232
#define Pins_Arduino_h
3333

34-
#include "../generic/common.h"
35-
3634
#define LED_BUILTIN 14
3735

36+
#include "../generic/common.h"
37+
3838
#endif /* Pins_Arduino_h */

variants/d1/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

@@ -53,4 +51,6 @@ static const uint8_t D13 = 14;
5351
static const uint8_t D14 = 4;
5452
static const uint8_t D15 = 5;
5553

54+
#include "../generic/common.h"
55+
5656
#endif /* Pins_Arduino_h */

variants/d1_mini/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

@@ -48,4 +46,6 @@ static const uint8_t D8 = 15;
4846
static const uint8_t RX = 3;
4947
static const uint8_t TX = 1;
5048

49+
#include "../generic/common.h"
50+
5151
#endif /* Pins_Arduino_h */

variants/espino/pins_arduino.h

+1-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

@@ -40,5 +38,6 @@ static const uint8_t LED_BUILTIN_G = 4;
4038
static const uint8_t LED_BUILTIN_B = 5;
4139
static const uint8_t BUTTON_BUILTIN = 0;
4240

41+
#include "../generic/common.h"
4342

4443
#endif /* Pins_Arduino_h */

variants/espinotee/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

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

3735
#define LED_BUILTIN 16
3836

37+
#include "../generic/common.h"
38+
3939
#endif /* Pins_Arduino_h */

variants/espresso_lite_v1/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define ESPRESSO_LITE_VERSION 1
3230

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

3937
#define LED_BUILTIN 16
4038

39+
#include "../generic/common.h"
40+
4141
#endif /* Pins_Arduino_h */

variants/espresso_lite_v2/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define ESPRESSO_LITE_VERSION 2
3230

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

3937
#define LED_BUILTIN 2
4038

39+
#include "../generic/common.h"
40+
4141
#endif /* Pins_Arduino_h */

variants/generic/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

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

39+
#include "common.h"
40+
4141
#endif /* Pins_Arduino_h */

variants/nodemcu/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (4)
3230
#define PIN_WIRE_SCL (5)
3331

@@ -48,4 +46,6 @@ static const uint8_t D8 = 15;
4846
static const uint8_t D9 = 3;
4947
static const uint8_t D10 = 1;
5048

49+
#include "../generic/common.h"
50+
5151
#endif /* Pins_Arduino_h */

variants/oak/pins_arduino.h

+1-8
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (2)
3230
#define PIN_WIRE_SCL (0)
3331

@@ -47,13 +45,8 @@ static const uint8_t P11 = 17;
4745
static const uint8_t SDA = PIN_WIRE_SDA;
4846
static const uint8_t SCL = PIN_WIRE_SCL;
4947

50-
static const uint8_t SS = 15;
51-
static const uint8_t MOSI = 13;
52-
static const uint8_t MISO = 12;
53-
static const uint8_t SCK = 14;
54-
5548
#define LED_BUILTIN 5
5649

57-
static const uint8_t A0 = 17;
50+
#include "../generic/common.h"
5851

5952
#endif /* Pins_Arduino_h */

variants/phoenix_v1/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PHOENIX_VERSION 1
3230

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

3937
#define LED_BUILTIN 16
4038

39+
#include "../generic/common.h"
40+
4141
#endif /* Pins_Arduino_h */

variants/phoenix_v2/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PHOENIX_VERSION 2
3230

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

3937
#define LED_BUILTIN 2
4038

39+
#include "../generic/common.h"
40+
4141
#endif /* Pins_Arduino_h */

variants/thing/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,6 @@
2626
#ifndef Pins_Arduino_h
2727
#define Pins_Arduino_h
2828

29-
#include "../generic/common.h"
30-
3129
#define PIN_WIRE_SDA (2)
3230
#define PIN_WIRE_SCL (14)
3331

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

3735
#define LED_BUILTIN 5
3836

37+
#include "../generic/common.h"
38+
3939
#endif /* Pins_Arduino_h */

variants/wifinfo/pins_arduino.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,6 @@
3131
#ifndef Pins_Arduino_h
3232
#define Pins_Arduino_h
3333

34-
#include "../generic/common.h"
35-
3634
#define PIN_WIRE_SDA (4)
3735
#define PIN_WIRE_SCL (5)
3836

@@ -53,4 +51,6 @@ static const uint8_t D8 = 15;
5351
static const uint8_t D9 = 3;
5452
static const uint8_t D10 = 1;
5553

54+
#include "../generic/common.h"
55+
5656
#endif /* Pins_Arduino_h */

variants/wifio/pins_arduino.h

+7
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,11 @@ static const uint8_t E16 = ESP_PINS_OFFSET + 16;
8484
#define SERIAL_PORT_HARDWARE Serial
8585
#define SERIAL_PORT_HARDWARE_OPEN Serial
8686

87+
#ifdef LED_BUILTIN
88+
#ifdef __cplusplus
89+
extern "C"
90+
#endif
91+
const int BUILTIN_LED __attribute__((deprecated, weak)) = LED_BUILTIN;
92+
#endif
93+
8794
#endif /* Pins_Arduino_h */

0 commit comments

Comments
 (0)