mac_rx_pool.h

来自「ucos在NEC平台下的移植」· C头文件 代码 · 共 115 行

H
115
字号
/*******************************************************************************************************
 *                                                                                                     *
 *        **********                                                                                   *
 *       ************                                                                                  *
 *      ***        ***                                                                                 *
 *      ***   +++   ***                                                                                *
 *      ***   + +   ***                                                                                *
 *      ***   +                         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: NEC Electronics PM plus V5.20                                                             *
 * Target platform: CC2420DB, CC2420 + 78K0/KF2                                                        *
 *******************************************************************************************************
 * 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;
    BOOL 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.5  2004/08/13 13:04:43  jol
 * CC2420 MAC Release v0.7
 *
 *
 *******************************************************************************************************/

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?