From 28a2767efcb60de8be6c30938ea4152947d6da39 Mon Sep 17 00:00:00 2001 From: Gatsby Van Date: Wed, 31 Jan 2024 19:43:29 +0800 Subject: [PATCH] *update time sync api --- df_datalink_sp/src/networking/link_layer/link_layer.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/df_datalink_sp/src/networking/link_layer/link_layer.h b/df_datalink_sp/src/networking/link_layer/link_layer.h index c6f5007..7e57207 100644 --- a/df_datalink_sp/src/networking/link_layer/link_layer.h +++ b/df_datalink_sp/src/networking/link_layer/link_layer.h @@ -64,6 +64,8 @@ typedef struct uint32_t svcTxCnt; uint32_t svcRecvCnt; uint32_t svcCorrectCnt; + + int64_t timeDev; } L2_LOG; typedef struct @@ -166,7 +168,8 @@ L2_FRAME_TYPE L2_GetNextFrameType(L2_INST *instPtr); L2_TOR_TYPE L2_GetNextTor(L2_INST *instPtr); // Time syncronization -int32_t L2_TimeAlign(L2_INST *instPtr, uint32_t frameNum, uint32_t slotNum, bool relative); +int32_t L2_GetTimeDeviation(L2_INST *instPtr, uint32_t frameNum, uint32_t slotNum, bool relative, int64_t* timeDev); +void L2_TimeAdjust(L2_INST *instPtr, const int64_t *timeDev); #endif /* __LINK_LAYER_H_ */