[low-power] remove obsolete CSL functions (#5885)

This commit is contained in:
Jintao Lin
2020-11-30 17:58:10 -08:00
committed by GitHub
parent d24833f890
commit 5cfdbfc54d
2 changed files with 0 additions and 43 deletions
-34
View File
@@ -969,23 +969,6 @@ void SubMac::SetCslTimeout(uint32_t aTimeout)
mCslTimeout = aTimeout;
}
void SubMac::FillCsl(Frame &aFrame)
{
uint8_t *cur = aFrame.GetHeaderIe(Frame::kHeaderIeCsl);
if (cur != nullptr)
{
CslIe *csl = reinterpret_cast<CslIe *>(cur + sizeof(HeaderIe));
csl->SetPeriod(mCslPeriod);
csl->SetPhase(GetCslPhase());
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
otLogDebgMac("%10u:FillCsl() seq=%u phase=%hu", static_cast<uint32_t>(otPlatTimeGet()), aFrame.GetSequence(),
csl->GetPhase());
#endif
}
}
void SubMac::HandleCslTimer(Timer &aTimer)
{
aTimer.GetOwner<SubMac>().HandleCslTimer();
@@ -1031,23 +1014,6 @@ void SubMac::HandleCslTimer(void)
break;
}
}
uint16_t SubMac::GetCslPhase(void) const
{
TimeMicro now = TimerMicro::GetNow();
uint32_t delta;
if (mCslSampleTime < now)
{
delta = mCslSampleTime + mCslPeriod * kUsPerTenSymbols - now;
}
else
{
delta = mCslSampleTime - now;
}
return static_cast<uint16_t>(delta / kUsPerTenSymbols);
}
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
} // namespace Mac
-9
View File
@@ -438,14 +438,6 @@ public:
*
*/
void SetCslTimeout(uint32_t aTimeout);
/**
* This method fills the CSL parameter to the frame.
*
* @param[inout] aFrame A reference to the frame to fill CSL parameter.
*
*/
void FillCsl(Frame &aFrame);
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
/**
@@ -504,7 +496,6 @@ private:
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
static void HandleCslTimer(Timer &aTimer);
void HandleCslTimer(void);
uint16_t GetCslPhase(void) const;
#endif
enum