From b24866225a6301d3a663f874725e83c012dc25d3 Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Wed, 26 Dec 2012 17:36:00 +0100 Subject: digital/beacon: add bitcloud stack into common directory digital/zigbit --- .../bitcloud/stack/Components/ZCL/include/zclMem.h | 62 ++++++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/ZCL/include/zclMem.h (limited to 'digital/zigbit/bitcloud/stack/Components/ZCL/include/zclMem.h') diff --git a/digital/zigbit/bitcloud/stack/Components/ZCL/include/zclMem.h b/digital/zigbit/bitcloud/stack/Components/ZCL/include/zclMem.h new file mode 100644 index 00000000..01321f26 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/ZCL/include/zclMem.h @@ -0,0 +1,62 @@ +/************************************************************************//** + \file zclMem.h + + \brief + The header file describes the ZCL memory structure + + The file describes the structure of ZCL memory + + \author + Atmel Corporation: http://www.atmel.com \n + Support email: avr@atmel.com + + Copyright (c) 2008-2011, Atmel Corporation. All rights reserved. + Licensed under Atmel's Limited License Agreement (BitCloudTM). + + \internal + History: + 03.12.08 I. Fedina - Created. +******************************************************************************/ + +#ifndef _ZCLMEM_H +#define _ZCLMEM_H + +#include +#include + +typedef enum +{ + ZCL_IDLE_STATE, + ZCL_REQUEST_STATE, + ZCL_WAITING_FOR_CONFIRM_STATE, + ZCL_WAITING_FOR_RESPONSE_STATE, + ZCL_CONFIRM_STATE, +} ZclState_t; + + +/* + * Describes ZCL memory structure + * */ +typedef struct +{ + ZclState_t state; + QueueDescriptor_t requestQueue; + uint8_t *request; + HAL_AppTimer_t waitTimer; + HAL_AppTimer_t reportTimer; +} ZclMem_t; + +/* + * ZCL memory global object + * */ +extern ZclMem_t zclMem; + +/* + * Function returns point to ZCL memory object + * */ +static inline ZclMem_t * zclMemReq() +{ + return ((ZclMem_t *)&zclMem); +} + +#endif // _ZCLMEM_H -- cgit v1.2.3