summaryrefslogtreecommitdiffhomepage
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h
diff options
context:
space:
mode:
authorFlorent Duchon2012-12-26 17:36:00 +0100
committerFlorent Duchon2013-02-13 21:21:12 +0100
commitb24866225a6301d3a663f874725e83c012dc25d3 (patch)
treeca527a2aab9abcdfbaf244c53ca63f0c531892b0 /digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h234
1 files changed, 234 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h
new file mode 100644
index 00000000..1c897c1a
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/MAC_HWI/include/machwiManager.h
@@ -0,0 +1,234 @@
+/******************************************************************************
+ \file machwiManager.h
+
+ \brief Main MAC layer requests' manager header file.
+
+ \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:
+ 15/06/07 ALuzhetsky - Created.
+******************************************************************************/
+
+#ifndef _MACHWIMANAGER_H
+#define _MACHWIMANAGER_H
+
+/******************************************************************************
+ Includes section.
+******************************************************************************/
+#include <macAssociate.h>
+#include <macOrphan.h>
+#include <macCommStatus.h>
+#include <macData.h>
+#include <macAssociate.h>
+#include <macDisassociate.h>
+#include <macPoll.h>
+#include <macPurge.h>
+#include <macReset.h>
+#include <macRxEnable.h>
+#include <macStart.h>
+#include <macScan.h>
+#include <macSync.h>
+#include <macSetGet.h>
+
+/******************************************************************************
+ Types section.
+******************************************************************************/
+/******************************************************************************
+ Status of current operation which could be returned from particular handler.
+******************************************************************************/
+typedef enum
+{
+ MACHWI_SUCCESS_HNDLR_RESULT,
+ MACHWI_IN_PROGRESS_HNDLR_RESULT,
+} MachwiHandlerResult_t;
+
+/******************************************************************************
+ Possible states of machwiManager.
+******************************************************************************/
+typedef enum // machwiManager possible states.
+{
+ MACHWI_IDLE_STATE,
+ MACHWI_SET_REQ_STATE,
+ MACHWI_GET_REQ_STATE,
+ MACHWI_HARD_RESET_REQ_STATE,
+ MACHWI_SOFT_RESET_REQ_STATE,
+ MACHWI_SCAN_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_START_REQ_STATE,
+#endif //_FFD_
+ MACHWI_ASSOCIATE_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_ASSOCIATE_RESP_STATE,
+#endif //_FFD_
+ MACHWI_DISASSOCIATE_REQ_STATE,
+ MACHWI_RX_ENABLE_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_ORPHAN_RESP_STATE,
+#endif //_FFD_
+ MACHWI_POLL_REQ_STATE,
+ MACHWI_DATA_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_PURGE_REQ_STATE,
+#endif //_FFD_
+ MACHWI_TRANSACTION_TX_STATE,
+ MACHWI_BEACON_TX_STATE,
+} MachwiState_t;
+
+/******************************************************************************
+ Types of possible requests to MAC_HWI.
+******************************************************************************/
+typedef enum // machwi possible requests' types.
+{
+ MACHWI_SET_REQ_ID = MACHWI_SET_REQ_STATE,
+ MACHWI_GET_REQ_ID = MACHWI_GET_REQ_STATE,
+ MACHWI_HARD_RESET_REQ_ID = MACHWI_HARD_RESET_REQ_STATE,
+ MACHWI_SOFT_RESET_REQ_ID = MACHWI_SOFT_RESET_REQ_STATE,
+ MACHWI_SCAN_REQ_ID = MACHWI_SCAN_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_START_REQ_ID = MACHWI_START_REQ_STATE,
+#endif //_FFD_
+ MACHWI_ASSOCIATE_REQ_ID = MACHWI_ASSOCIATE_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_ASSOCIATE_RESP_ID = MACHWI_ASSOCIATE_RESP_STATE,
+#endif //_FFD_
+ MACHWI_DISASSOCIATE_REQ_ID = MACHWI_DISASSOCIATE_REQ_STATE,
+ MACHWI_RX_ENABLE_REQ_ID = MACHWI_RX_ENABLE_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_ORPHAN_RESP_ID = MACHWI_ORPHAN_RESP_STATE,
+#endif //_FFD_
+ MACHWI_POLL_REQ_ID = MACHWI_POLL_REQ_STATE,
+ MACHWI_DATA_REQ_ID = MACHWI_DATA_REQ_STATE,
+#ifdef _FFD_
+ MACHWI_PURGE_REQ_ID = MACHWI_PURGE_REQ_STATE,
+#endif //_FFD_
+ MACHWI_TRANSACTION_TX_REQ_ID = MACHWI_TRANSACTION_TX_STATE,
+ MACHWI_BEACON_TX_REQ_ID = MACHWI_BEACON_TX_STATE,
+} MachwiRequestId_t;
+
+/******************************************************************************
+ Types of possible postponed MAC_HWI actions.
+******************************************************************************/
+typedef enum
+{
+ MAC_HWI_POSTPONED_ACTION_TRANSACTION_TX = (1 << 0),
+ MAC_HWI_POSTPONED_ACTION_BEACON_TX = (1 << 1),
+} MachwiPostponedAction_t;
+
+/******************************************************************************
+ Prototypes section.
+******************************************************************************/
+/******************************************************************************
+ Main system entry point.
+ Parameters:
+ none.
+ returns:
+ none.
+******************************************************************************/
+void MAC_HWI_TaskHandler(void);
+
+/******************************************************************************
+ Sends confirmation to the upper layer.
+ Parameters:
+ request - parameters of the request to be confirmed.
+ Returns:
+ none.
+******************************************************************************/
+void machwiSendConfToUpperLayer(void *request);
+
+#ifdef _FFD_
+/******************************************************************************
+ Sends MAC_AssociteInd to the upper layer.
+ Parameters:
+ associateInd - associate indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendAssociateInd(MAC_AssociateInd_t *associateInd);
+#endif //_FFD_
+
+/******************************************************************************
+ Sends MAC_DataInd to the upper layer.
+ Parameters:
+ dataInd - data indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendDataInd(MAC_DataInd_t *dataInd);
+
+/******************************************************************************
+ Sends MAC_DisassociteInd to the upper layer.
+ Parameters:
+ disassociateInd - disassociate indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendDisassociateInd(MAC_DisassociateInd_t *disassociateInd);
+
+/******************************************************************************
+ Sends MAC_BeaconNotifyInd to the upper layer.
+ Parameters:
+ beaconInd - beacon notify indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendBeaconNotifyInd(MAC_BeaconNotifyInd_t *beaconInd);
+
+/******************************************************************************
+ Sends MAC_SyncLossInd to the upper layer.
+ Parameters:
+ lossInd - sync loss notify indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendSyncLossNotifyInd(MAC_SyncLossInd_t *syncLoss);
+
+#ifdef _FFD_
+/******************************************************************************
+ Sends MAC_OrphanInd to the upper layer.
+ Parameters:
+ orphanInd - orphan indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendOrphanInd(MAC_OrphanInd_t *orphanInd);
+
+/******************************************************************************
+ Sends MAC_PollInd to the upper layer.
+ Parameters:
+ pollInd - poll indication descriptor.
+ Returnes:
+ none.
+******************************************************************************/
+void machwiSendPollInd(MAC_PollInd_t *pollInd);
+
+/******************************************************************************
+ \brief initiates transaction transmission if MAC is in IDLE state. If state
+ is not IDLE - postpones operation.
+******************************************************************************/
+void machwiTxTransactionReq(void);
+
+/******************************************************************************
+ \brief initiates beacon transmission if MAC is in IDLE state. If state
+ is not IDLE - postpones operation.
+******************************************************************************/
+void machwiTxBeaconReq(void);
+
+/**************************************************************************//**
+ \brief Checks if there are any active transactions on MAC layer.
+
+ \return true, if there are any active transactions on MAC layer,
+ false - otherwise
+ ******************************************************************************/
+bool MAC_IsActiveTransaction(void);
+
+#endif //_FFD_
+
+#endif //_MACHWIMANAGER_H
+
+// eof machwiManager.h