Commit 682c75ca authored by limm's avatar limm

V1.0 VERSION

parent 25f1f17b
......@@ -47,12 +47,11 @@
#define _SAMPLE_LIGHT_H_
#include ENDPOINT_CONFIG_H
/**********************************************************************
* CONSTANT
*/
#define SAMPLE_LIGHT_ENDPOINT 0x01
#define SAMPLE_TEST_ENDPOINT 0x02
#define SAMPLE_TEST_ENDPOINT 0x06
/**********************************************************************
* TYPEDEFS
......
#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
#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]
#define zcl_BasicAttrGet() &g_zcl_basicAttrs
void SimpleDesc_Init(uint8_t endpint);
nv_sts_t zcl_onOffAttr_get(void);
nv_sts_t zcl_onOffAttr_save(void);
#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
#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 0x00068624
/*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.
......@@ -89,7 +89,7 @@ kk_err_t kPwmModuleInit(PwmConfSt pwmlist[], unsigned char pwm_number, pPwmActio
*/
void kPwmOptTrigger(uint8_t id, uint32_t start_value, uint32_t end_value, uint32_t duration_time );
bool kPwmClearGradientCounterById(uint8_t pwm_id);
void PWM_Test(uint8_t data);
......
#ifndef __IKONKE_MODULE_UART_H_______________________________
#define __IKONKE_MODULE_UART_H_______________________________
#include "../general/ikk-module-def.h"
#include "drv_uart.h"
// MSG BUFFER OF NODE MAXLENGTH
#define UMSG_NODE_SIZE 32
// Maximum number of message nodes in the queue
#define UMSG_NODE_MAX 4
// Maximum Cache Length of Message Receiver
#define UART_RECEIVER_CACHE_SIZE 128
//
typedef enum { EQU_RECV = 0, EQU_SENT }QueueEm;
// uart recv/send buffer node
typedef struct tag_uart_message_node {
unsigned char buffer[UMSG_NODE_SIZE];
unsigned char length;
// just for sending, Used to match instruction responses. For example, according to the instruction opcode!
unsigned char matcher[4];
unsigned char matcher_offset;
unsigned char matcher_n;
// just for sending, need to dispatch the response message?
bool bRspNeedtoDispatch;
// Attempt to send number of times, decreases to 0 when invalid!!!
unsigned char sent_try;
}UMsgNodeSt;
typedef struct tag_uart_message_queue {
UMsgNodeSt node[UMSG_NODE_MAX];
unsigned char counter;
}UMsgQueueSt;
typedef bool (*PFUNC_CRC)(uint8_t *pdat, int length );
typedef void (*PFUNC_INCOMING_CALLBACK)(UMsgNodeSt *pMsgNode );
typedef struct tag_uart_manager_st {
GPIO_PinTypeDef Rxpin;
GPIO_PinTypeDef Txpin;
uint8_t recv_header[4];
uint8_t recv_header_n;
// head detection assistant chunk!
uint8_t header_chunk[4];
uint8_t header_chunk_index;
// length occupy index,0xff is valided!
uint8_t buffer_len_index;
uint8_t additional_len;
PFUNC_CRC pfunc_crc;
PFUNC_INCOMING_CALLBACK pfunc_incoming;
// support for sleepy device. when waking up, the serial port receives automatically,
// and after receiving, it sleeps actively.
bool bSleepSupport;
// support for sleepy device. the countdown ends and goes to sleep!
uint16_t u16SleepCounter;
}UartManagerSt;
kk_err_t kUartMsgSent(UMsgNodeSt *pMsgNode );
/* DESP: serial usart driver init interface.
* PARAM[recv_header]: Recognition Sequence of recv effective data frame header and detection of Data Frame start.
* PARAM[recv_header_n]: the length of recv data frame header.
* PARAM[buffer_len_index]: the length of paload.
* PARAM[addtional_len]: the length of added
* PARAM[pfunc_crc]: CRC function.
* PARAM[pfunc_incoming]: Callback function when valid data frame is detected, provided by youself.
* PARAM[bSleepSupport]: support for sleepy device function.
* Auth: dingmz_frc.20190620.
* */
kk_err_t kUartModuleInit(GPIO_PinTypeDef Txpin,GPIO_PinTypeDef Rxpin, uint32_t rate, UART_ParityTypeDef parity, UART_StopBitTypeDef stopBits
, uint8_t recv_header[], uint8_t recv_header_n,uint8_t buffer_len_index,uint8_t addtional_len
, PFUNC_CRC pfunc_crc, PFUNC_INCOMING_CALLBACK pfunc_incoming
, bool bSleepSupport );
#if 0
void UART_TEST(void);
#endif
#endif
#ifndef __IKONKE_MODULE_UART_H_______________________________
#define __IKONKE_MODULE_UART_H_______________________________
#include "../general/ikk-module-def.h"
#include "drv_uart.h"
// MSG BUFFER OF NODE MAXLENGTH
#define UMSG_NODE_SIZE 96
// Maximum number of message nodes in the queue
#define UMSG_NODE_MAX 4
// Maximum Cache Length of Message Receiver
#define UART_RECEIVER_CACHE_SIZE 128
//
typedef enum { EQU_RECV = 0, EQU_SENT }QueueEm;
// uart recv/send buffer node
typedef struct tag_uart_message_node {
unsigned char buffer[UMSG_NODE_SIZE];
uint16_t length;
// just for sending, Used to match instruction responses. For example, according to the instruction opcode!
unsigned char matcher[4];
unsigned char matcher_offset;
unsigned char matcher_n;
// just for sending, need to dispatch the response message?
bool bRspNeedtoDispatch;
// Attempt to send number of times, decreases to 0 when invalid!!!
unsigned char sent_try;
unsigned char *ack;
unsigned char ack_length;
}UMsgNodeSt;
typedef struct tag_uart_message_queue {
UMsgNodeSt node[UMSG_NODE_MAX];
unsigned char counter;
}UMsgQueueSt;
typedef bool (*PFUNC_CRC)(uint8_t *pdat, int length );
typedef void (*PFUNC_INCOMING_CALLBACK)(UMsgNodeSt *pMsgNode );
typedef struct tag_uart_manager_st {
GPIO_PinTypeDef Rxpin;
GPIO_PinTypeDef Txpin;
uint8_t recv_header[4];
uint8_t recv_header_n;
// head detection assistant chunk!
uint8_t header_chunk[4];
uint8_t header_chunk_index;
// length occupy index,0xff is valided!
uint8_t buffer_len_index;
uint8_t additional_len;
PFUNC_CRC pfunc_crc;
PFUNC_INCOMING_CALLBACK pfunc_incoming;
// support for sleepy device. when waking up, the serial port receives automatically,
// and after receiving, it sleeps actively.
bool bSleepSupport;
// support for sleepy device. the countdown ends and goes to sleep!
uint16_t u16SleepCounter;
}UartManagerSt;
kk_err_t kUartMsgSent(UMsgNodeSt *pMsgNode );
/* DESP: serial usart driver init interface.
* PARAM[recv_header]: Recognition Sequence of recv effective data frame header and detection of Data Frame start.
* PARAM[recv_header_n]: the length of recv data frame header.
* PARAM[buffer_len_index]: the length of paload.
* PARAM[addtional_len]: the length of added
* PARAM[pfunc_crc]: CRC function.
* PARAM[pfunc_incoming]: Callback function when valid data frame is detected, provided by youself.
* PARAM[bSleepSupport]: support for sleepy device function.
* Auth: dingmz_frc.20190620.
* */
kk_err_t kUartModuleInit(GPIO_PinTypeDef Txpin,GPIO_PinTypeDef Rxpin, uint32_t rate, UART_ParityTypeDef parity, UART_StopBitTypeDef stopBits
, uint8_t recv_header[], uint8_t recv_header_n,uint8_t buffer_len_index,uint8_t addtional_len
, PFUNC_CRC pfunc_crc, PFUNC_INCOMING_CALLBACK pfunc_incoming
, bool bSleepSupport );
#if 0
void UART_TEST(void);
#endif
#endif
......@@ -28,11 +28,10 @@ typedef struct tag_zcl_report_table{
}ZclReportTableSt;
#define MAX_ATTR_CHANGE_SUPPORT_NUMS 8
typedef void (*pClusterAttributeChangeCallback)(uint8_t endpoint,uint16_t cluster,uint16_t attribute,uint8_t len,uint8_t *data);
typedef void (*pClusterAttributeChangeCallback)(uint8_t endpoint,uint16_t cluster,uint16_t attribute,uint8_t *data,uint8_t data_type);
typedef struct {
uint16_t cluster;
uint16_t attribute;
pClusterAttributeChangeCallback change_callback;
}AttributeChangeConfSt;
......@@ -41,20 +40,25 @@ typedef void (*pOnOffClusterOnOffStatusCallback)(uint8_t endpoint, OnOffStatusEn
void kZclOnOffClusterServerOnOffSet(uint8_t endpoint,bool onoff);
extern status_t zcl_attrWrite(u8 endpoint, u16 clusterId, zclWriteRec_t *pWriteRec, bool enable);
extern zclAttrInfo_t *zcl_attrRead(u8 endpoint, u16 clusterId, u16 attrId, status_t *status);
#define ReadServerAttribute(endpoint,clusterId,attributeID,status) (zcl_attrRead(endpoint,clusterId,attributeID,status))
#define kGetLastRssi() (g_sysDiags.lastMessageRSSI)
#define kGetLastLQI() (g_sysDiags.lastMessageLQI)
void Update_Local_Attribute_Info(void);
bool kIsKonkeRemoteGateway(void);
kk_err_t kZclOnOffClusterServerInit(pOnOffClusterOnOffStatusCallback pOnOffStatusCallback );
void ikkAttributeChangeCallbackRegister(AttributeChangeConfSt *ConfSt,uint8_t num);
void ON_OFF_Cmd_Handler(uint8_t endpoint,uint8_t cmd);
bool kZclOnOffClusterServerOnOffGet(uint8_t endpoint);
kk_err_t kZclOnOffClusterServerOnOffControl(uint8_t endpoint, OnOffCtrlEnum ctrlopt );
void ClusterAttributeChangeCallbackRegister(AttributeChangeConfSt *ConfSt,uint8_t num);
bool Get_Model_ID(uint8_t *ModeID);
bool kkClusterGetReportingPeriod(uint8_t endpoint, uint16_t cluster_id, uint16_t attribute_id,uint16_t *min_interval, uint16_t *max_interval );
void kOptTunnelReportingPlagiarizeOriginal(uint8_t endpoint, uint16_t clusterId, uint16_t attributeId );
void kZclClusterPermitReportTableInit(BindObjSt clusterBindList[], uint8_t size);
......
#ifndef __IKONKE_COMMAND_H____________________________
#define __IKONKE_COMMAND_H____________________________
#include "ikk-module-def.h"
#endif
#ifndef __IKONKE_COMMAND_H____________________________
#define __IKONKE_COMMAND_H____________________________
#include "ikk-module-def.h"
#include "../driver/ikk-uart.h"
#define CMD_CONTROL_FIELD_HOST_TO_ZIGBEE_NEED_ACK 0x10
#define CMD_CONTROL_FIELD_HOST_TO_ZIGBEE_NO_ACK 0x00
#define CMD_CONTROL_FIELD_ZIGBEE_TO_HOST_NEED_ACK 0x30
#define CMD_CONTROL_FIELD_ZIGBEE_TO_HOST_NO_ACK 0x20
typedef enum {
H_TO_Z_WITH_ACK = CMD_CONTROL_FIELD_HOST_TO_ZIGBEE_NEED_ACK,
H_TO_Z_NO_ACK = CMD_CONTROL_FIELD_HOST_TO_ZIGBEE_NO_ACK,
Z_TO_H_WITH_ACK = CMD_CONTROL_FIELD_ZIGBEE_TO_HOST_NEED_ACK,
Z_TO_H_NO_ACK = CMD_CONTROL_FIELD_ZIGBEE_TO_HOST_NO_ACK,
}CMD_CONTROL_FIELD_E;
typedef struct{
uint16_t seq;
uint8_t u8Datalen;
uint8_t u8ChannelID;
uint16_t u16Opcode;
uint8_t u8ArgLen;
uint8_t u8ARG[128];
}DataField_st;
typedef struct{
uint8_t u8SOFHeaderBuf[2];
uint16_t u16DataLength;
uint8_t u8ControlFied;
//uint16_t u16Seq;
DataField_st stDataField;
}MsgFrameworkFormat_st;
kk_err_t kCmdGeneralMsgPaser(UMsgNodeSt *pMsgNode, ComPortEm port, DataField_st *pDataOut);
uint16_t kCmdOpcodeRemap(uint16_t Opcode, uint8_t direction);
uint16_t kCmdGetMsgCrc16Value( uint8_t* msg, uint8_t len);
uint8_t kCmdMsgDataSentByPort(uint8_t u8Control_Field, DataField_st data, bool isGetResult, ComPortEm port);
#endif
#ifndef __IKONKE_MODULE_DEBUG_H______________________________
#define __IKONKE_MODULE_DEBUG_H______________________________
#define IKONKE_DEBUG_LOG_ENABLE (1) // ENABLE
#define PROMPT_DSR ""
#if (IKONKE_DEBUG_LOG_ENABLE)
#define iKonkeAfSelfPrint(...) do { \
extern int Tl_printf(const char *format, ...);\
Tl_printf(PROMPT_DSR); \
Tl_printf(__VA_ARGS__); \
}while(0)
//#define iKonkeAfSelfDebugExec(x) if ( emberAfPrintEnabled(0xffff) ) { x; }
#define iKonkeAfSelfPrintBuffer(buffer, len) DEBUG_ARRAY(1, (buffer), (len))
//#define iKonkeAfSelfPrintString(buffer) emberAfPrintString(0xffff, (buffer))
#else
#define iKonkeAfSelfPrint(...)
//#define iKonkeAfSelfDebugExec(x)
#define iKonkeAfSelfPrintBuffer(buffer, len)
//#define iKonkeAfSelfPrintString(buffer)
#endif
#endif
#ifndef __IKONKE_MODULE_DEBUG_H______________________________
#define __IKONKE_MODULE_DEBUG_H______________________________
#define IKONKE_DEBUG_LOG_ENABLE (0) // ENABLE
#define PROMPT_DSR ""
#if (IKONKE_DEBUG_LOG_ENABLE)
#define iKonkeAfSelfPrint(...) do { \
extern int Tl_printf(const char *format, ...);\
Tl_printf(PROMPT_DSR); \
Tl_printf(__VA_ARGS__); \
}while(0)
//#define iKonkeAfSelfDebugExec(x) if ( emberAfPrintEnabled(0xffff) ) { x; }
#define iKonkeAfSelfPrintBuffer(buffer, len) DEBUG_ARRAY(1, (buffer), (len))
//#define iKonkeAfSelfPrintString(buffer) emberAfPrintString(0xffff, (buffer))
#else
#define iKonkeAfSelfPrint(...)
//#define iKonkeAfSelfDebugExec(x)
#define iKonkeAfSelfPrintBuffer(buffer, len)
//#define iKonkeAfSelfPrintString(buffer)
#endif
#endif
......@@ -10,6 +10,18 @@
#define PRIV_CLUSTER_FCC0 0XFCC0
// Server attributes
#define ZCL_OPT_DATA_ATTRIBUTE_ID 0x0000 // Ver.: always
#define ZCL_TTS_ATTRIBUTE_ID 0x0001 // Ver.: always
#define ZCL_MTO_RR_RspRandom_ATTRIBUTE_ID 0x0002 // Ver.: always
#define ZCL_AssociatedAnnounce_ATTRIBUTE_ID 0x0003 // Ver.: always
#define ZCL_CMEI_ATTRIBUTE_ID 0x0010 // Ver.: always
#define ZCL_ISN_ATTRIBUTE_ID 0x0011 // Ver.: always
#define ZCL_InstallCode_ATTRIBUTE_ID 0x0012 // Ver.: always
#define ZCL_CHUNK_N1_ATTRIBUTE_ID 0x0013 // Ver.: always
#define OPTTUNNEL_OPTDATA_ID 0x0000 // FCC0 Cluster Attribute 0x0000
#define OPTTUNNEL_OPTDATA_MAXLEN 128
......@@ -51,10 +63,6 @@ typedef kk_err_t (*pFUNC_OPTDATA_MESSAGE_CALLBACK)(uint8_t channel, uint8_t opco
void Set2NwkJoiningCountdownCounter(u32 time_ms);
/* DESP: Private protocol common report interface.
* Auth: mengmengli_frc.20210527.
* */
kk_err_t kOptTunnelCommonReport(uint16_t attribute_id );
/* DESP: private clsuter protocol module init interface.
......@@ -66,14 +74,7 @@ kk_err_t kOptTunnelModuleInit(pFUNC_OPTDATA_MESSAGE_CALLBACK pOptdataIncomingCal
kk_err_t kOptTunnelOODReport(uint8_t channel, uint8_t opcode, uint8_t *arg, uint8_t length );
......
......@@ -15,5 +15,4 @@ void Tick_Time_Init(void);
* */
void kTickRunnningTrigger(void );
#endif
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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