mirror of
https://github.com/espressif/openthread.git
synced 2026-08-16 07:37:47 +00:00
[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:
@@ -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
|
||||
|
||||
@@ -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.
|
||||
|
||||
Reference in New Issue
Block a user