add logging module.

This commit is contained in:
Gatsby Van
2023-12-26 21:51:28 +08:00
parent 7071b5bf33
commit 10fbdc78a6
2 changed files with 98 additions and 32 deletions
@@ -55,6 +55,38 @@ typedef struct {
TIMECTRL_INST* tmcInstPtr;
} L2_CONFIG;
typedef struct {
uint32_t frameRx;
uint32_t frameTx;
uint32_t frameRecv;
uint32_t frameCorrect;
uint32_t bmRxCnt;
uint32_t bmTxCnt;
uint32_t bmRecvCnt;
uint32_t bmCorrectCnt;
uint32_t w2acqRxCnt;
uint32_t w2acqTxCnt;
uint32_t w2acqRecvCnt;
uint32_t w2acqCorrectCnt;
uint32_t mgmtRxCnt;
uint32_t mgmtTxCnt;
uint32_t mgmtRecvCnt;
uint32_t mgmtCorrectCnt;
uint32_t tsyncRxCnt;
uint32_t tsyncTxCnt;
uint32_t tsyncRecvCnt;
uint32_t tsyncCorrectCnt;
uint32_t svcRxCnt;
uint32_t svcTxCnt;
uint32_t svcRecvCnt;
uint32_t svcCorrectCnt;
} L2_LOG;
typedef struct {
L2_CONFIG config;
L2_NODE_INFO myInfo;
@@ -77,6 +109,7 @@ typedef struct {
L2_RTT_FSM* rttFSM; // FSM for RTT (time sync algorithm)
uint8_t* sendPktData;
uint8_t* recvPktData;
L2_LOG log;
// for MPC
uint8_t buffSwitch;
uint8_t mgmtMsgRecvCnt0;