Skip to content

Commit

Permalink
rename sample naming
Browse files Browse the repository at this point in the history
  • Loading branch information
devbis committed Oct 9, 2023
1 parent f1ec390 commit e92009f
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 76 deletions.
6 changes: 3 additions & 3 deletions src/device.c
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ void user_app_init(void)
af_endpointRegister(SENSOR_DEVICE_ENDPOINT, (af_simple_descriptor_t *)&sensorDevice_simpleDesc, zcl_rx_handler, NULL);

/* Register ZCL specific cluster information */
zcl_register(SENSOR_DEVICE_ENDPOINT, SENSOR_DEVICE_CB_CLUSTER_NUM, (zcl_specClusterInfo_t *)g_sampleSensorClusterList);
zcl_register(SENSOR_DEVICE_ENDPOINT, SENSOR_DEVICE_CB_CLUSTER_NUM, (zcl_specClusterInfo_t *)g_sensorDeviceClusterList);

#ifdef ZCL_OTA
ota_init(OTA_TYPE_CLIENT, (af_simple_descriptor_t *)&sensorDevice_simpleDesc, &sensorDevice_otaInfo, &sensorDevice_otaCb);
Expand Down Expand Up @@ -243,7 +243,7 @@ void app_task(void)
}
}

static void sampleSensorSysException(void)
static void sensorDeviceSysException(void)
{
SYSTEM_RESET();
//light_on();
Expand Down Expand Up @@ -305,7 +305,7 @@ void user_init(bool isRetention)
user_app_init();

/* Register except handler for test */
sys_exceptHandlerRegister(sampleSensorSysException);
sys_exceptHandlerRegister(sensorDeviceSysException);

/* User's Task */
#if ZBHCI_EN
Expand Down
25 changes: 1 addition & 24 deletions src/device.h
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
/********************************************************************************************************
* @file sampleSensor.h
*
* @brief This is the header file for sampleSensor
*
* @author Zigbee Group
* @date 2021
*
* @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************************************/

#ifndef _DEVICE_H_
#define _DEVICE_H_

Expand Down Expand Up @@ -136,7 +113,7 @@ extern bdb_appCb_t g_zbDemoBdbCb;
extern bdb_commissionSetting_t g_bdbCommissionSetting;

extern u8 SENSOR_DEVICE_CB_CLUSTER_NUM;
extern const zcl_specClusterInfo_t g_sampleSensorClusterList[];
extern const zcl_specClusterInfo_t g_sensorDeviceClusterList[];
extern const af_simple_descriptor_t sensorDevice_simpleDesc;

/* Attributes */
Expand Down
27 changes: 2 additions & 25 deletions src/sensorEpCfg.c
Original file line number Diff line number Diff line change
@@ -1,26 +1,3 @@
/********************************************************************************************************
* @file sampleSensorEpCfg.c
*
* @brief This is the source file for sampleSensorEpCfg
*
* @author Zigbee Group
* @date 2021
*
* @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************************************/

/**********************************************************************
* INCLUDES
*/
Expand Down Expand Up @@ -287,7 +264,7 @@ const zclAttrInfo_t pollCtrl_attrTbl[] =
/**
* @brief Definition for simple contact sensor ZCL specific cluster
*/
const zcl_specClusterInfo_t g_sampleSensorClusterList[] =
const zcl_specClusterInfo_t g_sensorDeviceClusterList[] =
{
{ZCL_CLUSTER_GEN_BASIC, MANUFACTURER_CODE_NONE, ZCL_BASIC_ATTR_NUM, basic_attrTbl, zcl_basic_register, sensorDevice_basicCb},
{ZCL_CLUSTER_GEN_IDENTIFY, MANUFACTURER_CODE_NONE, ZCL_IDENTIFY_ATTR_NUM, identify_attrTbl, zcl_identify_register, sensorDevice_identifyCb},
Expand All @@ -306,7 +283,7 @@ const zcl_specClusterInfo_t g_sampleSensorClusterList[] =
#endif
};

u8 SENSOR_DEVICE_CB_CLUSTER_NUM = (sizeof(g_sampleSensorClusterList)/sizeof(g_sampleSensorClusterList[0]));
u8 SENSOR_DEVICE_CB_CLUSTER_NUM = (sizeof(g_sensorDeviceClusterList)/sizeof(g_sensorDeviceClusterList[0]));

/**********************************************************************
* FUNCTIONS
Expand Down
24 changes: 0 additions & 24 deletions src/zcl_sensorCb.c
Original file line number Diff line number Diff line change
@@ -1,27 +1,3 @@
/********************************************************************************************************
* @file zcl_sampleSensorCb.c
*
* @brief This is the source file for zcl_sampleSensorCb
*
* @author Zigbee Group
* @date 2021
*
* @par Copyright (c) 2021, Telink Semiconductor (Shanghai) Co., Ltd. ("TELINK")
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************************************/


/**********************************************************************
* INCLUDES
*/
Expand Down

0 comments on commit e92009f

Please sign in to comment.