Some board variant fixes (#6411)

* make work with rev C pcb

* use #define for easy testing
This commit is contained in:
Limor "Ladyada" Fried
2022-03-14 06:45:16 -04:00
committed by GitHub
parent e87b87d04c
commit ba8024c0d2
3 changed files with 13 additions and 13 deletions

View File

@ -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);
}
}