Commit 25f1f17b authored by limm's avatar limm

debug version v1.0 not include ota and factory test functions

parents
/********************************************************************************************************
* @file sampleLight.c
*
* @brief This is the source file for sampleLight
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#if (__PROJECT_3LIGHT_PANEL_DEMO__)
/**********************************************************************
* INCLUDES
*/
#include "tl_common.h"
#include "zb_api.h"
#include "zcl_include.h"
#include "bdb.h"
#include "ota.h"
#include "gp.h"
#include PROJECT_H
#if ZBHCI_EN
#include "zbhci.h"
#endif
#include "00ikonke_app/general/ikk-tick-handler.h"
#include "00ikonke_app/general/ikk-network.h"
/**********************************************************************
* LOCAL CONSTANTS
*/
/**********************************************************************
* TYPEDEFS
*/
/**********************************************************************
* GLOBAL VARIABLES
*/
app_ctx_t gLightCtx;
#ifdef ZCL_OTA
extern ota_callBack_t sampleLight_otaCb;
//running code firmware information
ota_preamble_t sampleLight_otaInfo = {
.fileVer = FILE_VERSION,
.imageType = IMAGE_TYPE,
.manufacturerCode = MANUFACTURER_CODE_TELINK,
};
#endif
//Must declare the application call back function which used by ZDO layer
const zdo_appIndCb_t appCbLst = {
bdb_zdoStartDevCnf,//start device cnf cb
NULL,//reset cnf cb
NULL,//device announce indication cb
sampleLight_leaveIndHandler,//leave ind cb
NetworkLeaveHandler,//leave cnf cb
sampleLight_nwkUpdateIndicateHandler,//nwk update ind cb
NULL,//permit join ind cb
NULL,//nlme sync cnf cb
JoinNetworkHandler,//tc join ind cb
};
/**
* @brief Definition for bdb commissioning setting
*/
bdb_commissionSetting_t g_bdbCommissionSetting = {
.linkKey.tcLinkKey.keyType = SS_GLOBAL_LINK_KEY,
.linkKey.tcLinkKey.key = (u8 *)tcLinkKeyCentralDefault, //can use unique link key stored in NV
.linkKey.distributeLinkKey.keyType = MASTER_KEY,
.linkKey.distributeLinkKey.key = (u8 *)linkKeyDistributedMaster, //use linkKeyDistributedCertification before testing
.linkKey.touchLinkKey.keyType = MASTER_KEY,
.linkKey.touchLinkKey.key = (u8 *)touchLinkKeyMaster, //use touchLinkKeyCertification before testing
#if TOUCHLINK_SUPPORT
.touchlinkEnable = 1, /* enable touch-link */
#else
.touchlinkEnable = 0, /* disable touch-link */
#endif
.touchlinkChannel = DEFAULT_CHANNEL, /* touch-link default operation channel for target */
.touchlinkLqiThreshold = 0xA0, /* threshold for touch-link scan req/resp command */
};
/**********************************************************************
* LOCAL VARIABLES
*/
ev_timer_event_t *sampleLightAttrsStoreTimerEvt = NULL;
/**********************************************************************
* FUNCTIONS
*/
/*********************************************************************
* @fn stack_init
*
* @brief This function initialize the ZigBee stack and related profile. If HA/ZLL profile is
* enabled in this application, related cluster should be registered here.
*
* @param None
*
* @return None
*/
void stack_init(void)
{
/* Initialize ZB stack */
zb_init();
/* Register stack CB */
zb_zdoCbRegister((zdo_appIndCb_t *)&appCbLst);
}
/*********************************************************************
* @fn user_app_init
*
* @brief This function initialize the application(Endpoint) information for this node.
*
* @param None
*
* @return None
*/
extern af_simple_descriptor_t device_simpleDesc[Support_Endpoint_Num];
extern zcl_specClusterInfo_t *g_EPClusterAllList[Support_Endpoint_Num];
extern uint8_t Cluster_Num_List[Support_Endpoint_Num];
void user_app_init(void)
{
af_nodeDescManuCodeUpdate(MANUFACTURER_CODE_TELINK);
/* Initialize ZCL layer */
/* Register Incoming ZCL Foundation command/response messages */
zcl_init(sampleLight_zclProcessIncomingMsg);
/* Initialize or restore attributes, this must before 'zcl_register()' */
//zcl_sampleLightAttrsInit();
for(uint8_t i =0;i< Support_Endpoint_Num;i++)
{
SimpleDesc_Init(fixedEndpoints[i]);
/* Register endPoint */
af_endpointRegister(fixedEndpoints[i], (af_simple_descriptor_t *)&device_simpleDesc[i], zcl_rx_handler, NULL);
/* Register ZCL specific cluster information */
zcl_register(fixedEndpoints[i], Cluster_Num_List[i], (zcl_specClusterInfo_t *)g_EPClusterAllList[i]);
}
#ifdef ZCL_GREEN_POWER
/* Initialize GP */
gp_init();
#endif
#ifdef ZCL_OTA
/* Initialize OTA */
ota_init(OTA_TYPE_CLIENT, (af_simple_descriptor_t *)&device_simpleDesc[0], &sampleLight_otaInfo, &sampleLight_otaCb);
#endif
zcl_reportingTabInit();
}
void report_handler(void)
{
if(zb_isDeviceJoinedNwk()){
if(zcl_reportingEntryActiveNumGet()){
u16 second = 1;//TODO: fix me
reportNoMinLimit();
//start report timer
reportAttrTimerStart(second);
}else{
//stop report timer
//reportAttrTimerStop();
}
}
}
void app_task(void)
{
//app_key_handler(); //lmm deledt
//localPermitJoinState();
if(BDB_STATE_GET() == BDB_STATE_IDLE){
//factroyRst_handler();
report_handler();
#if 0/* NOTE: If set to '1', the latest status of lighting will be stored. */
sampleLightAttrsChk();
#endif
}
}
static void sampleLightSysException(void)
{
zcl_onOffAttr_save();
//zcl_levelAttr_save();
//zcl_colorCtrlAttr_save();
iKonkeAfSelfPrint("something wrong ,then system reset");
SYSTEM_RESET();
//led_on(LED_POWER);
//while(1);
}
/*********************************************************************
* @fn user_init
*
* @brief User level initialization code.
*
* @param isRetention - if it is waking up with ram retention.
*
* @return None
*/
extern void App_Init(void);
void user_init(bool isRetention)
{
(void)isRetention;
/*Initialize Tick Running*/
Tick_Time_Init(); //lmm add for tick event init
/* Initialize Stack */
stack_init();
/* Initialize user application */
user_app_init();
App_Init();
/* Register except handler for test */
sys_exceptHandlerRegister(sampleLightSysException);
/* Adjust light state to default attributes*/
//light_adjust();
/* User's Task */
#if ZBHCI_EN
zbhciInit();
ev_on_poll(EV_POLL_HCI, zbhciTask);
#endif
ev_on_poll(EV_POLL_IDLE, app_task);
/* Read the pre-install code from NV */
if(bdb_preInstallCodeLoad(&gLightCtx.tcLinkKey.keyType, gLightCtx.tcLinkKey.key) == RET_OK){
g_bdbCommissionSetting.linkKey.tcLinkKey.keyType = gLightCtx.tcLinkKey.keyType;
g_bdbCommissionSetting.linkKey.tcLinkKey.key = gLightCtx.tcLinkKey.key;
}
/* Set default reporting configuration */
u8 reportableChange = 0x00;
for(uint8_t i =0;i< Support_Endpoint_Num;i++)
{
status_t status = bdb_defaultReportingCfg(fixedEndpoints[i], fixedProfileIds[i], ZCL_CLUSTER_GEN_ON_OFF, ZCL_ATTRID_ONOFF,
0x0000, 0, (u8 *)&reportableChange);
/* Initialize BDB */
iKonkeAfSelfPrint("bdb_defaultReportingCfg: index(%d),endpoint(%d),profile(%d) status(%d)\r\n", i,fixedEndpoints[i],fixedProfileIds[i], status);
}
u8 result =bdb_init((af_simple_descriptor_t *)&g_EPClusterAllList[0], &g_bdbCommissionSetting, &g_zbDemoBdbCb, 1);
iKonkeAfSelfPrint("bdb_defaultReportingCfg,result = %d\r\n",result);
}
#endif /* __PROJECT_TL_DIMMABLE_LIGHT__ */
/********************************************************************************************************
* @file sampleLight.h
*
* @brief This is the header file for sampleLight
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#ifndef _SAMPLE_LIGHT_H_
#define _SAMPLE_LIGHT_H_
#include ENDPOINT_CONFIG_H
/**********************************************************************
* CONSTANT
*/
#define SAMPLE_LIGHT_ENDPOINT 0x01
#define SAMPLE_TEST_ENDPOINT 0x02
/**********************************************************************
* TYPEDEFS
*/
typedef struct{
u8 keyType; /* ERTIFICATION_KEY or MASTER_KEY key for touch-link or distribute network
SS_UNIQUE_LINK_KEY or SS_GLOBAL_LINK_KEY for distribute network */
u8 key[16]; /* the key used */
}app_linkKey_info_t;
typedef struct{
ev_timer_event_t *timerLedEvt;
u32 keyPressedTime;
u16 ledOnTime;
u16 ledOffTime;
u8 oriSta; //original state before blink
u8 sta; //current state in blink
u8 times; //blink times
u8 state;
bool bdbFindBindFlg;
bool lightAttrsChanged;
app_linkKey_info_t tcLinkKey;
}app_ctx_t;
/**
* @brief Defined for saving on/off attributes
*/
typedef struct {
u8 onOff;
u8 startUpOnOff;
}zcl_nv_onOff_t;
/**
* @brief Defined for saving level attributes
*/
typedef struct {
u8 curLevel;
u8 startUpCurLevel;
}zcl_nv_level_t;
/**
* @brief Defined for saving color control attributes
*/
typedef struct {
#if COLOR_RGB_SUPPORT
u8 currentHue;
u8 currentSaturation;
#elif COLOR_CCT_SUPPORT
u16 colorTemperatureMireds;
u16 startUpColorTemperatureMireds;
#endif
}zcl_nv_colorCtrl_t;
/**********************************************************************
* GLOBAL VARIABLES
*/
extern app_ctx_t gLightCtx;
extern bdb_commissionSetting_t g_bdbCommissionSetting;
extern bdb_appCb_t g_zbDemoBdbCb;
extern u8 SAMPLELIGHT_CB_CLUSTER_NUM;
extern const zcl_specClusterInfo_t g_sampleLightClusterList[];
extern const af_simple_descriptor_t sampleLight_simpleDesc;
#if AF_TEST_ENABLE
extern const af_simple_descriptor_t sampleTestDesc;
#endif
/**********************************************************************
* FUNCTIONS
*/
void sampleLight_zclProcessIncomingMsg(zclIncoming_t *pInHdlrMsg);
status_t sampleLight_basicCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload);
status_t sampleLight_identifyCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload);
status_t sampleLight_sceneCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload);
status_t sampleLight_onOffCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload);
status_t sampleLight_levelCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload);
status_t sampleLight_colorCtrlCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload);
void sampleLight_leaveCnfHandler(nlme_leave_cnf_t *pLeaveCnf);
void sampleLight_leaveIndHandler(nlme_leave_ind_t *pLeaveInd);
void sampleLight_otaProcessMsgHandler(u8 evt, u8 status);
u8 sampleLight_nwkUpdateIndicateHandler(nwkCmd_nwkUpdate_t *pNwkUpdate);
void sampleLight_onoff(u8 cmd);
void zcl_sampleLightAttrsInit(void);
nv_sts_t zcl_onOffAttr_save(void);
nv_sts_t zcl_levelAttr_save(void);
nv_sts_t zcl_colorCtrlAttr_save(void);
#if AF_TEST_ENABLE
void afTest_rx_handler(void *arg);
void afTest_dataSendConfirm(void *arg);
#endif
#endif /* _SAMPLE_LIGHT_H_ */
#ifndef __IKONKE_ENDPOINT_CONFIG_H___
#define __IKONKE_ENDPOINT_CONFIG_H___
#include "types.h"
/**
* @brief Defined for basic cluster attributes
*/
#define SUPPORT_MAX_EP 6
#define Support_Endpoint_Array {1 ,2 ,3 ,4 }
#define Support_Endpoint_Num 4
// Array of profile ids
#define FIXED_PROFILE_IDS { 260, 260, 260, 260 }
// Array of device ids
#define FIXED_DEVICE_IDS { HA_DEV_ONOFF_LIGHT_SWITCH, HA_DEV_ONOFF_LIGHT_SWITCH, HA_DEV_ONOFF_LIGHT_SWITCH, HA_DEV_ONOFF_LIGHT_SWITCH }
typedef struct{
u8 zclVersion;
u8 appVersion;
u8 stackVersion;
u8 hwVersion;
u8 manuName[24];
u8 modelId[24];
u8 swBuildId[24];
u8 powerSource;
u8 deviceEnable;
}zcl_basicAttr_t;
/**
* @brief Defined for identify cluster attributes
*/
typedef struct{
u16 identifyTime;
}zcl_identifyAttr_t;
/**
* @brief Defined for group cluster attributes
*/
typedef struct{
u8 nameSupport;
}zcl_groupAttr_t;
/**
* @brief Defined for scene cluster attributes
*/
typedef struct{
u8 sceneCount;
u8 currentScene;
u8 nameSupport;
bool sceneValid;
u16 currentGroup;
}zcl_sceneAttr_t;
/**
* @brief Defined for on/off cluster attributes
*/
typedef struct{
u16 onTime;
u16 offWaitTime;
u8 startUpOnOff;
bool onOff;
bool globalSceneControl;
}zcl_onOffAttr_t;
/**
* @brief Defined for level cluster attributes
*/
typedef struct{
u16 remainingTime;
u8 curLevel;
u8 startUpCurrentLevel;
}zcl_levelAttr_t;
/**
* @brief Defined for color control cluster attributes
*/
typedef struct{
u8 colorMode;
u8 options;
u8 enhancedColorMode;
u8 numOfPrimaries;
u16 colorCapabilities;
#if COLOR_RGB_SUPPORT
u8 currentHue;
u8 currentSaturation;
u8 colorLoopActive;
u8 colorLoopDirection;
u16 colorLoopTime;
u16 colorLoopStartEnhancedHue;
u16 colorLoopStoredEnhancedHue;
#elif COLOR_CCT_SUPPORT
u16 colorTemperatureMireds;
u16 colorTempPhysicalMinMireds;
u16 colorTempPhysicalMaxMireds;
u16 startUpColorTemperatureMireds;
#endif
}zcl_lightColorCtrlAttr_t;
extern const uint8_t fixedEndpoints[SUPPORT_MAX_EP] ;
extern const uint16_t fixedProfileIds[SUPPORT_MAX_EP];
extern const uint16_t fixedDeviceIds[SUPPORT_MAX_EP];
/* Attributes */
extern zcl_basicAttr_t g_zcl_basicAttrs;
extern zcl_identifyAttr_t g_zcl_identifyAttrs[];
extern zcl_groupAttr_t g_zcl_groupAttrs[];
extern zcl_sceneAttr_t g_zcl_sceneAttrs[];
extern zcl_onOffAttr_t g_zcl_onOffAttrs[];
#ifdef ZCL_LEVEL_CTRL
extern zcl_levelAttr_t g_zcl_levelAttrs;
extern zcl_lightColorCtrlAttr_t g_zcl_colorCtrlAttrs;
#define zcl_levelAttrGet(ep) &g_zcl_levelAttrs
#define zcl_colorAttrGet(ep) &g_zcl_colorCtrlAttrs
#endif
#define zcl_sceneAttrGet(ep) &g_zcl_sceneAttrs[ep-1]
#define zcl_onoffAttrGet(ep) &g_zcl_onOffAttrs[ep-1]
void SimpleDesc_Init(uint8_t endpint);
nv_sts_t zcl_onOffAttr_get(void);
nv_sts_t zcl_onOffAttr_save(void);
#endif
/********************************************************************************************************
* @file app_cfg.h
*
* @brief This is the header file for app_cfg
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#pragma once
/* Enable C linkage for C++ Compilers: */
#if defined(__cplusplus)
extern "C" {
#endif
/**********************************************************************
* Version configuration
*/
#include "ikk-config.h"
/**********************************************************************
* Product Information
*/
/* Debug mode config */
#define UART_PRINTF_MODE 1
#define USB_PRINTF_MODE 0
/* HCI interface */
#define ZBHCI_UART 0
/* RGB or CCT */
#define COLOR_RGB_SUPPORT 0
#define COLOR_CCT_SUPPORT 0
/* BDB */
#define TOUCHLINK_SUPPORT 0
#define FIND_AND_BIND_SUPPORT 0
#define CLOCK_SYS_CLOCK_HZ 48000000
/* Voltage detect module */
#define VOLTAGE_DETECT_ENABLE 0
/* Watch dog module */
#define MODULE_WATCHDOG_ENABLE 0
/* UART module */
#if ZBHCI_UART
#define MODULE_UART_ENABLE 1
#endif
#if (ZBHCI_USB_PRINT || ZBHCI_USB_CDC || ZBHCI_USB_HID || ZBHCI_UART)
#define ZBHCI_EN 1
#endif
/**********************************************************************
* ZCL cluster support setting
*/
#define ZCL_ON_OFF_SUPPORT 1
#define ZCL_LEVEL_CTRL_SUPPORT 0
#if (COLOR_RGB_SUPPORT || COLOR_CCT_SUPPORT)
#define ZCL_LIGHT_COLOR_CONTROL_SUPPORT 0
#endif
#define ZCL_GROUP_SUPPORT 1
#define ZCL_SCENE_SUPPORT 1
#define ZCL_OTA_SUPPORT 1
#define ZCL_PRIVATE_CLUSTER_FCC0_SUPPORT 1
#if TOUCHLINK_SUPPORT
#define ZCL_ZLL_COMMISSIONING_SUPPORT 1
#endif
#define AF_TEST_ENABLE 0
// UART
#if ZBHCI_UART
#error please configurate uart PIN!!!!!!
#endif
// DEBUG
#if UART_PRINTF_MODE
#define DEBUG_INFO_TX_PIN GPIO_PA2//print
#endif
/**********************************************************************
* Stack configuration
*/
/**
* @brief Working channel
* Valid value: 11 ~ 26
*/
#define DEFAULT_CHANNEL 20
/**
* @brief Security
*/
#define SECURITY_ENABLE 1
/**
* @brief NVRAM
*/
#define NV_ENABLE 1
/**********************************************************************
* Following parameter need user to adjust according the app requirement
*/
/**
* @brief ZCL: MAX number of cluster list, in cluster number add + out cluster number
*
*/
#define ZCL_CLUSTER_NUM_MAX 30
/**
* @brief ZCL: maximum number for zcl reporting table
*
*/
#define ZCL_REPORTING_TABLE_NUM 4
/**
* @brief ZCL: maximum number for zcl scene table
*
*/
#define ZCL_SCENE_TABLE_NUM 8
/**
* @brief APS: MAX number of groups size in the group table
* In each group entry, there is 8 endpoints existed.
*/
#define APS_GROUP_TABLE_NUM 8
/**
* @brief APS: MAX number of binding table size
*/
#define APS_BINDING_TABLE_NUM 8
/**********************************************************************
* Following configuration will calculated automatically
*/
/**
Auto definition for the role
*/
#if (COORDINATOR)
#define ZB_ROUTER_ROLE 1
#define ZB_COORDINATOR_ROLE 1
#elif (ROUTER)
#define ZB_ROUTER_ROLE 1
#elif (END_DEVICE)
#define ZB_ED_ROLE 1
#endif
#if ZB_ROUTER_ROLE
#define GP_SUPPORT_ENABLE 1
#endif
#if (SECURITY_ENABLE)
#define ZB_SECURITY
#endif
/**********************************************************************
* EV configuration
*/
typedef enum{
EV_POLL_ED_DETECT,
EV_POLL_HCI,
EV_POLL_IDLE,
EV_POLL_MAX,
}ev_poll_e;
/* Disable C linkage for C++ Compilers: */
#if defined(__cplusplus)
}
#endif
#ifndef __IKONKE_CONFIG_H___
#define __IKONKE_CONFIG_H___
#include "types.h"
/*Dsp: product model id */
#define PRODUCT_MODEL "KK-PA-M10X"
/*Dsp: APP Version */
#define FIRMWARE_VER 0x20
/*Dsp: Stack Version */
#define STACK_VER 0x11
/*Dsp: HARDWARE_VER */
#define HARDWARE_VERSION 0x20
/*Dsp: MANUFATURE NAME */
#define MANUFATURE_NAME "Konke"
/*Dsp: MODEL_ID */
#define MODEL_ID 0x3AFE101000068624
/*Dsp: OTA_IMAGE_TYPE */
#define OTA_IMAGE_TYPE 65000
/*Dsp: OTA_FIRMVERSION */
#define OTA_FIRMVERSION 0x20
/*Dsp: MANUFATURE_CODE */
#define MANUFATURE_CODE 0x1268
/*Dsp: OTA_HARDWARE_VER */
#define OTA_HARDWARE_VER 0x20
#define MANUFACTURER_CODE_TELINK 0x1268
#define IMAGE_TYPE 65000
#define FILE_VERSION 0x10
#include "../common/comm_cfg.h"
/* Pre-compiled link configuration. */
#define IS_BOOT_LOADER_IMAGE 0
#define RESV_FOR_APP_RAM_CODE_SIZE 0
#define IMAGE_OFFSET APP_IMAGE_ADDR
#define ENDPOINT_CONFIG_H "3LightPanelDemo_endpoint_config.h"
#define PROJECT_H "3LightPanelDemo.h"
#endif
This diff is collapsed.
#ifndef __USER_H_______________________________
#define __USER_H_______________________________
#include "ikk-module-def.h"
#include "ikk-debug.h"
#include "ikk-button.h"
#include "ikk-led.h"
#include "ikk-network.h"
void App_Init(void);
#endif
/********************************************************************************************************
* @file version_cfg.h
*
* @brief This is the header file for version_cfg
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#pragma once
#include "../common/comm_cfg.h"
#if defined(MCU_CORE_826x)
#if (CHIP_8269)
#define CHIP_TYPE TLSR_8269
#else
#define CHIP_TYPE TLSR_8267
#endif
#elif defined(MCU_CORE_8258)
#define CHIP_TYPE TLSR_8258_512K//TLSR_8258_1M
#elif defined(MCU_CORE_8278)
#define CHIP_TYPE TLSR_8278
#elif defined(MCU_CORE_B91)
#define CHIP_TYPE TLSR_9518
#endif
#define APP_RELEASE 0x10//app release 1.0
#define APP_BUILD 0x01//app build 01
#define STACK_RELEASE 0x30//stack release 3.0
#define STACK_BUILD 0x01//stack build 01
/*********************************************************************************************
* During OTA upgrade, the upgraded device will check the rules of the following three fields.
* Refer to ZCL OTA specification for details.
*/
#define MANUFACTURER_CODE_TELINK 0x1268
#define IMAGE_TYPE 65000
#define FILE_VERSION 0x10
#ifndef MANUFACTURER_CODE_TELINK
#define MANUFACTURER_CODE_TELINK 0x1141//Telink ID
#endif
#ifndef IMAGE_TYPE
#define IMAGE_TYPE ((CHIP_TYPE << 8) | IMAGE_TYPE_LIGHT)
#endif
#ifndef FILE_VERSION
#define FILE_VERSION ((APP_RELEASE << 24) | (APP_BUILD << 16) | (STACK_RELEASE << 8) | STACK_BUILD)
#endif
/* Pre-compiled link configuration. */
#define IS_BOOT_LOADER_IMAGE 0
#define RESV_FOR_APP_RAM_CODE_SIZE 0
#define IMAGE_OFFSET APP_IMAGE_ADDR
/********************************************************************************************************
* @file zb_afTestCb.c
*
* @brief This is the source file for zb_afTestCb
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#if (__PROJECT_3LIGHT_PANEL_DEMO__)
/**********************************************************************
* INCLUDES
*/
#include "tl_common.h"
#include "zb_api.h"
#include "zcl_include.h"
#include PROJECT_H
#if ZBHCI_EN
#include "zbhci.h"
#endif
#if AF_TEST_ENABLE
/**********************************************************************
* LOCAL CONSTANTS
*/
/**********************************************************************
* TYPEDEFS
*/
/**********************************************************************
* LOCAL FUNCTIONS
*/
/**********************************************************************
* GLOBAL VARIABLES
*/
/**********************************************************************
* LOCAL VARIABLES
*/
u16 g_afTest_rcvReqCnt = 0;
/**********************************************************************
* FUNCTIONS
*/
static void afTest_testReqPrc(apsdeDataInd_t *pApsdeInd)
{
epInfo_t dstEp;
TL_SETSTRUCTCONTENT(dstEp, 0);
dstEp.dstEp = pApsdeInd->indInfo.src_ep;
dstEp.profileId = pApsdeInd->indInfo.profile_id;
dstEp.dstAddrMode = APS_SHORT_DSTADDR_WITHEP;
dstEp.dstAddr.shortAddr = pApsdeInd->indInfo.src_short_addr;
u8 dataLen = 50;
u8 *pBuf = (u8 *)ev_buf_allocate(dataLen);
if(pBuf){
u8 *pData = pBuf;
*pData++ = LO_UINT16(g_afTest_rcvReqCnt);
*pData++ = HI_UINT16(g_afTest_rcvReqCnt);
for(u8 i = 0; i < dataLen - 2; i++){
*pData++ = i;
}
u8 apsCnt = 0;
#if ZBHCI_EN
zbhciTx(ZCL_CLUSTER_TELINK_SDK_TEST_RSP, pApsdeInd->asduLen, (u8 *)pApsdeInd->asdu);
#else
af_dataSend(pApsdeInd->indInfo.dst_ep, &dstEp, ZCL_CLUSTER_TELINK_SDK_TEST_RSP, dataLen, pBuf, &apsCnt);
#endif
ev_buf_free(pBuf);
}
}
static void afTest_testClearReqPrc(apsdeDataInd_t *pApsdeInd)
{
epInfo_t dstEp;
TL_SETSTRUCTCONTENT(dstEp, 0);
dstEp.dstEp = pApsdeInd->indInfo.src_ep;
dstEp.profileId = pApsdeInd->indInfo.profile_id;
dstEp.dstAddrMode = APS_SHORT_DSTADDR_WITHEP;
dstEp.dstAddr.shortAddr = pApsdeInd->indInfo.src_short_addr;
u8 st = SUCCESS;
u8 apsCnt = 0;
af_dataSend(pApsdeInd->indInfo.dst_ep, &dstEp, ZCL_CLUSTER_TELINK_SDK_TEST_CLEAR_RSP, 1, &st, &apsCnt);
}
void afTest_rx_handler(void *arg)
{
apsdeDataInd_t *pApsdeInd = (apsdeDataInd_t *)arg;
switch(pApsdeInd->indInfo.cluster_id){
case ZCL_CLUSTER_TELINK_SDK_TEST_CLEAR_REQ:
g_afTest_rcvReqCnt = 0;
afTest_testClearReqPrc(pApsdeInd);
break;
case ZCL_CLUSTER_TELINK_SDK_TEST_REQ:
g_afTest_rcvReqCnt++;
afTest_testReqPrc(pApsdeInd);
break;
case ZCL_CLUSTER_TELINK_SDK_TEST_RSP:
break;
default:
break;
}
/* Must be free here. */
ev_buf_free((u8 *)arg);
}
void afTest_dataSendConfirm(void *arg)
{
// apsdeDataConf_t *pApsDataCnf = (apsdeDataConf_t *)arg;
}
#endif /* AF_TEST_ENABLE */
#endif /* __PROJECT_TL_DIMMABLE_LIGHT__ */
/********************************************************************************************************
* @file zb_appCb.c
*
* @brief This is the source file for zb_appCb
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#if (__PROJECT_3LIGHT_PANEL_DEMO__)
/**********************************************************************
* INCLUDES
*/
#include "tl_common.h"
#include "zb_api.h"
#include "zcl_include.h"
#include "bdb.h"
#include "ota.h"
#include PROJECT_H
#include "ikk-debug.h"
#include "ikk-network.h"
/**********************************************************************
* LOCAL CONSTANTS
*/
#define DEBUG_HEART 0
/**********************************************************************
* TYPEDEFS
*/
/**********************************************************************
* LOCAL FUNCTIONS
*/
void zbdemo_bdbInitCb(u8 status, u8 joinedNetwork);
void zbdemo_bdbCommissioningCb(u8 status, void *arg);
void zbdemo_bdbIdentifyCb(u8 endpoint, u16 srcAddr, u16 identifyTime);
/**********************************************************************
* GLOBAL VARIABLES
*/
bdb_appCb_t g_zbDemoBdbCb = {zbdemo_bdbInitCb, zbdemo_bdbCommissioningCb, zbdemo_bdbIdentifyCb, NULL};
#ifdef ZCL_OTA
ota_callBack_t sampleLight_otaCb =
{
sampleLight_otaProcessMsgHandler,
};
#endif
/**********************************************************************
* LOCAL VARIABLES
*/
u32 heartInterval = 0;
#if DEBUG_HEART
ev_timer_event_t *heartTimerEvt = NULL;
#endif
/**********************************************************************
* FUNCTIONS
*/
#if DEBUG_HEART
static s32 heartTimerCb(void *arg){
if(heartInterval == 0){
heartTimerEvt = NULL;
return -1;
}
gpio_toggle(LED_POWER);
return heartInterval;
}
#endif
s32 bdbNetworkSteerStart(void *arg){
u8 status = bdb_networkSteerStart();
printf("bdbNetworkSteerStart,restart steering = %d\r\n",status);
return -1;
}
#if FIND_AND_BIND_SUPPORT
s32 sampleLight_bdbFindAndBindStart(void *arg){
bdb_findAndBindStart(BDB_COMMISSIONING_ROLE_TARGET);
return -1;
}
#endif
/*********************************************************************
* @fn zbdemo_bdbInitCb
*
* @brief application callback for bdb initiation
*
* @param status - the status of bdb init BDB_INIT_STATUS_SUCCESS or BDB_INIT_STATUS_FAILURE
*
* @param joinedNetwork - 1: node is on a network, 0: node isn't on a network
*
* @return None
*/
void zbdemo_bdbInitCb(u8 status, u8 joinedNetwork){
if(status == BDB_INIT_STATUS_SUCCESS){
/*
* start bdb commissioning
* */
if(joinedNetwork){
heartInterval = 1000;
#ifdef ZCL_OTA
ota_queryStart(30);
#endif
}else{
heartInterval = 500;
#if (!ZBHCI_EN)
u16 jitter = 0;
do{
jitter = zb_random();
jitter &= 0xfff;
}while(jitter == 0);
// TL_ZB_TIMER_SCHEDULE(bdbNetworkSteerStart, NULL, jitter);
// bdbNetworkSteerStart();
#endif
}
}else{
heartInterval = 200;
}
#if DEBUG_HEART
if(heartTimerEvt){
TL_ZB_TIMER_CANCEL(&heartTimerEvt);
}
heartTimerEvt = TL_ZB_TIMER_SCHEDULE(heartTimerCb, NULL, heartInterval);
#endif
}
/*********************************************************************
* @fn zbdemo_bdbCommissioningCb
*
* @brief application callback for bdb commissioning
*
* @param status - the status of bdb commissioning
*
* @param arg
*
* @return None
*/
static ev_timer_event_t *kkSteeringNetworkEvent = NULL;
void zbdemo_bdbCommissioningCb(u8 status, void *arg){
printf("zbdemo_bdbCommissioningCb,status:%d\n\r",status);
NwkSteeringStatusEnum state = NWK_STEERING_STATUS_FAILED;
if(status == BDB_COMMISSION_STA_SUCCESS){
heartInterval = 1000;
Set2NwkJoiningCountdownCounter(3*1000);
#if FIND_AND_BIND_SUPPORT
if(!gLightCtx.bdbFindBindFlg){
gLightCtx.bdbFindBindFlg = TRUE;
#endif
//light_blink_start(2, 200, 200);
#ifdef ZCL_OTA
ota_queryStart(30);
#endif
#if FIND_AND_BIND_SUPPORT
//start Finding & Binding
TL_ZB_TIMER_SCHEDULE(sampleLight_bdbFindAndBindStart, NULL, 1000);
}
#endif
state = NWK_STEERING_STATUS_SUCCESS;
}else if(status == BDB_COMMISSION_STA_IN_PROGRESS){
}else if(status == BDB_COMMISSION_STA_NOT_AA_CAPABLE){
}else if((status == BDB_COMMISSION_STA_NO_NETWORK)||(status == BDB_COMMISSION_STA_TCLK_EX_FAILURE)){
u16 jitter = 0;
do{
jitter = zb_random();
jitter &= 0xfff;
}while(jitter == 0);
// if(!ev_timer_exist(kkSteeringNetworkEvent)) {
// iKonkeAfSelfPrint("kkSteeringNetworkEvent not exist\r\n");
// kkSteeringNetworkEvent = TL_ZB_TIMER_SCHEDULE(bdbNetworkSteerStart, NULL, 4000);
// }
// iKonkeAfSelfPrint("zbdemo_bdbCommissioningCb,restart steering,timer is %d,%d\r\n",ev_timer_enough(),jitter);
// TL_ZB_TIMER_SCHEDULE(bdbNetworkSteerStart, NULL, jitter);
}else if(status == BDB_COMMISSION_STA_TARGET_FAILURE){
}else if(status == BDB_COMMISSION_STA_FORMATION_FAILURE){
}else if(status == BDB_COMMISSION_STA_NO_IDENTIFY_QUERY_RESPONSE){
}else if(status == BDB_COMMISSION_STA_BINDING_TABLE_FULL){
}else if(status == BDB_COMMISSION_STA_NO_SCAN_RESPONSE){
}else if(status == BDB_COMMISSION_STA_NOT_PERMITTED){
}else if(status == BDB_COMMISSION_STA_FORMATION_DONE){
#if ZBHCI_EN
#else
tl_zbMacChannelSet(DEFAULT_CHANNEL); //set default channel
#endif
}
iKonkeAfSelfPrint("zbdemo_bdbCommissioningCbNetworkSteering,State = %d\r\n", status);
Set_Nwk_Steering_Status(state); //lmm modified
}
extern void sampleLight_zclIdentifyCmdHandler(u8 endpoint, u16 srcAddr, u16 identifyTime);
void zbdemo_bdbIdentifyCb(u8 endpoint, u16 srcAddr, u16 identifyTime){
#if FIND_AND_BIND_SUPPORT
sampleLight_zclIdentifyCmdHandler(endpoint, srcAddr, identifyTime);
#endif
}
#ifdef ZCL_OTA
void sampleLight_otaProcessMsgHandler(u8 evt, u8 status)
{
if(evt == OTA_EVT_START){
if(status == ZCL_STA_SUCCESS){
}else{
}
}else if(evt == OTA_EVT_COMPLETE){
if(status == ZCL_STA_SUCCESS){
ota_mcuReboot();
}else{
ota_queryStart(30);
}
}
}
#endif
/*********************************************************************
* @fn sampleLight_leaveIndHandler
*
* @brief Handler for ZDO leave indication message.
*
* @param pInd - parameter of leave indication
*
* @return None
*/
void sampleLight_leaveIndHandler(nlme_leave_ind_t *pLeaveInd)
{
iKonkeAfSelfPrint("111111Leave Network!!!!!!!\r\n");
}
u8 sampleLight_nwkUpdateIndicateHandler(nwkCmd_nwkUpdate_t *pNwkUpdate){
// iKonkeAfSelfPrint("111111sampleLight_nwkUpdateIndicateHandler!!!!!!!\r\n");
return FAILURE;
}
#endif /* __PROJECT_TL_DIMMABLE_LIGHT__ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/********************************************************************************************************
* @file zcl_sceneCb.c
*
* @brief This is the source file for zcl_sceneCb
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#if (__PROJECT_3LIGHT_PANEL_DEMO__)
/**********************************************************************
* INCLUDES
*/
#include "tl_common.h"
#include "zb_api.h"
#include "zcl_include.h"
#include PROJECT_H
/*********************************************************************
* @fn sampleLight_sceneRecallReqHandler
*
* @brief Handler for ZCL scene recall command. This function will recall scene.
*
* @param pApsdeInd
* @param pScene
*
* @return None
*/
extern void ON_OFF_Cmd_Handler(uint8_t endpoint,bool onoff);
extern void kZclClusterRecallSceneCallback(uint8_t endpoint, uint16_t cluster, uint8_t command_id, bool reportEnable, bool sceneRecallFlg);
static void sampleLight_sceneRecallReqHandler(uint8_t ep,zclIncomingAddrInfo_t *pAddrInfo, zcl_sceneEntry_t *pScene)
{
u8 extLen = 0;
#ifdef ZCL_ON_OFF
zcl_onOffAttr_t *pOnOff = zcl_onoffAttrGet(ep);
pOnOff->onOff = pScene->extField[extLen+3];
extLen += 4;
kZclClusterRecallSceneCallback(ep,ZCL_CLUSTER_GEN_ON_OFF,ZCL_CMD_SCENE_RECALL_SCENE,false,true);
ON_OFF_Cmd_Handler(ep,pOnOff->onOff);
#endif
#ifdef ZCL_LEVEL_CTRL
u8 level = pScene->extField[extLen+3];
extLen += 4;
#endif
#ifdef ZCL_LIGHT_COLOR_CONTROL
#if COLOR_RGB_SUPPORT
u8 hue = pScene->extField[extLen+3];
u8 saturation = pScene->extField[extLen+4];
extLen += 5;
#elif COLOR_CCT_SUPPORT
u16 colorTemperatureMireds = BUILD_U16(pScene->extField[extLen+3], pScene->extField[extLen+4]);
extLen += 5;
#endif
#endif
#ifdef ZCL_LEVEL_CTRL
moveToLvl_t moveToLevel;
moveToLevel.level = level;
moveToLevel.transitionTime = pScene->transTime;
moveToLevel.optPresent = 0;
sampleLight_levelCb(pAddrInfo, ZCL_CMD_LEVEL_MOVE_TO_LEVEL, &moveToLevel);
#endif
#ifdef ZCL_LIGHT_COLOR_CONTROL
#if COLOR_RGB_SUPPORT
zcl_colorCtrlMoveToHueAndSaturationCmd_t move2HueAndSat;
move2HueAndSat.hue = hue;
move2HueAndSat.saturation = saturation;
move2HueAndSat.transitionTime = pScene->transTime;
move2HueAndSat.optPresent = 0;
sampleLight_colorCtrlCb(pAddrInfo, ZCL_CMD_LIGHT_COLOR_CONTROL_MOVE_TO_HUE_AND_SATURATION, &move2HueAndSat);
#elif COLOR_CCT_SUPPORT
zcl_colorCtrlMoveToColorTemperatureCmd_t move2ColorTemp;
move2ColorTemp.colorTemperature = colorTemperatureMireds;
move2ColorTemp.transitionTime = pScene->transTime;
move2ColorTemp.optPresent = 0;
sampleLight_colorCtrlCb(pAddrInfo, ZCL_CMD_LIGHT_COLOR_CONTROL_MOVE_TO_COLOR_TEMPERATURE, &move2ColorTemp);
#endif
#endif
}
/*********************************************************************
* @fn sampleLight_sceneStoreReqHandler
*
* @brief Handler for ZCL scene store command. This function will set scene attribute first.
*
* @param pApsdeInd
* @param pScene
*
* @return None
*/
static void sampleLight_sceneStoreReqHandler(uint8_t ep ,zcl_sceneEntry_t *pScene)
{
/* receive Store Scene Request command, get the latest Scene info to save */
u8 extLen = 0;
#ifdef ZCL_ON_OFF
zcl_onOffAttr_t *pOnOff = zcl_onoffAttrGet(ep);
pScene->extField[extLen++] = LO_UINT16(ZCL_CLUSTER_GEN_ON_OFF);
pScene->extField[extLen++] = HI_UINT16(ZCL_CLUSTER_GEN_ON_OFF);
pScene->extField[extLen++] = 1;
pScene->extField[extLen++] = pOnOff->onOff;
kZclClusterRecallSceneCallback(ep,ZCL_CLUSTER_GEN_ON_OFF,ZCL_CMD_SCENE_STORE_SCENE,true,false);
#endif
#ifdef ZCL_LEVEL_CTRL
zcl_levelAttr_t *pLevel = zcl_levelAttrGet();
pScene->extField[extLen++] = LO_UINT16(ZCL_CLUSTER_GEN_LEVEL_CONTROL);
pScene->extField[extLen++] = HI_UINT16(ZCL_CLUSTER_GEN_LEVEL_CONTROL);
pScene->extField[extLen++] = 1;
pScene->extField[extLen++] = pLevel->curLevel;
#endif
#ifdef ZCL_LIGHT_COLOR_CONTROL
zcl_lightColorCtrlAttr_t *pColor = zcl_colorAttrGet();
pScene->extField[extLen++] = LO_UINT16(ZCL_CLUSTER_LIGHTING_COLOR_CONTROL);
pScene->extField[extLen++] = HI_UINT16(ZCL_CLUSTER_LIGHTING_COLOR_CONTROL);
#if COLOR_RGB_SUPPORT
pScene->extField[extLen++] = 2;
pScene->extField[extLen++] = pColor->currentHue;
pScene->extField[extLen++] = pColor->currentSaturation;
#elif COLOR_CCT_SUPPORT
pScene->extField[extLen++] = 2;
pScene->extField[extLen++] = LO_UINT16(pColor->colorTemperatureMireds);
pScene->extField[extLen++] = HI_UINT16(pColor->colorTemperatureMireds);
#endif
#endif
pScene->extFieldLen = extLen;
}
/*********************************************************************
* @fn sampleLight_sceneCb
*
* @brief Handler for ZCL Scene command.
*
* @param pApsdeInd
*
* @return None
*/
status_t sampleLight_sceneCb(zclIncomingAddrInfo_t *pAddrInfo, u8 cmdId, void *cmdPayload)
{
uint8_t ep = pAddrInfo->dstEp ;
if(pAddrInfo->dirCluster == ZCL_FRAME_CLIENT_SERVER_DIR){
switch(cmdId){
case ZCL_CMD_SCENE_STORE_SCENE:
sampleLight_sceneStoreReqHandler(ep,(zcl_sceneEntry_t *)cmdPayload);
break;
case ZCL_CMD_SCENE_RECALL_SCENE:
sampleLight_sceneRecallReqHandler(ep,pAddrInfo, (zcl_sceneEntry_t *)cmdPayload);
break;
default:
break;
}
}
return ZCL_STA_SUCCESS;
}
#endif /* __PROJECT_TL_DIMMABLE_LIGHT__ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
/********************************************************************************************************
* @file bootloader.h
*
* @brief This is the header file for bootloader
*
* @author Zigbee Group
* @date 2019
*
* @par Copyright (c) 2019, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
*
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
*
* 2. Unless for usage inside a TELINK integrated circuit, redistributions
* in binary form must reproduce the above copyright notice, this list of
* conditions and the following disclaimer in the documentation and/or other
* materials provided with the distribution.
*
* 3. Neither the name of TELINK, nor the names of its contributors may be
* used to endorse or promote products derived from this software without
* specific prior written permission.
*
* 4. This software, with or without modification, must only be used with a
* TELINK integrated circuit. All other usages are subject to written permission
* from TELINK and different commercial license may apply.
*
* 5. Licensee shall be solely responsible for any claim to the extent arising out of or
* relating to such deletion(s), modification(s) or alteration(s).
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
* WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
* DISCLAIMED. IN NO EVENT SHALL COPYRIGHT HOLDER BE LIABLE FOR ANY
* DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
* (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
* LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
* ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
*******************************************************************************************************/
#ifndef _BOOTLOADER_H_
#define _BOOTLOADER_H_
void bootloader_init(void);
#endif /* _BOOTLOADER_H_ */
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment