Cleanup FUSB setup
This commit is contained in:
@@ -63,7 +63,7 @@ void InterruptHandler::Thread(const void *arg) {
|
||||
for (;;) {
|
||||
// If the irq is low continue, otherwise wait for irq or timeout
|
||||
if (!getFUS302IRQLow()) {
|
||||
xTaskNotifyWait(0x00, 0x0F, NULL, PolicyEngine::setupCompleteOrTimedOut() ? 100 : 10);
|
||||
xTaskNotifyWait(0x00, 0x0F, NULL, TICKS_SECOND * 30);
|
||||
}
|
||||
/* Read the FUSB302B status and interrupt registers */
|
||||
fusb_get_status(&status);
|
||||
|
||||
@@ -16,10 +16,10 @@
|
||||
*/
|
||||
|
||||
#include "protocol_tx.h"
|
||||
#include "Defines.h"
|
||||
#include "fusb302b.h"
|
||||
#include "fusbpd.h"
|
||||
#include "policy_engine.h"
|
||||
|
||||
#include <pd.h>
|
||||
|
||||
osThreadId ProtocolTransmit::TaskHandle = NULL;
|
||||
@@ -103,7 +103,7 @@ ProtocolTransmit::protocol_tx_state ProtocolTransmit::protocol_tx_construct_mess
|
||||
if (PolicyEngine::isPD3_0()) {
|
||||
/* If we're starting an AMS, wait for permission to transmit */
|
||||
while (fusb_get_typec_current() != fusb_sink_tx_ok) {
|
||||
osDelay(1);
|
||||
vTaskDelay(TICKS_10MS);
|
||||
}
|
||||
}
|
||||
messageSending = true;
|
||||
|
||||
Reference in New Issue
Block a user