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 --- .../stack/Components/MAC_PHY/include/rfRandom.h | 73 ++++++++++++++++++++++ 1 file changed, 73 insertions(+) create mode 100644 digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/rfRandom.h (limited to 'digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/rfRandom.h') diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/rfRandom.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/rfRandom.h new file mode 100644 index 00000000..759944c7 --- /dev/null +++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/rfRandom.h @@ -0,0 +1,73 @@ +/**************************************************************************//** + \file rfRandom.h + + \brief Prototype of random generation function. + + \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 _RFRANDOM_H +#define _RFRANDOM_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ + +/****************************************************************************** + Types section +******************************************************************************/ +//! Random confirm structure. +typedef struct +{ + uint8_t *buff; + uint16_t value; +} RF_RandomConf_t; + +//! Random request structure. +typedef struct +{ + //! Service field - for internal needs. + MAC_Service_t service; + //! Number of bytes to be generated + uint8_t numberOfBytes; + //! Confirm structure on RF_RandomReq. + RF_RandomConf_t confirm; + //! Callback on RF_RandomReq. + void (*RF_RandomConf)(RF_RandomConf_t *conf); +} RF_RandomReq_t; + +/****************************************************************************** + Prototypes section +******************************************************************************/ +/**************************************************************************//** + \brief Requests random value from RF chip. Valid for RF231 and RF212. + \param reqParams - request parameters structure pointer. + \return none. +******************************************************************************/ +void RF_RandomReq(RF_RandomReq_t *reqParams); + +/**************************************************************************//** + \brief Requests random value from RF chip. Valid for RF231 and RF212. + \param reqParams - request parameters structure pointer. + \return none. +******************************************************************************/ +void RF_RandomSeqReq(RF_RandomReq_t *reqParams); + +#endif /*_RFRANDOM_H*/ + +// eof rfRandom.h -- cgit v1.2.3