1
0
forked from me/IronOS

Expose Vbus

This commit is contained in:
Ben V. Brown
2022-02-06 13:14:53 +11:00
parent a3cecb852c
commit 3c83b59b53
2 changed files with 14 additions and 3 deletions

View File

@@ -67,6 +67,17 @@ bool USBPowerDelivery::fusbPresent() {
return detectionState == 1;
}
bool USBPowerDelivery::isVBUSConnected() {
// Check the status reg
FUSB302::fusb_status status;
if (fusb.fusb_get_status(&status)) {
return status.status0 & 0x80;
}
// As we are using this to detect the mod fail safe
return true;
}
bool pdbs_dpm_evaluate_capability(const pd_msg *capabilities, pd_msg *request) {
/* Get the number of PDOs */