⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 msgid.h

📁 mx27 f14v2 源代码。包括ADS板上诸多驱动的源码。
💻 H
字号:
//---------------------------------------------------------------------------
//Copyright (C) 2006, Freescale Semiconductor, Inc. All Rights Reserved.
// THIS SOURCE CODE, AND ITS USE AND DISTRIBUTION, IS SUBJECT TO THE TERMS
// AND CONDITIONS OF THE APPLICABLE LICENSE AGREEMENT 
//--------------------------------------------------------------------------
//
// File:  msgid.h
// Header file for platform specific SDIO WLAN functions
//------------------------------------------------------------------------------

#ifndef _MSGID_H
#define _MSGID_H

#include "wb_types.h"



/***************************************************************************/
/***                         Types and Defines                           ***/
/***************************************************************************/

/*
 * Message IDs in the system will be structured as follows:
 *
 * Bit 13..12   Indicates whether the message is a Request, Confirm,
 *              Indication or Response.
 *
 * Bit 11..8    Component that message belongs to e.g.
 *              MSG_UMI_COMP, MSG_LMI_COMP, MSG_UPPER_MAC_COMP
 *
 * Bit 7..0     Message number, unique to all messages in a component.
 *
 */
#define MSG_DIR_OFFSET                  (12)
#define MSG_DIR_MASK                    (0x3 << MSG_DIR_OFFSET)
#define MSG_GET_DIR(x)                  (((x) >> MSG_DIR_OFFSET) & 3)
#define MSG_REQ                         (0)
#define MSG_CFM                         (1)
#define MSG_IND                         (3)
#define MSG_RES                         (2)
#define MSG_DIR_NUM   					(4)

#define MSG_MAKE_REPLY(x)               ((x) ^= (1 << 12))

#define MSG_COMP_OFFSET                 (8)
#define MSG_COMP_MASK                   (0xF << MSG_COMP_OFFSET)
#define MSG_GET_COMP(x)                 ((x) & MSG_COMP_MASK)
#define MSG_UMI_COMP                    (0x0 << MSG_COMP_OFFSET)
#define MSG_LMI_COMP                    (0x1 << MSG_COMP_OFFSET)
#define MSG_UPPER_MAC_COMP              (0x2 << MSG_COMP_OFFSET)
#define MSG_MAC_CLIENT_COMP             (0x3 << MSG_COMP_OFFSET)
#define MSG_TEST_COMP                   (0xF << MSG_COMP_OFFSET)


#define MSG_TYPE_OFFSET                 (6)
#define MSG_GET_TYPE(x)                 (((x) >> MSG_TYPE_OFFSET) & 3)
#define MSG_TYPE_MASK                   (3 << MSG_TYPE_OFFSET)
#define MSG_MAN                         (0)
#define MSG_DAT                         (1)
#define MSG_MEM                         (2)
#define MSG_DBG                         (3)
#define MSG_TYPES_NUM                   (4)

#define MSG_DRIVER_COMP					(0x8 << MSG_COMP_OFFSET)
#define MSG_TEST_COMP             		(0xF << MSG_COMP_OFFSET)

#define MSG_NUM_MASK                    (0x3F)
#define MSG_GET_NUM(x)                  ((x) & MSG_NUM_MASK)



#endif /* !_MSGID_H */

⌨️ 快捷键说明

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