From a54ad9edce697133a024aff096e50f7e4f389d5b Mon Sep 17 00:00:00 2001 From: Florent Duchon Date: Sun, 18 Mar 2012 12:22:02 +0100 Subject: digital/beacon: import Zigbit stack (bitcloud) & avr sources --- .../Components/ZCL/include/zclOtauDiscovery.h | 100 +++++++++++++++++++++ 1 file changed, 100 insertions(+) create mode 100644 digital/beacon/src/Bitcloud_stack/Components/ZCL/include/zclOtauDiscovery.h (limited to 'digital/beacon/src/Bitcloud_stack/Components/ZCL/include/zclOtauDiscovery.h') diff --git a/digital/beacon/src/Bitcloud_stack/Components/ZCL/include/zclOtauDiscovery.h b/digital/beacon/src/Bitcloud_stack/Components/ZCL/include/zclOtauDiscovery.h new file mode 100644 index 00000000..54365690 --- /dev/null +++ b/digital/beacon/src/Bitcloud_stack/Components/ZCL/include/zclOtauDiscovery.h @@ -0,0 +1,100 @@ +/**************************************************************************//** + \file zclOTAUCluster.h + + \brief Declaration of the private OTAU interface + + \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: + 13.05.10 A. Khromykh - Created. +*******************************************************************************/ +#ifndef _ZCLOTAUDISCOVERY_H +#define _ZCLOTAUDISCOVERY_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include +#include + +/****************************************************************************** + Types section +******************************************************************************/ +typedef union +{ + ZDO_ZdpReq_t zdpOtauReq; +#ifdef _ZCL_SECURITY_ + APS_RequestKeyReq_t apsKeyReq; +#endif // _ZCL_SECURITY_ + ZCL_Request_t zclCommandReq; +} OtauReqMemory_t; + +typedef union +{ + ZCL_OtauQueryNextImageReq_t uQueryNextImageReq; + ZCL_OtauImageBlockReq_t uImageBlockReq; + ZCL_OtauImagePageReq_t uImagePageReq; + ZCL_OtauUpgradeEndReq_t uUpgradeEndReq; +} OtauZclReqMemory_t; + +typedef struct +{ + uint32_t imageInternalLength; + uint8_t internalAddressStatus; + uint32_t currentFileOffset; + uint8_t currentDataSize; + uint32_t imageRemainder; + uint32_t imagePageOffset; +} OtauImageAuxVar_t; + +/***************************************************************************//** + \brief + ZCL OTAU Cluster parametres. +*******************************************************************************/ +typedef struct +{ + uint32_t imageSize; + uint8_t imageBlockData[OFD_BLOCK_SIZE]; + uint8_t *imagePageData; + +} ZclOtauClientImageBuffer_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/***************************************************************************//** +\brief Restart poll timer + +\param[in] period - timer fired time +\param[in] cb - pointer to fired method +******************************************************************************/ +void otauStartGenericTimer(uint32_t period, void (* cb)(void)); + +/***************************************************************************//** +\brief Restart discovery service with context gap +******************************************************************************/ +void otauStartPollDiscovery(void); + +/***************************************************************************//** +\brief Entry point to client process +******************************************************************************/ +void otauClientEntryPoint(void); + +/***************************************************************************//** +\brief Start discovery of upgrade server +******************************************************************************/ +void ZCL_OtauUpgradeServerDiscovery(void); + +/***************************************************************************//** +\brief Server IEEE addresses request +******************************************************************************/ +void otauServerExtAddrReq(void); + +#endif /* _ZCLOTAUDISCOVERY_H */ -- cgit v1.2.3