Skip to content
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

airm2m_core_esp32c3 board Add LED_BUILTIN* definitions and initialization for LEDs #7636

Merged
merged 2 commits into from
Feb 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
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
4 changes: 4 additions & 0 deletions variants/AirM2M_CORE_ESP32C3/pins_arduino.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)

static const uint8_t LED_BUILTIN = 12;
#define BUILTIN_LED LED_BUILTIN
static const uint8_t LED_BUILTIN_AUX = 13;

static const uint8_t TX = 21;
static const uint8_t RX = 20;

Expand Down
7 changes: 7 additions & 0 deletions variants/AirM2M_CORE_ESP32C3/variant.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include "Arduino.h"

extern "C" void initVariant(void){
// Stop LEDs floating
pinMode(LED_BUILTIN, OUTPUT); digitalWrite(LED_BUILTIN, LOW);
pinMode(LED_BUILTIN_AUX, OUTPUT); digitalWrite(LED_BUILTIN_AUX, LOW);
}