Fix for x86_64 build fail
[platform/upstream/connectedhomeip.git] / examples / lighting-app / efr32 / include / AppConfig.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 #pragma once
21
22 // ---- Lighting Example App Config ----
23
24 #define APP_TASK_NAME "APP"
25
26 // EFR32 WSTK Buttons
27 #define PB0 0
28 #define PB1 1
29
30 // EFR32 WSTK LEDs
31 #define BSP_LED_0 0
32 #define BSP_LED_1 1
33
34 #define APP_LIGHT_SWITCH PB1
35 #define APP_FUNCTION_BUTTON PB0
36 #define APP_BUTTON_DEBOUNCE_PERIOD_MS 50
37
38 #define APP_BUTTON_PRESSED 0
39 #define APP_BUTTON_RELEASED 1
40
41 #define SYSTEM_STATE_LED BSP_LED_0
42 #define LIGHT_LED BSP_LED_1
43
44 // Time it takes in ms for the simulated actuator to move from one
45 // state to another.
46 #define ACTUATOR_MOVEMENT_PERIOS_MS 10
47
48 // ---- Light Example SWU Config ----
49 #define SWU_INTERVAl_WINDOW_MIN_MS (23 * 60 * 60 * 1000) // 23 hours
50 #define SWU_INTERVAl_WINDOW_MAX_MS (24 * 60 * 60 * 1000) // 24 hours
51
52 // ---- Thread Polling Config ----
53 #define THREAD_ACTIVE_POLLING_INTERVAL_MS 100
54 #define THREAD_INACTIVE_POLLING_INTERVAL_MS 1000
55
56 // EFR Logging
57 #ifdef __cplusplus
58 extern "C" {
59 #endif
60
61 void efr32LogInit(void);
62
63 void efr32Log(const char * aFormat, ...);
64 #define EFR32_LOG(...) efr32Log(__VA_ARGS__);
65 void appError(int err);
66
67 #ifdef __cplusplus
68 }
69 #endif