1
0
forked from me/IronOS

Merge pull request #1224 from Ralim/only-vbus-test-on-pinecil

Only vbus mod check on pinecil
This commit is contained in:
Ben V. Brown
2022-02-12 11:15:15 +11:00
committed by GitHub
2 changed files with 9 additions and 4 deletions

View File

@@ -142,6 +142,7 @@
#define ACCEL_BMA
#define ACCEL_SC7
#define HALL_SENSOR
#define VBUS_MOD_TEST
#define HALL_SI7210
#define DEBUG_UART_OUTPUT

View File

@@ -734,20 +734,24 @@ void showDebugMenu(void) {
} else {
// We are not powered via DC, so want to display the appropriate state for PD or QC
bool poweredbyPD = false;
bool pdHasVBUSConnected = true;
bool pdHasVBUSConnected = false;
#if POW_PD
if (USBPowerDelivery::fusbPresent()) {
// We are PD capable
if (USBPowerDelivery::negotiationComplete()) {
// We are powered via PD
poweredbyPD = true;
poweredbyPD = true;
#ifdef VBUS_MOD_TEST
pdHasVBUSConnected = USBPowerDelivery::isVBUSConnected();
#endif
}
}
#endif
if (poweredbyPD) {
sourceNumber = 2;
if (!pdHasVBUSConnected) {
if (pdHasVBUSConnected) {
sourceNumber = 2;
} else {
sourceNumber = 3;
}
} else {