• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  *  Copyright (c) 2016, The OpenThread Authors.
3  *  All rights reserved.
4  *
5  *  Redistribution and use in source and binary forms, with or without
6  *  modification, are permitted provided that the following conditions are met:
7  *  1. Redistributions of source code must retain the above copyright
8  *     notice, this list of conditions and the following disclaimer.
9  *  2. Redistributions in binary form must reproduce the above copyright
10  *     notice, this list of conditions and the following disclaimer in the
11  *     documentation and/or other materials provided with the distribution.
12  *  3. Neither the name of the copyright holder nor the
13  *     names of its contributors may be used to endorse or promote products
14  *     derived from this software without specific prior written permission.
15  *
16  *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
17  *  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
18  *  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
19  *  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
20  *  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
21  *  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
22  *  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
23  *  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
24  *  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
25  *  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
26  *  POSSIBILITY OF SUCH DAMAGE.
27  */
28 
29 /**
30  * @file
31  *   This file includes miscellaneous compile-time configuration constants for OpenThread.
32  */
33 
34 #ifndef CONFIG_MISC_H_
35 #define CONFIG_MISC_H_
36 
37 #include "config/coap.h"
38 #include "config/srp_server.h"
39 
40 /**
41  * @def OPENTHREAD_CONFIG_STACK_VENDOR_OUI
42  *
43  * The Organizationally Unique Identifier for the Thread stack.
44  *
45  */
46 #ifndef OPENTHREAD_CONFIG_STACK_VENDOR_OUI
47 #define OPENTHREAD_CONFIG_STACK_VENDOR_OUI 0x18b430
48 #endif
49 
50 /**
51  * @def OPENTHREAD_CONFIG_STACK_VERSION_REV
52  *
53  * The Stack Version Revision for the Thread stack.
54  *
55  */
56 #ifndef OPENTHREAD_CONFIG_STACK_VERSION_REV
57 #define OPENTHREAD_CONFIG_STACK_VERSION_REV 0
58 #endif
59 
60 /**
61  * @def OPENTHREAD_CONFIG_STACK_VERSION_MAJOR
62  *
63  * The Stack Version Major for the Thread stack.
64  *
65  */
66 #ifndef OPENTHREAD_CONFIG_STACK_VERSION_MAJOR
67 #define OPENTHREAD_CONFIG_STACK_VERSION_MAJOR 0
68 #endif
69 
70 /**
71  * @def OPENTHREAD_CONFIG_STACK_VERSION_MINOR
72  *
73  * The Stack Version Minor for the Thread stack.
74  *
75  */
76 #ifndef OPENTHREAD_CONFIG_STACK_VERSION_MINOR
77 #define OPENTHREAD_CONFIG_STACK_VERSION_MINOR 1
78 #endif
79 
80 /**
81  * @def OPENTHREAD_CONFIG_ECDSA_ENABLE
82  *
83  * Define to 1 to enable ECDSA support.
84  *
85  */
86 #ifndef OPENTHREAD_CONFIG_ECDSA_ENABLE
87 #define OPENTHREAD_CONFIG_ECDSA_ENABLE 0
88 #endif
89 
90 /**
91  * @def OPENTHREAD_CONFIG_UPTIME_ENABLE
92  *
93  * Define to 1 to enable tracking the uptime of OpenThread instance.
94  *
95  */
96 #ifndef OPENTHREAD_CONFIG_UPTIME_ENABLE
97 #define OPENTHREAD_CONFIG_UPTIME_ENABLE 0
98 #endif
99 
100 /**
101  * @def OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE
102  *
103  * Define to 1 to enable the Jam Detection service.
104  *
105  */
106 #ifndef OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE
107 #define OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE 0
108 #endif
109 
110 /**
111  * @def OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
112  *
113  * Define to 1 to enable multiple instance support.
114  *
115  */
116 #ifndef OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE
117 #define OPENTHREAD_CONFIG_MULTIPLE_INSTANCE_ENABLE 0
118 #endif
119 
120 /**
121  * @def OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
122  *
123  * Define to 1 to enable Thread Test Harness reference device support.
124  *
125  */
126 #ifndef OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE
127 #define OPENTHREAD_CONFIG_REFERENCE_DEVICE_ENABLE 0
128 #endif
129 
130 /**
131  * @def OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE
132  *
133  * Define to 1 to enable UDP forward support.
134  *
135  */
136 #ifndef OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE
137 #define OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE 0
138 #endif
139 
140 /**
141  * @def OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE
142  *
143  * Whether use heap allocator for message buffers.
144  *
145  * @note If this is set, OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS is ignored.
146  *
147  */
148 #ifndef OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE
149 #define OPENTHREAD_CONFIG_MESSAGE_USE_HEAP_ENABLE 0
150 #endif
151 
152 /**
153  * @def OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS
154  *
155  * The number of message buffers in the buffer pool.
156  *
157  */
158 #ifndef OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS
159 #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 44
160 #endif
161 
162 /**
163  * @def OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE
164  *
165  * The size of a message buffer in bytes.
166  *
167  * Message buffers store pointers which have different sizes on different
168  * system. Setting message buffer size according to the CPU word length
169  * so that message buffer size will be doubled on 64bit system compared
170  * to that on 32bit system. As a result, the first message always have some
171  * bytes left for small packets.
172  *
173  */
174 #ifndef OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE
175 #define OPENTHREAD_CONFIG_MESSAGE_BUFFER_SIZE (sizeof(void *) * 32)
176 #endif
177 
178 /**
179  * @def OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER
180  *
181  * The default IEEE 802.15.4 transmit power (dBm).
182  *
183  */
184 #ifndef OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER
185 #define OPENTHREAD_CONFIG_DEFAULT_TRANSMIT_POWER 0
186 #endif
187 
188 /**
189  * @def OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE
190  *
191  * Define as 1 for OpenThread to drop a message (and not send any remaining fragments of the message) if all transmit
192  * attempts fail for a fragment of the message. For a direct transmission, a failure occurs after all MAC transmission
193  * attempts for a given fragment are unsuccessful. For an indirect transmission, a failure occurs after all data poll
194  * triggered transmission attempts for a given fragment fail.
195  *
196  * If set to zero (disabled), OpenThread will attempt to send subsequent fragments, whether or not all transmission
197  * attempts fail for a given fragment.
198  *
199  */
200 #ifndef OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE
201 #define OPENTHREAD_CONFIG_DROP_MESSAGE_ON_FRAGMENT_TX_FAILURE 1
202 #endif
203 
204 /**
205  * @def OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT
206  *
207  * The reassembly timeout between 6LoWPAN fragments in seconds.
208  *
209  */
210 #ifndef OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT
211 #define OPENTHREAD_CONFIG_6LOWPAN_REASSEMBLY_TIMEOUT 2
212 #endif
213 
214 /**
215  * @def OPENTHREAD_CONFIG_JOINER_UDP_PORT
216  *
217  * The default Joiner UDP port.
218  *
219  */
220 #ifndef OPENTHREAD_CONFIG_JOINER_UDP_PORT
221 #define OPENTHREAD_CONFIG_JOINER_UDP_PORT 1000
222 #endif
223 
224 /**
225  * @def OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS
226  *
227  * The maximum number of state-changed callback handlers (set using `otSetStateChangedCallback()`).
228  *
229  */
230 #ifndef OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS
231 #define OPENTHREAD_CONFIG_MAX_STATECHANGE_HANDLERS 1
232 #endif
233 
234 /**
235  * @def OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD
236  *
237  * The value ahead of the current frame counter for persistent storage.
238  *
239  */
240 #ifndef OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD
241 #define OPENTHREAD_CONFIG_STORE_FRAME_COUNTER_AHEAD 1000
242 #endif
243 
244 /**
245  * @def OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS
246  *
247  * Define as 1 to enable bultin-mbedtls.
248  *
249  * Note that the OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS determines whether to use bultin-mbedtls as well as
250  * whether to manage mbedTLS internally, such as memory allocation and debug.
251  *
252  */
253 #ifndef OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS
254 #define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS 1
255 #endif
256 
257 /**
258  * @def OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT
259  *
260  * Define as 1 to enable bultin mbedtls management.
261  *
262  * OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT determines whether to manage mbedTLS memory
263  * allocation and debug config internally.  If not configured, the default is to enable builtin
264  * management if builtin mbedtls is enabled and disable it otherwise.
265  *
266  */
267 #ifndef OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT
268 #define OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS
269 #endif
270 
271 /**
272  * @def OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE
273  *
274  * The size of heap buffer when DTLS is enabled.
275  *
276  */
277 #ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE
278 #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE
279 // Internal heap doesn't support size larger than 64K bytes.
280 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (63 * 1024)
281 #elif OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE
282 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (3136 * sizeof(void *))
283 #else
284 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE (1616 * sizeof(void *))
285 #endif
286 #endif
287 
288 /**
289  * @def OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS
290  *
291  * The size of heap buffer when DTLS is disabled.
292  *
293  */
294 #ifndef OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS
295 #if OPENTHREAD_CONFIG_SRP_SERVER_ENABLE
296 // Internal heap doesn't support size larger than 64K bytes.
297 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS (63 * 1024)
298 #elif OPENTHREAD_CONFIG_ECDSA_ENABLE
299 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 2600
300 #else
301 #define OPENTHREAD_CONFIG_HEAP_INTERNAL_SIZE_NO_DTLS 384
302 #endif
303 #endif
304 
305 /**
306  * @def OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
307  *
308  * Enable the external heap.
309  *
310  */
311 #ifndef OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE
312 #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 0
313 #endif
314 
315 /**
316  * @def OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH
317  *
318  * The size of dtls application data when the CoAP Secure API is enabled.
319  *
320  */
321 #ifndef OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH
322 #define OPENTHREAD_CONFIG_DTLS_APPLICATION_DATA_MAX_LENGTH 1400
323 #endif
324 
325 /**
326  * @def OPENTHREAD_CONFIG_ASSERT_ENABLE
327  *
328  * Define as 1 to enable assert function `OT_ASSERT()` within OpenThread code and its libraries.
329  *
330  */
331 #ifndef OPENTHREAD_CONFIG_ASSERT_ENABLE
332 #define OPENTHREAD_CONFIG_ASSERT_ENABLE 1
333 #endif
334 
335 /**
336  * @def OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
337  *
338  * Enable the "Debug Uart" platform feature.
339  *
340  * In the embedded world, the CLI application uses a UART as a console
341  * and the NCP application can be configured to use either a UART or
342  * a SPI type device to transfer data to the host.
343  *
344  * The Debug UART is or requires a second uart on the platform.
345  *
346  * The Debug Uart has two uses:
347  *
348  * Use #1 - for random 'debug printf' type messages a developer may need
349  * Use #2 (selected via DEBUG_LOG_OUTPUT) is a log output.
350  *
351  * See #include <openthread/platform/debug_uart.h> for more details
352  */
353 #ifndef OPENTHREAD_CONFIG_ENABLE_DEBUG_UART
354 #define OPENTHREAD_CONFIG_ENABLE_DEBUG_UART 0
355 #endif
356 
357 /**
358  * @def OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH
359  *
360  * The settings storage path on posix platform.
361  *
362  */
363 #ifndef OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH
364 #define OPENTHREAD_CONFIG_POSIX_SETTINGS_PATH "tmp"
365 #endif
366 
367 /**
368  * @def OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE
369  *
370  * Define to 1 to enable otPlatFlash* APIs to support non-volatile storage.
371  *
372  * When defined to 1, the platform MUST implement the otPlatFlash* APIs instead of the otPlatSettings* APIs.
373  *
374  */
375 #ifndef OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE
376 #define OPENTHREAD_CONFIG_PLATFORM_FLASH_API_ENABLE 0
377 #endif
378 
379 /**
380  * @def OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS
381  *
382  * This setting configures the number of consecutive MCPS.DATA-Confirms having Status NO_ACK
383  * that cause a Child-to-Parent link to be considered broken.
384  *
385  */
386 #ifndef OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS
387 #define OPENTHREAD_CONFIG_FAILED_CHILD_TRANSMISSIONS 4
388 #endif
389 
390 /**
391  * @def OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE
392  *
393  * This setting configures the default buffer size for IPv6 datagram destined for an attached SED.
394  * A Thread Router MUST be able to buffer at least one 1280-octet IPv6 datagram for an attached SED according to
395  * the Thread Conformance Specification.
396  *
397  */
398 #ifndef OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE
399 #define OPENTHREAD_CONFIG_DEFAULT_SED_BUFFER_SIZE 1280
400 #endif
401 
402 /**
403  * @def OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT
404  *
405  * This setting configures the default datagram count of 106-octet IPv6 datagram per attached SED.
406  * A Thread Router MUST be able to buffer at least one 106-octet IPv6 datagram per attached SED according to
407  * the Thread Conformance Specification.
408  *
409  */
410 #ifndef OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT
411 #define OPENTHREAD_CONFIG_DEFAULT_SED_DATAGRAM_COUNT 1
412 #endif
413 
414 /**
415  * @def OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES
416  *
417  * The number of fragment priority entries.
418  *
419  */
420 #ifndef OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES
421 #define OPENTHREAD_CONFIG_NUM_FRAGMENT_PRIORITY_ENTRIES 8
422 #endif
423 
424 /**
425  * @def OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE
426  *
427  * Define to 1 to enable delay-aware queue management for the send queue.
428  *
429  * When enabled device will monitor time-in-queue of messages in the direct tx queue and if the wait time is lager than
430  * specified thresholds it may update ECN flag (if message indicates it is ECN-capable) or drop the message.
431  *
432  */
433 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE
434 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_ENABLE \
435     (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3)
436 #endif
437 
438 /**
439  * @OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL
440  *
441  * Specifies the time-in-queue threshold interval in milliseconds to mark ECN on a message if it is ECN-capable or
442  * drop the message if not ECN-capable.
443  *
444  */
445 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL
446 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_MARK_ECN_INTERVAL 500
447 #endif
448 
449 /**
450  * @OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL
451  *
452  * Specifies the time-in-queue threshold interval in milliseconds to drop a message.
453  *
454  */
455 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL
456 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_DROP_MSG_INTERVAL 1000
457 #endif
458 
459 /**
460  * OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME
461  *
462  * Specifies the max retain time in seconds of a mesh header fragmentation tag entry in the list.
463  *
464  * The entry in list is used to track whether an earlier fragment of same message was dropped by the router and if so
465  * the next fragments are also dropped. The entry is removed once last fragment is processed or after the retain time
466  * specified by this config parameter expires.
467  *
468  */
469 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME
470 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_RETAIN_TIME (4 * 60) // 4 minutes
471 #endif
472 
473 /**
474  * OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE
475  *
476  * Specifies the number of mesh header fragmentation tag entries in the list for delay-aware queue management.
477  *
478  * The list is used to track whether an earlier fragment of same message was dropped by the router and if so the next
479  * fragments are also dropped.
480  *
481  */
482 #ifndef OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE
483 #define OPENTHREAD_CONFIG_DELAY_AWARE_QUEUE_MANAGEMENT_FRAG_TAG_ENTRY_LIST_SIZE 16
484 #endif
485 
486 /**
487  * @def OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE
488  *
489  * Specifies the maximum number of frames in direct tx queue before new direct tx messages are dropped.
490  *
491  * If set to zero then the behavior is disabled, i.e., no check is performed on tx queue length.
492  *
493  */
494 #ifndef OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE
495 #if (OPENTHREAD_CONFIG_THREAD_VERSION >= OT_THREAD_VERSION_1_3)
496 #define OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 100
497 #else
498 #define OPENTHREAD_CONFIG_MAX_FRAMES_IN_DIRECT_TX_QUEUE 0
499 #endif
500 #endif
501 
502 /**
503  * @def OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT
504  *
505  * Define to 1 to support proprietary radio configurations defined by platform.
506  *
507  * @note If this setting is set to 1, the channel range is defined by the platform. Choosing this option requires
508  * the following configuration options to be defined by Platform:
509  * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_PAGE,
510  * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_MIN,
511  * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_MAX and,
512  * OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_CHANNEL_MASK.
513  *
514  * @def OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT
515  *
516  * Define to 1 to support OQPSK modulation in 915MHz frequency band. The physical layer parameters are defined in
517  * section 6 of IEEE802.15.4-2006.
518  *
519  * @note If this setting is set to 1, the IEEE 802.15.4 channel range is 1 to 10.
520  *
521  * @def OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT
522  *
523  * Define to 1 to support OQPSK modulation in 2.4GHz frequency band. The physical layer parameters are defined in
524  * section 6 of IEEE802.15.4-2006.
525  *
526  * @note If this settings is set to 1, the IEEE 802.15.4 channel range is 11 to 26.
527  *
528  * @note At least one of these settings must be set to 1. The platform must support the modulation and frequency
529  *       band configured by the setting.
530  */
531 #ifndef OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT
532 #ifndef OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT
533 #ifndef OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT
534 #define OPENTHREAD_CONFIG_PLATFORM_RADIO_PROPRIETARY_SUPPORT 0
535 #define OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT 0
536 #define OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT 1
537 #endif
538 #endif
539 #endif
540 
541 /**
542  * @def OPENTHREAD_CONFIG_DEFAULT_CHANNEL
543  *
544  * The default IEEE 802.15.4 channel.
545  *
546  */
547 #ifndef OPENTHREAD_CONFIG_DEFAULT_CHANNEL
548 #if OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT
549 #define OPENTHREAD_CONFIG_DEFAULT_CHANNEL 11
550 #else
551 #if OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT
552 #define OPENTHREAD_CONFIG_DEFAULT_CHANNEL 1
553 #endif // OPENTHREAD_CONFIG_RADIO_915MHZ_OQPSK_SUPPORT
554 #endif // OPENTHREAD_CONFIG_RADIO_2P4GHZ_OQPSK_SUPPORT
555 #endif // OPENTHREAD_CONFIG_DEFAULT_CHANNEL
556 
557 /**
558  * @def OPENTHREAD_CONFIG_LEGACY_ENABLE
559  *
560  * Define to 1 to enable legacy network support.
561  *
562  */
563 #ifndef OPENTHREAD_CONFIG_LEGACY_ENABLE
564 #define OPENTHREAD_CONFIG_LEGACY_ENABLE 0
565 #endif
566 
567 /**
568  * @def OPENTHREAD_CONFIG_OTNS_ENABLE
569  *
570  * Define to 1 to enable OTNS interactions.
571  *
572  */
573 #ifndef OPENTHREAD_CONFIG_OTNS_ENABLE
574 #define OPENTHREAD_CONFIG_OTNS_ENABLE 0
575 #endif
576 
577 /**
578  * @def OPENTHREAD_CONFIG_DUA_ENABLE
579  *
580  * Define as 1 to support Thread 1.2 Domain Unicast Address feature.
581  *
582  */
583 #ifndef OPENTHREAD_CONFIG_DUA_ENABLE
584 #define OPENTHREAD_CONFIG_DUA_ENABLE 0
585 #endif
586 
587 /**
588  * @def OPENTHREAD_CONFIG_MLR_ENABLE
589  *
590  * Define as 1 to support Thread 1.2 Multicast Listener Registration feature.
591  *
592  */
593 #ifndef OPENTHREAD_CONFIG_MLR_ENABLE
594 #define OPENTHREAD_CONFIG_MLR_ENABLE 0
595 #endif
596 
597 /**
598  * @def OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE
599  *
600  * Define as 1 to enable support for Neighbor Discover Agent.
601  *
602  */
603 #ifndef OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE
604 #define OPENTHREAD_CONFIG_NEIGHBOR_DISCOVERY_AGENT_ENABLE 0
605 #endif
606 
607 #endif // CONFIG_MISC_H_
608