Skip to content

Added boards constants for LED_BUILTIN and KEY_BUILTIN #177

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Feb 7, 2017
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions variants/esp320/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

static const uint8_t LED_BUILTIN = 5;
static const uint8_t BUILTIN_LED = 5;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

since those are the same, wouldn't it be better if one of them is define to forward to the other one?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, you are right, I will do it. I tried to do it same way as is in ESP8266 core.


static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t SDA = 2;
static const uint8_t SCL = 14;

Expand Down
5 changes: 5 additions & 0 deletions variants/esp32thing/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

static const uint8_t LED_BUILTIN = 5;
static const uint8_t BUILTIN_LED = 5;

static const uint8_t KEY_BUILTIN = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;

Expand Down
5 changes: 4 additions & 1 deletion variants/espea32/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

#define LED_BUILTIN 5
static const uint8_t LED_BUILTIN = 5;
static const uint8_t BUILTIN_LED = 5;

static const uint8_t KEY_BUILTIN = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;
Expand Down
7 changes: 6 additions & 1 deletion variants/hornbill32dev/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,12 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

static const uint8_t TX = 1;
static const uint8_t LED_BUILTIN = 13;
static const uint8_t BUILTIN_LED = 13;

static const uint8_t KEY_BUILTIN = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;

static const uint8_t SDA = 21;
Expand Down
6 changes: 4 additions & 2 deletions variants/lolin32/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,10 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

#define LED_BUILTIN 2
#define KEY_BUILTIN 0
static const uint8_t LED_BUILTIN = 2;
static const uint8_t BUILTIN_LED = 2;

static const uint8_t KEY_BUILTIN = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;
Expand Down
5 changes: 4 additions & 1 deletion variants/nano32/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,10 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

#define LED_BUILTIN 16
static const uint8_t LED_BUILTIN = 16;
static const uint8_t BUILTIN_LED = 16;

static const uint8_t BUILTIN_KEY = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;
Expand Down
5 changes: 5 additions & 0 deletions variants/node32s/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,11 @@
#define digitalPinToInterrupt(p) (((p)<40)?(p):-1)
#define digitalPinHasPWM(p) (p < 34)

static const uint8_t LED_BUILTIN = 2;
static const uint8_t BUILTIN_LED = 2;

static const uint8_t KEY_BUILTIN = 0;

static const uint8_t TX = 1;
static const uint8_t RX = 3;

Expand Down