From 40976e772d4d2cb1a26ec71080c73b170f868f35 Mon Sep 17 00:00:00 2001 From: Abtin Keshavarzian Date: Mon, 13 Apr 2026 20:49:34 -0700 Subject: [PATCH] [time-sync] add compile-time check for TREL incompatibility (#12880) This commit adds a compile-time check in `time_sync_service.hpp` to ensure that `OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE` is not enabled alongside `OPENTHREAD_CONFIG_TIME_SYNC_ENABLE`. The time synchronization feature is experimental and currently only supports IEEE 802.15.4 radio links. Attempting to use it over TREL is unsupported and will now result in a build failure. --- src/core/thread/time_sync_service.hpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core/thread/time_sync_service.hpp b/src/core/thread/time_sync_service.hpp index 1e0c01bee..bd81c28ea 100644 --- a/src/core/thread/time_sync_service.hpp +++ b/src/core/thread/time_sync_service.hpp @@ -38,6 +38,11 @@ #if OPENTHREAD_CONFIG_TIME_SYNC_ENABLE +#if OPENTHREAD_CONFIG_RADIO_LINK_TREL_ENABLE +#error "TIME_SYNC feature is not supported under RADIO_LINK_TREL. " \ + "TIME_SYNC is an experimental feature that only works on 15.4 radio." +#endif + #include #include "common/as_core_type.hpp"