Update policy_engine.cpp

This commit is contained in:
Ben V. Brown
2021-02-24 19:54:37 +11:00
parent c210bf983c
commit 2bfb6745e4

View File

@@ -58,7 +58,7 @@ void PolicyEngine::notify(uint32_t notification) {
}
void PolicyEngine::pe_task(const void *arg) {
(void)arg;
(void) arg;
// Internal thread loop
hdr_template = PD_DATAROLE_UFP | PD_POWERROLE_SINK;
/* Initialize the old_tcc_match */
@@ -411,10 +411,9 @@ PolicyEngine::policy_engine_state PolicyEngine::pe_sink_ready() {
return PESinkSendSoftReset;
}
/* If we got an unknown message, send a soft reset ??? */
} else {
return PESinkSendSoftReset;
/* if we get an unknown message code, silently ignore it*/
return PESinkReady;
}
}
}
@@ -629,6 +628,10 @@ PolicyEngine::policy_engine_state PolicyEngine::pe_sink_source_unresponsive() {
return PESinkSourceUnresponsive;
}
uint32_t PolicyEngine::waitForEvent(uint32_t mask, TickType_t ticksToWait) { return xEventGroupWaitBits(xEventGroupHandle, mask, mask, pdFALSE, ticksToWait); }
uint32_t PolicyEngine::waitForEvent(uint32_t mask, TickType_t ticksToWait) {
return xEventGroupWaitBits(xEventGroupHandle, mask, mask, pdFALSE, ticksToWait);
}
bool PolicyEngine::isPD3_0() { return (hdr_template & PD_HDR_SPECREV) == PD_SPECREV_3_0; }
bool PolicyEngine::isPD3_0() {
return (hdr_template & PD_HDR_SPECREV) == PD_SPECREV_3_0;
}