From 62cfa5144a81f27772d2f6fab4934898196ec291 Mon Sep 17 00:00:00 2001 From: Zhangwx Date: Thu, 19 Jan 2023 03:28:17 +0800 Subject: [PATCH] [logging] fix print format when enabling csl debug (#8667) Fix some `uint32_t` variables using `%u` format when enabling csl debug. --- src/core/mac/sub_mac.cpp | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/core/mac/sub_mac.cpp b/src/core/mac/sub_mac.cpp index 5e1fc7ee1..8f401a3eb 100644 --- a/src/core/mac/sub_mac.cpp +++ b/src/core/mac/sub_mac.cpp @@ -299,9 +299,10 @@ void SubMac::HandleReceiveDone(RxFrame *aFrame, Error aError) #if OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE // Split the log into two lines for RTT to output - LogDebg("Received frame in state (SubMac %s, CSL %s), timestamp %u", StateToString(mState), - mIsCslSampling ? "CslSample" : "CslSleep", static_cast(aFrame->mInfo.mRxInfo.mTimestamp)); - LogDebg("Target sample start time %u, time drift %d", mCslSampleTime.GetValue(), + LogDebg("Received frame in state (SubMac %s, CSL %s), timestamp %lu", StateToString(mState), + mIsCslSampling ? "CslSample" : "CslSleep", + ToUlong(static_cast(aFrame->mInfo.mRxInfo.mTimestamp))); + LogDebg("Target sample start time %lu, time drift %d", ToUlong(mCslSampleTime.GetValue()), static_cast(aFrame->mInfo.mRxInfo.mTimestamp) - mCslSampleTime.GetValue()); #endif }