diff --git a/workspace/TS100/Core/Drivers/FUSB302/policy_engine.h b/workspace/TS100/Core/Drivers/FUSB302/policy_engine.h index 259b4df5..833d368f 100644 --- a/workspace/TS100/Core/Drivers/FUSB302/policy_engine.h +++ b/workspace/TS100/Core/Drivers/FUSB302/policy_engine.h @@ -32,6 +32,7 @@ #define PDB_EVT_PE_HARD_SENT EVENT_MASK(4) #define PDB_EVT_PE_I_OVRTEMP EVENT_MASK(5) #define PDB_EVT_PE_PPS_REQUEST EVENT_MASK(6) +#define PDB_EVT_PE_MSG_RX_PEND EVENT_MASK(7) /* Never SEND THIS DIRECTLY*/ class PolicyEngine { public: @@ -123,7 +124,7 @@ private: static QueueHandle_t messagesWaiting; static bool messageWaiting(); //Read a pending message into the temp message - static void readMessage(); + static bool readMessage(); static void start_pps_timer(); static void stop_pps_timer(); diff --git a/workspace/TS100/Core/Drivers/FUSB302/protocol_rx.h b/workspace/TS100/Core/Drivers/FUSB302/protocol_rx.h index 274f506b..cdfce1f0 100644 --- a/workspace/TS100/Core/Drivers/FUSB302/protocol_rx.h +++ b/workspace/TS100/Core/Drivers/FUSB302/protocol_rx.h @@ -25,6 +25,7 @@ /* Events for the Protocol RX thread */ #define PDB_EVT_PRLRX_RESET EVENT_MASK(0) #define PDB_EVT_PRLRX_I_GCRCSENT EVENT_MASK(1) +#define PDB_EVT_PRLRX_I_RXPEND EVENT_MASK(2) class ProtocolReceive { public: diff --git a/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.h b/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.h index 50bb278d..b593feae 100644 --- a/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.h +++ b/workspace/TS100/Core/Drivers/FUSB302/protocol_tx.h @@ -49,6 +49,7 @@ private: static const size_t TaskStackSize = 1024 / 4; static uint32_t TaskBuffer[TaskStackSize]; static osStaticThreadDef_t TaskControlBlock; + static bool messageSending; /* * Protocol TX machine states *