Commit d9011729 authored by hanxu's avatar hanxu

telin_zigbee_sdk-1.1.1

parent b1dbfcb7
......@@ -8,8 +8,8 @@
*/
//#define SINGLE_LIGHT_PANEL
//#define DUAL_LIGHT_PANEL
#define THREE_LIGHT_PANEL
//#define FOUR_LIGHT_PANEL
//#define THREE_LIGHT_PANEL
#define FOUR_LIGHT_PANEL
#ifdef SINGLE_LIGHT_PANEL
#define SUPPORT_MAX_EP 6
......
......@@ -4,8 +4,8 @@
#include "types.h"
//#define SINGLE_LIGHT_PANEL
//#define DUAL_LIGHT_PANEL
#define THREE_LIGHT_PANEL
//#define FOUR_LIGHT_PANEL
//#define THREE_LIGHT_PANEL
#define FOUR_LIGHT_PANEL
#ifdef SINGLE_LIGHT_PANEL
/*Dsp: product model id */
#define PRODUCT_MODEL "KK-LP-D81X"
......
......@@ -17,8 +17,8 @@
//#define SINGLE_LIGHT_PANEL
//#define DUAL_LIGHT_PANEL
#define THREE_LIGHT_PANEL
//#define FOUR_LIGHT_PANEL
//#define THREE_LIGHT_PANEL
#define FOUR_LIGHT_PANEL
#ifdef SINGLE_LIGHT_PANEL
#define g_ucRelayTotalNum 1
......
......@@ -2,7 +2,7 @@
#define __IKONKE_MODULE_DEBUG_H______________________________
#define IKONKE_DEBUG_LOG_ENABLE (1) // ENABLE
#define IKONKE_DEBUG_LOG_ENABLE (0) // ENABLE
#define PROMPT_DSR ""
......
......@@ -535,25 +535,22 @@ bool kOptTunnelTrytoWriteInstallCode(void)
OPTTUNEL_TOKEN_ST sOptunnel_Token_temp;
flash_read(TOKEN_USER_LOCATION,USER_SIZE,(uint8_t*)&sOptunnel_Token_temp);
if(All_Same_Data((uint8_t*)&sOptunnel_Token_temp.install_code.install_code_data,0xff,16)){
uint8_t installcode_buffer[16] = {0x30,0x30,0x30,0x30,0x30,0x30,0x30,0x30};
uint8_t length = 16;
addrExt_t long_address;
zb_getLocalExtAddr(long_address);
SWAP_EUI64((uint8_t *)long_address);//ȡ
uint8_t mac_address[8] = {0};
for(uint8_t i=4;i<8;i++){//0-7
mac_address[2*i-8] = long_address[i] >> 4;
mac_address[2*i-7] = long_address[i] & 0x0f;
uint8_t mac_address[16] = {0};
for(uint8_t i=0;i<8;i++){//0-15
mac_address[2*i] = long_address[i] >> 4;
mac_address[2*i+1] = long_address[i] & 0x0f;
}
iKonkeAfSelfPrint("!!!MAC_address:\r\n");
iKonkeAfSelfPrintBuffer(mac_address,8);
iKonkeAfSelfPrintBuffer(mac_address,16);
for(uint8_t i=0;i<8;i++)
for(uint8_t i=0;i<15;i++)
mac_address[i] = HexToASCII(mac_address[i]);
memcpy(&installcode_buffer[8], &mac_address[0], 8);
INSTALL_CODE_TOKEN_SET(installcode_buffer,length);
INSTALL_CODE_TOKEN_SET(mac_address,16);
}
}
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