mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
only vbus mod check on pinecil
If a TS80P has it connected, other things blow up first at 20V
This commit is contained in:
@@ -142,6 +142,7 @@
|
|||||||
#define ACCEL_BMA
|
#define ACCEL_BMA
|
||||||
#define ACCEL_SC7
|
#define ACCEL_SC7
|
||||||
#define HALL_SENSOR
|
#define HALL_SENSOR
|
||||||
|
#define VBUS_MOD_TEST
|
||||||
#define HALL_SI7210
|
#define HALL_SI7210
|
||||||
#define DEBUG_UART_OUTPUT
|
#define DEBUG_UART_OUTPUT
|
||||||
|
|
||||||
|
|||||||
@@ -734,20 +734,24 @@ void showDebugMenu(void) {
|
|||||||
} else {
|
} else {
|
||||||
// We are not powered via DC, so want to display the appropriate state for PD or QC
|
// We are not powered via DC, so want to display the appropriate state for PD or QC
|
||||||
bool poweredbyPD = false;
|
bool poweredbyPD = false;
|
||||||
bool pdHasVBUSConnected = true;
|
bool pdHasVBUSConnected = false;
|
||||||
#if POW_PD
|
#if POW_PD
|
||||||
if (USBPowerDelivery::fusbPresent()) {
|
if (USBPowerDelivery::fusbPresent()) {
|
||||||
// We are PD capable
|
// We are PD capable
|
||||||
if (USBPowerDelivery::negotiationComplete()) {
|
if (USBPowerDelivery::negotiationComplete()) {
|
||||||
// We are powered via PD
|
// We are powered via PD
|
||||||
poweredbyPD = true;
|
poweredbyPD = true;
|
||||||
|
#ifdef VBUS_MOD_TEST
|
||||||
pdHasVBUSConnected = USBPowerDelivery::isVBUSConnected();
|
pdHasVBUSConnected = USBPowerDelivery::isVBUSConnected();
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
if (poweredbyPD) {
|
if (poweredbyPD) {
|
||||||
sourceNumber = 2;
|
|
||||||
if (!pdHasVBUSConnected) {
|
if (pdHasVBUSConnected) {
|
||||||
|
sourceNumber = 2;
|
||||||
|
} else {
|
||||||
sourceNumber = 3;
|
sourceNumber = 3;
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user