Skip to content

Commit

Permalink
fix(openthread): fix RCP build to pass time sync and CSL options
Browse files Browse the repository at this point in the history
  • Loading branch information
no2chem committed Jun 24, 2024
1 parent 0479494 commit 93d9982
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 1 deletion.
3 changes: 3 additions & 0 deletions components/openthread/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ if(CONFIG_OPENTHREAD_ENABLED)
"openthread/src/core/api/nat64_api.cpp"
"openthread/src/core/api/netdata_api.cpp"
"openthread/src/core/api/netdiag_api.cpp"
"openthread/src/core/api/network_time_api.cpp"
"openthread/src/core/api/random_crypto_api.cpp"
"openthread/src/core/api/tcp_api.cpp"
"openthread/src/core/api/udp_api.cpp"
Expand Down Expand Up @@ -123,6 +124,8 @@ if(CONFIG_OPENTHREAD_ENABLED)
"openthread/src/core/thread/network_diagnostic.cpp"
"openthread/src/core/thread/panid_query_server.cpp"
"openthread/src/core/thread/thread_netif.cpp"
"openthread/src/core/thread/thread_netif.cpp"
"openthread/src/core/thread/time_sync_service.cpp"
"openthread/src/core/thread/tmf.cpp"
"openthread/src/core/thread/topology.cpp"
"openthread/src/core/utils/child_supervision.cpp")
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@
* `RadioSpinel` platform is used.
*
*/
#define OPENTHREAD_CONFIG_PLATFORM_RADIO_SPINEL_RX_FRAME_BUFFER_SIZE 1024
#define OPENTHREAD_LIB_SPINEL_RX_FRAME_BUFFER_SIZE 1024

/**
* @def OPENTHREAD_CONFIG_PLATFORM_USEC_TIMER_ENABLE
Expand Down Expand Up @@ -242,3 +242,71 @@
#ifndef OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT
#define OPENTHREAD_CONFIG_MAC_MAX_CSMA_BACKOFFS_DIRECT CONFIG_OPENTHREAD_MAC_MAX_CSMA_BACKOFFS_DIRECT
#endif

/**
* @def OPENTHREAD_CONFIG_TIME_SYNC_ENABLE
*
* Define as 1 to enable the time synchronization service feature.
*
*/
#if CONFIG_OPENTHREAD_TIME_SYNC
#define OPENTHREAD_CONFIG_TIME_SYNC_ENABLE 1
#endif


#if CONFIG_OPENTHREAD_CSL_ENABLE

/**
* @def OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
*
* Define as 1 to support Thread 1.2 CSL feature.
*
*/
#ifndef OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE
#define OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE 1
#endif

/**
* @def OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE
*
* Define as 1 to enable support Thread 1.2 CSL debug.
*
*/
#ifndef OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE
#define OPENTHREAD_CONFIG_MAC_CSL_DEBUG_ENABLE CONFIG_OPENTHREAD_CSL_DEBUG_ENABLE
#endif

#endif // CONFIG_OPENTHREAD_CSL_ENABLE

/**
* @def OPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US
*
* Define as 1 to set the ahead time for CSL transmit timing.
*
*/
#ifndef OPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US
#define OPENTHREAD_CONFIG_MAC_CSL_REQUEST_AHEAD_US 20000
#endif

#if CONFIG_OPENTHREAD_LINK_METRICS

/**
* @def OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
*
* Define as 1 to support Thread 1.2 Link Metrics Subject feature.
*
*/
#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE 1
#endif

/**
* @def OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
*
* Define as 1 to support Thread 1.2 Link Metrics feature.
*
*/
#ifndef OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE
#define OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE 1
#endif
#endif //CONFIG_OPENTHREAD_LINK_METRICS

0 comments on commit 93d9982

Please sign in to comment.