[low-power] fix CSL_RECEIVER build option (#5428)

This commit removes the config setting
OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE automatically when it's 1.2
and MTD. The reason is that it's in core config and it's also used in
platform (radio) which cannot access core config.

If CSL_RECEIVER is not set in options in cmake and it's 1.2, then in
core config, OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE would be turned
on if it's MTD. While in platform, it's not turned on. And then there
would be a link issue.
This commit is contained in:
Li Cao
2020-08-20 10:34:55 -07:00
committed by GitHub
parent 0bcc2611b5
commit e438c2e383
2 changed files with 3 additions and 3 deletions
+1 -3
View File
@@ -318,12 +318,10 @@
* @def OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
*
* This setting configures the CSL receiver feature in Thread 1.2.
* This is compulsory for 1.2 MTD, optional for 1.2 FTD.
*
*/
#ifndef OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE \
(OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_2) && OPENTHREAD_MTD
#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 0
#endif
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
+2
View File
@@ -413,6 +413,7 @@ public:
*/
otError Receive(uint8_t aChannel) { return otPlatRadioReceive(GetInstance(), aChannel); }
#if OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
/**
* This method updates the CSL sample time in radio.
*
@@ -436,6 +437,7 @@ public:
{
return otPlatRadioEnableCsl(GetInstance(), aCslPeriod, aExtAddr);
}
#endif // OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
/**
* This method gets the radio transmit frame buffer.