Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / platform / efr32 / project_include / OpenThreadConfig.h
1 /*
2  *
3  *    Copyright (c) 2020 Project CHIP Authors
4  *    Copyright (c) 2019 Google LLC.
5  *    All rights reserved.
6  *
7  *    Licensed under the Apache License, Version 2.0 (the "License");
8  *    you may not use this file except in compliance with the License.
9  *    You may obtain a copy of the License at
10  *
11  *        http://www.apache.org/licenses/LICENSE-2.0
12  *
13  *    Unless required by applicable law or agreed to in writing, software
14  *    distributed under the License is distributed on an "AS IS" BASIS,
15  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
16  *    See the License for the specific language governing permissions and
17  *    limitations under the License.
18  */
19
20 /**
21  *    @file
22  *      Overrides to default OpenThread configuration.
23  *
24  */
25
26 #pragma once
27
28 #include <em_device.h>
29
30 // Disable the SiLabs-supplied OpenThread logging facilities and use
31 // the facilities provided by the Device Layer (see
32 // src/platform/EFR32/Logging.cpp).
33 #define OPENTHREAD_CONFIG_LOG_OUTPUT OPENTHREAD_CONFIG_LOG_OUTPUT_APP
34
35 // Turn on a moderate level of logging in OpenThread
36 // Enable use of external heap allocator (calloc/free) for OpenThread.
37 #define OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE 1
38
39 // EFR32MG21A020F1024IM32 has 96k of RAM. Reduce the number of buffers to
40 // conserve RAM for this Series 2 part.
41 #if defined(EFR32MG21A020F1024IM32)
42 #define OPENTHREAD_CONFIG_NUM_MESSAGE_BUFFERS 22
43 #endif
44
45 #define OPENTHREAD_CONFIG_JOINER_ENABLE 1
46 #define OPENTHREAD_CONFIG_NCP_UART_ENABLE 1
47 #define OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE 1
48
49 // Use the SiLabs-supplied default platform configuration for remainder
50 // of OpenThread config options.
51 //
52 // NB: This file gets included during the build of OpenThread.  Hence
53 // it cannot use "openthread" in the path to the included file.
54 //
55 #include "openthread-core-efr32-config.h"