mirror of
https://github.com/espressif/openthread.git
synced 2025-05-17 15:26:16 +08:00
[core] check exclusive selection of FTD, MTD, or RADIO configs (#11376)
This commit adds a check in `instance.cpp` to ensure that exactly one of the `OPENTHREAD_CONFIG_FTD`, `OPENTHREAD_CONFIG_MTD`, or `OPENTHREAD_CONFIG_RADIO` configuration options is enabled. This enforces a clear definition of the build type and prevents potential conflicts or unexpected behavior arising from ambiguous or incorrect configurations.
This commit is contained in:

committed by
GitHub

parent
42fbcbde2c
commit
ab6e241d90
@ -40,6 +40,10 @@
|
||||
|
||||
namespace ot {
|
||||
|
||||
#if (OPENTHREAD_FTD + OPENTHREAD_MTD + OPENTHREAD_RADIO) != 1
|
||||
#error "Exactly one of {OPENTHREAD_FTD, OPENTHREAD_MTD, OPENTHREAD_RADIO} MUST be set"
|
||||
#endif
|
||||
|
||||
#if !OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
|
||||
|
||||
// Define the raw storage used for OpenThread instance (in single-instance case).
|
||||
|
Reference in New Issue
Block a user