📄 mac_rx_pool.h
字号:
/*******************************************************************************************************
* *
* ********** *
* ************ *
* *** *** *
* *** +++ *** *
* *** + + *** *
* *** + CHIPCON CC2420 INTEGRATED 802.15.4 MAC AND PHY *
* *** + + *** RX Packet Pool *
* *** +++ *** *
* *** *** *
* ************ *
* ********** *
* *
*******************************************************************************************************
* CONFIDENTIAL *
* The use of this file is restricted by the signed MAC software license agreement. *
* *
* Copyright Chipcon AS, 2004 *
*******************************************************************************************************
* This module contains the RX packet pool, which manages a table of MAC_RX_PACKET structures to be *
* used with the RX engine. *
*******************************************************************************************************
* Compiler: AVR-GCC *
* Target platform: CC2420DB, CC2420 + any ATMEGA MCU *
*******************************************************************************************************
* The revision history is located at the bottom of this file *
*******************************************************************************************************/
#ifndef MAC_RX_POOL_H
#define MAC_RX_POOL_H
/*******************************************************************************************************
*******************************************************************************************************
************************** CONSTANTS AND MACROS **************************
*******************************************************************************************************
*******************************************************************************************************/
//-------------------------------------------------------------------------------------------------------
// The flags used in the MAC_RX_PACKET packet structured
// Set when the packet is reserved, and cleared when released
#define MRXP_FLAG_PACKET_OCCUPIED_BM 0x01
// Used by the RX engine to indicate that the packet was acknowledged with the pending bit set (used by
// the processing tasks)
#define MRXP_FLAG_SACKPEND_ISSUED_BM 0x02
// When a beacon is received with "RX on when idle" enabled, the processing task will be responsible for
// turning RX off
#define MRXP_FLAG_RX_NOT_TURNED_OFF_BM 0x04
//-------------------------------------------------------------------------------------------------------
/*******************************************************************************************************
*******************************************************************************************************
************************** MODULE DATA **************************
*******************************************************************************************************
*******************************************************************************************************/
//-------------------------------------------------------------------------------------------------------
// Internal module data
// DO NOT CHANGE THE ORDER INSIDE THIS STRUCTURE!!!
typedef struct {
BYTE flags;
ZBOOL sequenceNumber;
MAC_ENUM securityStatus;
UINT32 timeStamp;
MCPS_DATA_INDICATION mdi;
} MAC_RX_PACKET;
extern MAC_RX_PACKET pMrxPacketPool[MAC_OPT_RX_POOL_SIZE];
//-------------------------------------------------------------------------------------------------------
/*******************************************************************************************************
*******************************************************************************************************
************************** FUNCTION PROTOTYPES **************************
*******************************************************************************************************
*******************************************************************************************************/
//-------------------------------------------------------------------------------------------------------
// Initializes the packet pool
void mrxpInit(void);
// Reserve/release
MAC_RX_PACKET* mrxpReservePacket(void);
void mrxpReleasePacket(MAC_RX_PACKET* pPacket);
//-------------------------------------------------------------------------------------------------------
#endif
/*******************************************************************************************************
* Revision history:
*
* $Log: mac_rx_pool.h,v $
* Revision 1.6 2004/11/10 09:32:56 thl
* Fixed a number of bugs according to: MAC software check lists.xls
*
* Revision 1.5 2004/08/13 13:04:43 jol
* CC2420 MAC Release v0.7
*
*
*******************************************************************************************************/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -