Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / platform / k32w / app / project_include / CHIPProjectConfig.h
1 /*
2  *    Copyright (c) 2020 Project CHIP Authors
3  *    Copyright (c) 2020 Google LLC.
4  *    All rights reserved.
5  *
6  *    Licensed under the Apache License, Version 2.0 (the "License");
7  *    you may not use this file except in compliance with the License.
8  *    You may obtain a copy of the License at
9  *
10  *        http://www.apache.org/licenses/LICENSE-2.0
11  *
12  *    Unless required by applicable law or agreed to in writing, software
13  *    distributed under the License is distributed on an "AS IS" BASIS,
14  *    WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15  *    See the License for the specific language governing permissions and
16  *    limitations under the License.
17  */
18
19 /**
20  *    @file
21  *          Example project configuration file for CHIP.
22  *
23  *          This is a place to put application or project-specific overrides
24  *          to the default configuration values for general CHIP features.
25  *
26  */
27
28 #pragma once
29
30 #if BUILD_RELEASE // release build
31
32 // Security and Authentication enabled for release build.
33 #define CHIP_CONFIG_SECURITY_TEST_MODE 0
34 #define CHIP_CONFIG_REQUIRE_AUTH 1
35
36 #else // development build
37
38 // Security and Authentication disabled for development build.
39 // For convenience, enable CHIP Security Test Mode and disable the requirement for
40 // authentication in various protocols.
41 // WARNING: These options make it possible to circumvent basic CHIP security functionality,
42 // including message encryption. Because of this they MUST NEVER BE ENABLED IN PRODUCTION BUILDS.
43 #define CHIP_CONFIG_SECURITY_TEST_MODE 1
44 #define CHIP_CONFIG_REQUIRE_AUTH 0
45
46 /**
47  * CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY
48  *
49  * Enables the use of a hard-coded default CHIP device id and credentials if no device id
50  * is found in CHIP NV storage.
51  *
52  * This option is for testing only and should be disabled in production releases.
53  */
54 #define CHIP_DEVICE_CONFIG_ENABLE_TEST_DEVICE_IDENTITY 34
55
56 // Use a default setup PIN code if one hasn't been provisioned in flash.
57 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_PIN_CODE 12345678
58 #define CHIP_DEVICE_CONFIG_USE_TEST_SETUP_DISCRIMINATOR 0xF00
59
60 // Use a default pairing code if one hasn't been provisioned in flash.
61 #define CHIP_DEVICE_CONFIG_USE_TEST_PAIRING_CODE "CHIPUS"
62
63 /**
64  * CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER
65  *
66  * Enables the use of a hard-coded default serial number if none
67  * is found in CHIP NV storage.
68  */
69 #define CHIP_DEVICE_CONFIG_TEST_SERIAL_NUMBER "TEST_SN"
70
71 #endif // BUILD_RELEASE
72
73 /**
74  * CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID
75  *
76  * 0x235A: Chip's Vendor Id.
77  */
78 #define CHIP_DEVICE_CONFIG_DEVICE_VENDOR_ID 0x235A
79
80 /**
81  * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID
82  *
83  * 0x4B4C: K32W lighting-app
84  */
85 #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_ID 0x4B4C
86
87 /**
88  * CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION
89  *
90  * The product revision number assigned to device or product by the device vendor.  This
91  * number is scoped to the device product id, and typically corresponds to a revision of the
92  * physical device, a change to its packaging, and/or a change to its marketing presentation.
93  * This value is generally *not* incremented for device software revisions.
94  */
95 #define CHIP_DEVICE_CONFIG_DEVICE_PRODUCT_REVISION 1
96
97 /**
98  * CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
99  *
100  * A string identifying the firmware revision running on the device.
101  * CHIP currently expects the firmware version to be in the format
102  * {MAJOR_VERSION}.0d{MINOR_VERSION}
103  */
104 #ifndef CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION
105 #define CHIP_DEVICE_CONFIG_DEVICE_FIRMWARE_REVISION "0.1ALPHA"
106 #endif
107 /**
108  * CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE
109  *
110  * Enable support for CHIP-over-BLE (CHIPOBLE).
111  */
112 #define CHIP_DEVICE_CONFIG_ENABLE_CHIPOBLE 1
113
114 /**
115  * CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC
116  *
117  * Enables synchronizing the device's real time clock with a remote CHIP Time service
118  * using the CHIP Time Sync protocol.
119  */
120 //#define CHIP_DEVICE_CONFIG_ENABLE_CHIP_TIME_SERVICE_TIME_SYNC 1
121
122 /**
123  * CHIP_CONFIG_MAX_BINDINGS
124  *
125  * Maximum number of simultaneously active bindings per ChipExchangeManager
126  * 1 (Time Sync) + 2 (Two 1-way subscriptions) + 1 (Software Update) = 4
127  * in the worst case. Keeping another 4 as buffer.
128  */
129 #define CHIP_CONFIG_MAX_BINDINGS 8
130
131 /**
132  * CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD
133  *
134  * Select the ability to offload event logs to any interested subscribers using WDM.
135  */
136 #define CHIP_CONFIG_EVENT_LOGGING_WDM_OFFLOAD 1
137
138 /**
139  * CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS
140  *
141  * Enable recording UTC timestamps.
142  */
143 #define CHIP_CONFIG_EVENT_LOGGING_UTC_TIMESTAMPS 1
144
145 /**
146  * CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE
147  *
148  * A size, in bytes, of the individual debug event logging buffer.
149  */
150 #define CHIP_DEVICE_CONFIG_EVENT_LOGGING_DEBUG_BUFFER_SIZE (512)
151
152 /**
153  * CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT
154  *
155  * The amount of time in miliseconds after which BLE should change his advertisements
156  * from fast interval to slow interval.
157  *
158  * 30000 (30 secondes).
159  */
160 #define CHIP_DEVICE_CONFIG_BLE_FAST_ADVERTISING_TIMEOUT (30 * 1000)
161
162 /**
163  * CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT
164  *
165  * The amount of time in miliseconds after which BLE advertisement should be disabled, counting
166  * from the moment of slow advertisement commencement.
167  *
168  * Defaults to 9000000 (15 minutes).
169  */
170 #define CHIP_DEVICE_CONFIG_BLE_ADVERTISING_TIMEOUT (15 * 60 * 1000)
171
172 /**
173  * CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE
174  *
175  * For a development build, set the default importance of events to be logged as Debug.
176  * Since debug is the lowest importance level, this means all standard, critical, info and
177  * debug importance level vi events get logged.
178  */
179 #if BUILD_RELEASE
180 #define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Production
181 #else
182 #define CHIP_CONFIG_EVENT_LOGGING_DEFAULT_IMPORTANCE chip::Profiles::DataManagement::Debug
183 #endif // BUILD_RELEASE