1 #ifndef __LIGHT_H__ 2 #define __LIGHT_H__ 3 4 #ifndef CONFIG_INFO_DISABLE 5 #define LIGHT_DBG(fmt, ...) printf("[%s]" fmt "\n", __func__, ##__VA_ARGS__) 6 #else 7 #define LIGHT_DBG(fmt, ...) 8 #endif 9 10 #define LED_BLINK_PERIOD 1000 11 #define LED_BLINK_ON_TIME 600 12 #define LED_BLINK_OFF_TIME 400 13 14 /* unprovision device beacon adv time : 10 minutes*/ 15 #define MESH_PBADV_TIME (600 * 1000) 16 17 #define MESH_ELEM_COUNT 1 18 #define ELEMENT_NUM MESH_ELEM_COUNT 19 20 typedef struct { 21 struct k_timer led_blink_timer; 22 uint16_t present_color_temperature; 23 uint16_t target_color_temperature; 24 uint16_t lightness_start; 25 uint16_t present_lightness; 26 uint16_t target_lightness; 27 uint32_t color_temperature_end; 28 } light_param_t; 29 30 #endif 31