summaryrefslogtreecommitdiff
path: root/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macAffix.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/include/macAffix.h
parent2ba279f4eb2f23fa08a7c13465d16ae6ba5d0f96 (diff)
digital/beacon: add bitcloud stack into common directory digital/zigbit
Diffstat (limited to 'digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macAffix.h')
-rw-r--r--digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macAffix.h48
1 files changed, 48 insertions, 0 deletions
diff --git a/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macAffix.h b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macAffix.h
new file mode 100644
index 00000000..3f5427ff
--- /dev/null
+++ b/digital/zigbit/bitcloud/stack/Components/MAC_PHY/include/macAffix.h
@@ -0,0 +1,48 @@
+/**************************************************************************//**
+ \file macAffix.h
+
+ \brief MAC frames' header and footer size constants.
+
+ \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/06/07 ALuzhetsky - Created.
+******************************************************************************/
+
+#ifndef _MACAFFIX_H
+#define _MACAFFIX_H
+
+/******************************************************************************
+ Includes section
+******************************************************************************/
+#include <macphyPib.h>
+
+/******************************************************************************
+ Defines section
+******************************************************************************/
+//! aMaxMACPayloadSize (IEEE 802.15.4-2006 Table 85).
+#define MAC_MAX_MSDU_SIZE (PHY_MAX_PACKET_SIZE - MAC_MAX_MPDU_UNSECURED_OVERHEAD)
+//! aMaxBeaconOverhead (IEEE 802.15.4-2006 Table 85).
+#define MAC_MAX_BEACON_HEADER_LENGTH MAC_MAX_BEACON_OVERHEAD
+//! aMaxMPDUUnsecuredOverhead (IEEE 802.15.4-2006 Table 85).
+#define MAC_MAX_DATA_FRAME_HEADER_LENGTH MAC_MAX_MPDU_UNSECURED_OVERHEAD
+/**
+ * \brief MAC footer length in common frame buffer.
+ * It has zero length becouse FCS is calculated by RF chip. MAC does't has to
+ * reserve bytes to allocate it's footer.
+ */
+#define MAC_MAX_DATA_FRAME_FOOTER_LENGTH 0U
+//! Offset in common frame buffer for allocating MPDU.
+#define MAC_MSDU_OFFSET MAC_MAX_MPDU_UNSECURED_OVERHEAD
+//! MAC affix.
+#define MAC_AFFIX_LENGTH (MAC_MAX_MPDU_UNSECURED_OVERHEAD + MAC_MAX_DATA_FRAME_FOOTER_LENGTH)
+
+#endif /* _MACAFFIX_H */
+
+// eof macAffix.h