mirror of
https://github.com/0xFEEDC0DE64/arduino-esp32.git
synced 2025-06-30 12:30:59 +02:00
Some board variant fixes (#6411)
* make work with rev C pcb * use #define for easy testing
This commit is contained in:
committed by
GitHub
parent
e87b87d04c
commit
ba8024c0d2
@ -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);
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user