feat: 修改聆听逻辑, 增加超时时间判定与下发

This commit is contained in:
2025-05-27 17:37:31 +08:00
parent 65b3bf2f8e
commit 1df3228db2
4 changed files with 47 additions and 76 deletions
-12
View File
@@ -34,7 +34,6 @@
/************************** Constant Definitions *****************************/
#define NET_START_TIME_INFTY UINT32_MAX
#define LINK_BROCK_THRESHOLD L2_SLOTS_PER_FRAME // 0.5 seconds
#define LISTEN_TIMEOUT_INT L2_SLOTS_PER_FRAME // number of 2 ms slots
/************************** Variable Definitions *****************************/
/***************** Macros (Inline Functions) Definitions *********************/
@@ -1313,17 +1312,6 @@ int32_t L2_SetupNextSlot(L2_INST *instPtr, L2_TOR_TYPE txrxMode, L2_FRAME_TYPE f
L2_RcdShift(&(instPtr->frame), frameType);
L2_RcdShift(&(instPtr->tor), txrxMode);
if (L2_isCxn2Net(instPtr) == false)
{
// NOTE: LISTENING mode is assumed.
TIME_WORD listenTime = {LISTEN_TIMEOUT_INT, 0};
Status = Phy_SetTimeWord(phyRef, &listenTime, PHY_TIME_WORD_LISTEN_TIMEOUT);
if (Status != SUCCESS)
{
DBG_ERROR("Physical set listening timeout failed, with error code: %" PRId32 "\n", Status);
}
}
TIME_WORD pollTime = {0, 0};
pollTime.int_part = TimeCtrl_GetIntCnt(instPtr->config.tmcInstPtr) + 1;
Status = Phy_SetTimeWord(phyRef, &pollTime, PHY_TIME_WORD_POLL);