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 --- .../MAC_PHY/MAC_HWI/include/machwiMemAccess.h | 88 ++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 digital/beacon/src/Bitcloud_stack/Components/MAC_PHY/MAC_HWI/include/machwiMemAccess.h (limited to 'digital/beacon/src/Bitcloud_stack/Components/MAC_PHY/MAC_HWI/include/machwiMemAccess.h') diff --git a/digital/beacon/src/Bitcloud_stack/Components/MAC_PHY/MAC_HWI/include/machwiMemAccess.h b/digital/beacon/src/Bitcloud_stack/Components/MAC_PHY/MAC_HWI/include/machwiMemAccess.h new file mode 100644 index 00000000..ac75894f --- /dev/null +++ b/digital/beacon/src/Bitcloud_stack/Components/MAC_PHY/MAC_HWI/include/machwiMemAccess.h @@ -0,0 +1,88 @@ +/****************************************************************************** + \file machwiMemAccess.h + + \brief Provides access to MACHWI 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: + 11/07/08 A. Mandychev - Created. +******************************************************************************/ + +#ifndef _MACHWIMEMACCESS_H +#define _MACHWIMEMACCESS_H + +/****************************************************************************** + Includes section +******************************************************************************/ +#include +#include + +/****************************************************************************** + Define(s) section +******************************************************************************/ + +/****************************************************************************** + Types section +******************************************************************************/ + +/****************************************************************************** + External variables. +******************************************************************************/ + +/****************************************************************************** + Inline static functions prototypes section. +******************************************************************************/ +/****************************************************************************** + Gets address of MACHWI memory. + Parameters: none. + returns: Address of MACHWI memory. +******************************************************************************/ +INLINE MachwiMem_t* machwiGetMem(void) +{ + return &macMem.hwi; +} + +/****************************************************************************** + Stores the pointer to the current request. + Parameters: + req - pointer to the current request. + returns: + none. +******************************************************************************/ +INLINE void machwiStoreReqParams(void *req) +{ + machwiGetMem()->machwiReq = req; +} + +/****************************************************************************** + Gets the pointer to the current request. + Parameters: + none. + returns: + Pointer to the current request. +******************************************************************************/ +INLINE void* machwiGetReqParams(void) +{ + return machwiGetMem()->machwiReq; +} + +/**************************************************************************//** + \brief Allocates memory to execute request to MAC HWD sublayer. + + \return none. +******************************************************************************/ +INLINE MachwiHwdReqDescr_t* machwiGetHwdReqMem(void) +{ + return &machwiGetMem()->machwdReq; +} + +#endif /* _MACHWIMEM_H */ + +// eof machwiMemAccess.h -- cgit v1.2.3