Skip to content

Some board variant fixes #6411

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
Mar 14, 2022
Merged
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
11 changes: 5 additions & 6 deletions variants/adafruit_feather_esp32_v2/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -42,20 +42,19 @@ static const uint8_t A9 = 33;
static const uint8_t A10 = 27;
static const uint8_t A11 = 12;
static const uint8_t A12 = 13;
static const uint8_t A13 = 35;

// vbat measure
static const uint8_t BATT_MONITOR = 35;
static const uint8_t A13 = 35;
#define BATT_MONITOR 35

// internal switch
static const uint8_t BUTTON = 38;
#define BUTTON = 38;

// Neopixel
static const uint8_t NEOPIXEL_PIN = 0;
static const uint8_t PIN_NEOPIXEL = 0;
#define PIN_NEOPIXEL 0

// Neopixel & I2C power
static const uint8_t NEOPIXEL_I2C_POWER = 2;
#define NEOPIXEL_I2C_POWER 2

static const uint8_t T0 = 4;
static const uint8_t T1 = 0;
9 changes: 5 additions & 4 deletions variants/adafruit_feather_esp32s2/variant.cpp
Original file line number Diff line number Diff line change
@@ -36,10 +36,11 @@ void initVariant(void)
pinMode(NEOPIXEL_POWER, OUTPUT);
digitalWrite(NEOPIXEL_POWER, HIGH);

// This board has a power control pin, and we must set it to output and low
// in order to enable the I2C port.
// turn on the I2C power by setting pin to opposite of 'rest state'
pinMode(PIN_I2C_POWER, INPUT);
delay(1);
bool polarity = digitalRead(PIN_I2C_POWER);
pinMode(PIN_I2C_POWER, OUTPUT);
digitalWrite(PIN_I2C_POWER, LOW);
digitalWrite(PIN_I2C_POWER, !polarity);
}

}
4 changes: 2 additions & 2 deletions variants/adafruit_qtpy_esp32c3/pins_arduino.h
Original file line number Diff line number Diff line change
@@ -11,8 +11,8 @@
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)

static const uint8_t SWITCH = 9;
static const uint8_t NEOPIXEL_PIN = 2;
#define BUTTON 9
#define PIN_NEOPIXEL 2

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