Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ba8024c

Browse filesBrowse files
authored
Some board variant fixes (espressif#6411)
* make work with rev C pcb * use #define for easy testing
1 parent e87b87d commit ba8024c
Copy full SHA for ba8024c

File tree

Expand file treeCollapse file tree

3 files changed

+12
-12
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+12
-12
lines changed

‎variants/adafruit_feather_esp32_v2/pins_arduino.h

Copy file name to clipboardExpand all lines: variants/adafruit_feather_esp32_v2/pins_arduino.h
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,19 @@ static const uint8_t A9 = 33;
4242
static const uint8_t A10 = 27;
4343
static const uint8_t A11 = 12;
4444
static const uint8_t A12 = 13;
45+
static const uint8_t A13 = 35;
4546

4647
// vbat measure
47-
static const uint8_t BATT_MONITOR = 35;
48-
static const uint8_t A13 = 35;
48+
#define BATT_MONITOR 35
4949

5050
// internal switch
51-
static const uint8_t BUTTON = 38;
51+
#define BUTTON = 38;
5252

5353
// Neopixel
54-
static const uint8_t NEOPIXEL_PIN = 0;
55-
static const uint8_t PIN_NEOPIXEL = 0;
54+
#define PIN_NEOPIXEL 0
5655

5756
// Neopixel & I2C power
58-
static const uint8_t NEOPIXEL_I2C_POWER = 2;
57+
#define NEOPIXEL_I2C_POWER 2
5958

6059
static const uint8_t T0 = 4;
6160
static const uint8_t T1 = 0;

‎variants/adafruit_feather_esp32s2/variant.cpp

Copy file name to clipboardExpand all lines: variants/adafruit_feather_esp32s2/variant.cpp
+5-4Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,11 @@ void initVariant(void)
3636
pinMode(NEOPIXEL_POWER, OUTPUT);
3737
digitalWrite(NEOPIXEL_POWER, HIGH);
3838

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

‎variants/adafruit_qtpy_esp32c3/pins_arduino.h

Copy file name to clipboardExpand all lines: variants/adafruit_qtpy_esp32c3/pins_arduino.h
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@
1111
#define digitalPinToInterrupt(p) (((p)<NUM_DIGITAL_PINS)?(p):-1)
1212
#define digitalPinHasPWM(p) (p < EXTERNAL_NUM_INTERRUPTS)
1313

14-
static const uint8_t SWITCH = 9;
15-
static const uint8_t NEOPIXEL_PIN = 2;
14+
#define BUTTON 9
15+
#define PIN_NEOPIXEL 2
1616

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

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.