mirror of
https://github.com/Ralim/IronOS.git
synced 2025-02-26 07:53:55 +00:00
Update QC to allow 20V theoretically + allow query for power source
This commit is contained in:
@@ -119,7 +119,7 @@ uint8_t getButtonB() {
|
||||
}
|
||||
|
||||
void reboot() {
|
||||
// TODO
|
||||
//Spin for watchdog
|
||||
for (;;) {
|
||||
}
|
||||
}
|
||||
@@ -127,3 +127,4 @@ void reboot() {
|
||||
void delay_ms(uint16_t count) {
|
||||
delay_1ms(count);
|
||||
}
|
||||
|
||||
|
||||
@@ -34,3 +34,16 @@ uint8_t usb_pd_detect() {
|
||||
return false;
|
||||
}
|
||||
|
||||
bool getIsPoweredByDCIN() {
|
||||
//We return false until we are sure we are not using PD
|
||||
if (PolicyEngine::setupCompleteOrTimedOut() == false) {
|
||||
return false;
|
||||
}
|
||||
if (PolicyEngine::pdHasNegotiated()) {
|
||||
return false; // We are using PD
|
||||
}
|
||||
if (hasQCNegotiated()) {
|
||||
return false; // We are using QC
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user