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 --- .../MAC_PHY/MAC_HWD_PHY/include/machwd.h | 34 ++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdBatMon.h | 50 ++++++++++++ .../MAC_HWD_PHY/include/machwdCalibration.h | 52 ++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdData.h | 92 +++++++++++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdEd.h | 61 ++++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdEncrypt.h | 51 ++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdMem.h | 41 ++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdReset.h | 32 ++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdRnd.h | 58 +++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdService.h | 57 +++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdSet.h | 94 ++++++++++++++++++++++ .../MAC_PHY/MAC_HWD_PHY/include/machwdSetTrx.h | 65 +++++++++++++++ 12 files changed, 687 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwd.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdBatMon.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdCalibration.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdData.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEd.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEncrypt.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdMem.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdReset.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdRnd.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdService.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSet.h create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSetTrx.h (limited to 'digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY') diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwd.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwd.h new file mode 100644 index 00000000..2e3c47cb --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwd.h @@ -0,0 +1,34 @@ +/**************************************************************************//** + \file machwd.h + + \brief IEEE 802.15.4-2006 (hardware dependent part) public headers files' union. + + \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: + 24/05/07 A. Mandychev - Created. + 26/09/07 A. Mandychev - Redesigned. +******************************************************************************/ + +#ifndef _MACHWD_H +#define _MACHWD_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include +#include +#include +#include +#include + +#endif /* _MACHWD_H */ + +// eof machwd.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdBatMon.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdBatMon.h new file mode 100644 index 00000000..240228f9 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdBatMon.h @@ -0,0 +1,50 @@ +/**************************************************************************//** + \file machwdBatMon.h + + \brief Prototypes of battery monitor functions and corresponding types. + + \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: + 16/04/08 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDBATMON_H +#define _MACHWDBATMON_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ +//! Redefenition of battery request function name. +#define MACHWD_BatMonReq RF_BatteryMonReq + +/****************************************************************************** + Types section +******************************************************************************/ +//! Redefenition of battery request structure. +typedef RF_BatteryMonReq_t MACHWD_BatMonReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Sets battery monitor voltage. + \param reqParams - request parameters structure pointer. + \return none. +******************************************************************************/ +void MACHWD_BatMonReq(MACHWD_BatMonReq_t *reqParams); + +#endif /*_MACHWDBATMON_H*/ + +// eof machwdBatMon.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdCalibration.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdCalibration.h new file mode 100644 index 00000000..38e231c4 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdCalibration.h @@ -0,0 +1,52 @@ +/**************************************************************************//** + \file machwdCalib.h + + \brief MACHWD interface for PLL calibration and filter tuning. + + \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: + 2011-10-04 Max Gekk - Created. + Last change: + $Id: machwdCalibration.h 18970 2011-10-21 12:48:41Z mgekk $ + ******************************************************************************/ +#if !defined _MACHWDCALIB_H +#define _MACHWDCALIB_H + +/****************************************************************************** + Includes section + ******************************************************************************/ +#include + +/****************************************************************************** + Definitions section + ******************************************************************************/ +/** Redefenition of RF calibration request function name. **/ +#define MACHWD_CalibrationReq RF_CalibrationReq + +/****************************************************************************** + Types section + ******************************************************************************/ +/** Redefenition of random generation request structure. **/ +typedef RF_CalibrationReq_t MACHWD_CalibrationReq_t; + +/****************************************************************************** + Prototypes section + ******************************************************************************/ +/**************************************************************************//** + \brief Request to perform PLL and FTN calibration. + + \param[in] reqParams - pointer to calibration parameters - callback and + confirmation status. + \return None. + ******************************************************************************/ +void MACHWD_CalibrationReq(MACHWD_CalibrationReq_t *reqParams); + +#endif /* _MACHWDCALIB_H */ +/** eof machwdCalib.h */ diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdData.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdData.h new file mode 100644 index 00000000..fa4e1c86 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdData.h @@ -0,0 +1,92 @@ +/*************************************************************************//** + \file machwdData.h + + \brief MACHWD data types types and function prototypes. + + \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: + 26/09/07 A. Mandychev - Created. +*****************************************************************************/ + +#ifndef _MACHWDDATA_H +#define _MACHWDDATA_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ + +/****************************************************************************** + Types section +******************************************************************************/ +//! Set of frame transmission statuses. +typedef enum +{ + MACHWD_DATA_PENDING_DATA_STATUS, + MACHWD_CHANNEL_ACCESS_FAIL_DATA_STATUS, + MACHWD_NO_ACK_DATA_STATUS, + MACHWD_SUCCESS_DATA_STATUS, +} MACHWD_DataStatus_t; + +//! MACHWD data confirm structure. +typedef struct +{ + //! Frame transmission status. + MACHWD_DataStatus_t status; +} MACHWD_DataConf_t; + +//! MACHWD data request structure. +typedef struct +{ + //! Service field - for internal needs. + MACHWD_Service_t service; + //! Description of the frame to be transmitted. + MAC_FrameDescr_t frameDescr; + //! Command to set trx state after transmitting frame. + MACHWD_TrxCmd_t trxCmdToSetAfterTransmitTrxState; + //! MACHWD data transmission confirm callback function's pointer. + void (*MACHWD_DataConf)(MACHWD_DataConf_t *confParams); + //! MACHWD confirm structure. + MACHWD_DataConf_t confirm; +} MACHWD_DataReq_t; + +//! MACHWD data indication structure. +typedef struct +{ + //! Received frame description. + MAC_FrameDescr_t frameDescr; +} MACHWD_DataInd_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief MACHWD data request primitive's prototype. + \param reqParams - MACHWD data request's parameters' structure pointer. + \return none. +******************************************************************************/ +void MACHWD_DataReq(MACHWD_DataReq_t *reqParams); + +/**************************************************************************//** + \brief MACHWD data indication primitive's prototype. + \param indParams - MACHWD data indication parameters' structure pointer. + \return none. +******************************************************************************/ +extern void MACHWD_DataInd(MACHWD_DataInd_t *indParams); + +#endif /* _MACHWDDATA_H */ + +// eof machwdData.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEd.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEd.h new file mode 100644 index 00000000..9cd339f7 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEd.h @@ -0,0 +1,61 @@ +/**************************************************************************//** + \file machwdEd.h + + \brief MACHWD energy detection types and function prototypes. + + \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: + 24/05/07 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDED_H +#define _MACHWDED_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ + +/****************************************************************************** + Types section +******************************************************************************/ +//! MACHWD energy detection confirm structure. +typedef struct +{ + PHY_EnergyLevel_t energyLevel; +} MACHWD_EdConf_t; + +//! MACHWD energy detection request structure. +typedef struct +{ + MACHWD_Service_t service; + // Callback pointer. + void (*MACHWD_EdConf)(MACHWD_EdConf_t *confParams); + // Confirm parameters. + MACHWD_EdConf_t confirm; +} MACHWD_EdReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Detects energy level on channel. + \param reqParams - MACHWD energy detection request structure pointer. + \return none. +******************************************************************************/ +void MACHWD_EdReq(MACHWD_EdReq_t *reqParams); + +#endif /* _MACHWDED_H */ + +// eof machwdEd.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEncrypt.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEncrypt.h new file mode 100644 index 00000000..4da3710b --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdEncrypt.h @@ -0,0 +1,51 @@ +/**************************************************************************//** + \file machwdEncrypt.h + + \brief Prototypes of ecnryption functions and corresponding types. + Note that encryption is supported only for RF231 and RF212. + + \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: + 18/01/08 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDENCRYPT_H +#define _MACHWDENCRYPT_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ +//! Redefenition of encryption request function name. +#define MACHWD_EncryptReq RF_EncryptReq + +/****************************************************************************** + Types section +******************************************************************************/ +//! Redefenition of encryption request structure. +typedef RF_EncryptReq_t MACHWD_EncryptReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Executes AES command. + \param reqParams - request parameters structure pointer. + \return none. +******************************************************************************/ +void MACHWD_EncryptReq(MACHWD_EncryptReq_t *reqParams); + +#endif /*_MACHWDENCRYPT_H*/ + +// eof machwdEncrypt.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdMem.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdMem.h new file mode 100644 index 00000000..f094f0c5 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdMem.h @@ -0,0 +1,41 @@ +/****************************************************************************** + \file machwdMem.h + + \brief MACHWD memory type. + + \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). + + \brief + History: + 24/04/08 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDMEM_H +#define _MACHWDMEM_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ + +/****************************************************************************** + Types section +******************************************************************************/ +typedef struct +{ + FrameRxBufferState_t rxBufferState; +} MachwdMem_t; + +#endif /*_MACHWDMEM_H*/ + +// eof machwdMem.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdReset.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdReset.h new file mode 100644 index 00000000..d403355a --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdReset.h @@ -0,0 +1,32 @@ +/**************************************************************************//** + \file machwdReset.h + + \brief MACHWD reset types and function prototypes. + + \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: + 26/09/07 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDRESET_H +#define _MACHWDRESET_H + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Resets MAC_HWD_PHY layer. + \return none. +******************************************************************************/ +void MACHWD_Reset(void); + +#endif /* _MACHWDRESET_H */ + +// eof machwdReset.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdRnd.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdRnd.h new file mode 100644 index 00000000..ab551e89 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdRnd.h @@ -0,0 +1,58 @@ +/**************************************************************************//** + \file machwdRnd.h + + \brief MACHWD random generation types and function prototypes. + + \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: + 08/04/08 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDRND_H +#define _MACHWDRND_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ +//! Redefenition of random generation request function name. +#define MACHWD_RndReq RF_RandomReq +//! Redefenition of random seq generation request function name . +#define MACHWD_RndSeqReq RF_RandomSeqReq +/****************************************************************************** + Types section +******************************************************************************/ +//! Redefenition of random generation request structure. +typedef RF_RandomReq_t MACHWD_RndReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Requests random value. + \param reqParams - request parameters structure pointer. + \return none. +******************************************************************************/ +void MACHWD_RndReq(MACHWD_RndReq_t *reqParams); + +/**************************************************************************//** + \brief Requests random seq. + \param reqParams - request parameters structure pointer. + \return none. +******************************************************************************/ +void MACHWD_RndSeqReq(MACHWD_RndReq_t *reqParams); + +#endif /*_MACHWDRND_H*/ + +// eof machwdRnd.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdService.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdService.h new file mode 100644 index 00000000..76f96b46 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdService.h @@ -0,0 +1,57 @@ +/**************************************************************************//** + \file machwdService.h + + \brief Describes types' declarations for internal needs. + + \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: + 30/05/07 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDSERVISE_H +#define _MACHWDSERVISE_H + +/****************************************************************************** + Includes section. +******************************************************************************/ +#include +#include + +/****************************************************************************** + Types section. +******************************************************************************/ +//! Set of MACHWD request identifiers. +enum +{ + MACHWD_TX_DATA_REQ_ID, + MACHWD_SET_TRX_STATE_REQ_ID, + MACHWD_SET_REQ_ID, + MACHWD_ED_REQ_ID, +#ifdef _RF_AES_ + MACHWD_ENCRYPT_REQ_ID, +#endif +#ifdef _RF_BAT_MON_ + MACHWD_BAT_MON_REQ_ID, +#endif +#ifdef _RF_RND_ + MACHWD_RND_REQ_ID, + MACHWD_RND_REQ_F_ID, +#endif +#ifdef _RF_CALIBRATION_ + MACHWD_CALIBRATION_REQ_ID +#endif +}; + +//! Inherited service structure. +typedef MAC_Service_t MACHWD_Service_t; + +#endif /* _MACHWDSERVISE_H */ + +// eof machwdService.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSet.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSet.h new file mode 100644 index 00000000..7b1909e3 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSet.h @@ -0,0 +1,94 @@ +/**************************************************************************//** + \file machwdSet.h + + \brief MACHWD set types and function prototypes. + + \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: + 26/09/07 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDSET_H +#define _MACHWDSET_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ +//! Start point for Atmel own identifier counting. +#define MACHWD_ATMEL_RESERVED_ID 0xF0 + +/****************************************************************************** + Types section +******************************************************************************/ +//! MACHWD PIB identifiers. +typedef enum +{ + // PHY id. + MACHWD_PIB_CURRENT_CHANNEL_ID = PHY_PIB_CURRENT_CHANNEL_ID, + MACHWD_PIB_TRANSMIT_POWER_ID = PHY_PIB_TRANSMIT_POWER_ID, + MACHWD_PIB_CCA_MODE_ID = PHY_PIB_CCA_MODE_ID, + MACHWD_PIB_CURRENT_PAGE_ID = PHY_PIB_CURRENT_PAGE_ID, + // MAC id. + MACHWD_PIB_MAX_CSMA_BACKOFFS_ID = MAC_PIB_MAX_CSMA_BACKOFFS_ID, + MACHWD_PIB_PANID_ID = MAC_PIB_PANID_ID, + MACHWD_PIB_SHORT_ADDR_ID = MAC_PIB_SHORT_ADDR_ID, + MACHWD_PIB_MIN_BE_ID = MAC_PIB_MIN_BE_ID, + MACHWD_PIB_MAX_FRAME_RETRIES_ID = MAC_PIB_MAX_FRAME_RETRIES_ID, + MACHWD_PIB_EXT_ADDR_ID = MAC_PIB_EXT_ADDR_ID, + // Additional id for software needs. + MACHWD_PIB_RF_IRQ_DISABLE_ID = MACHWD_ATMEL_RESERVED_ID, + MACHWD_PIB_BEACON_RX_MODE_ID = MACHWD_ATMEL_RESERVED_ID + 1, + // Additional id for hardware needs. + MACHWD_PIB_PAN_COORDINATOR_ID = MACHWD_ATMEL_RESERVED_ID + 2, +} MACHWD_PibId_t; + +//! MACHWD PIB attribute type. +typedef union +{ + MAC_PibAttr_t macPib; + PHY_PibAttr_t phyPib; + bool panCoordinator; + bool rfIrqDisable; + bool beaconRxMode; +} MACHWD_PibAttr_t; + +//! MACHWD set request structure. +typedef struct +{ + //! Service field - for internal needs. + MACHWD_Service_t service; + //! MACHWD PIB identifier. + MACHWD_PibId_t id; + //! MACHWD PIB attribute. + MACHWD_PibAttr_t attr; + // MACHWD set confirm callback function's pointer. + void (*MACHWD_SetConf)(void); +} MACHWD_SetReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Sets MACHWD attributes. + \param reqParams - MACHWD set request structure pointer. + \return none. +******************************************************************************/ +void MACHWD_SetReq(MACHWD_SetReq_t *reqParams); + +#endif /* _MACHWDSET_H */ + +// eof machwdSet.h diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSetTrx.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSetTrx.h new file mode 100644 index 00000000..7c0ac92c --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWD_PHY/include/machwdSetTrx.h @@ -0,0 +1,65 @@ +/**************************************************************************//** + \file machwdSetTrx.h + + \brief MACHWD transcivier control types and function prototypes. + + \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: + 26/09/07 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWDSETTRX_H +#define _MACHWDSETTRX_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ + +/****************************************************************************** + Types section +******************************************************************************/ +//! Set of commands to control radio transcivier. +typedef enum +{ + MACHWD_TX_ON_CMD, + MACHWD_RX_ON_CMD, + MACHWD_TRX_OFF_CMD, +} MACHWD_TrxCmd_t; + +//! Set TRX state request structure. +typedef struct +{ + //! Service field - for internal needs. + MACHWD_Service_t service; + //! Command to chnage the trancivier current state. + MACHWD_TrxCmd_t trxCmd; + // MACHWD set trx state confirm callback function's pointer. + void (*MACHWD_SetTrxStateConf)(void); +} MACHWD_SetTrxStateReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Set trx state. + \param reqParams - MACHWD set trx state request structure pointer. + \return none. +******************************************************************************/ +void MACHWD_SetTrxStateReq(MACHWD_SetTrxStateReq_t *reqParams); + +#endif /* _MACHWDSETTRX_H */ + +// eof machwdSetTrx.h -- cgit v1.2.3