From 1969d860c7b72a7e35195c2866840a46722af94b Mon Sep 17 00:00:00 2001 From: "Ben V. Brown" Date: Sun, 6 Feb 2022 14:41:52 +1100 Subject: [PATCH] Update USBPD.cpp --- source/Core/Drivers/USBPD.cpp | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/source/Core/Drivers/USBPD.cpp b/source/Core/Drivers/USBPD.cpp index d992763b..d1093dde 100644 --- a/source/Core/Drivers/USBPD.cpp +++ b/source/Core/Drivers/USBPD.cpp @@ -67,16 +67,7 @@ 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 USBPowerDelivery::isVBUSConnected() { return fusb.isVBUSConnected(); } bool pdbs_dpm_evaluate_capability(const pd_msg *capabilities, pd_msg *request) {