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

📄 chi.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:  chi.h
// Header file for platform specific SDIO WLAN functions
//------------------------------------------------------------------------------
#ifndef LINUX
#pragma once
#endif

#ifndef CHI_H

#if defined (__cplusplus)
extern "C"
{
#endif

/***************************************************************************/
/***                    Host Interface Comms Structures                  ***/
/***************************************************************************/

//eri.	7/19/04
#if defined(COMMASIC_CFG_CF) || defined(COMMASIC_CFG_SDIO)

#define CHI_ADDR_N                      (0x2000)
#define CHI_ADDR_CHI_AREA_PTR           (0x2004)
#define CHI_ADDR_MAGIC                  (0x2008)

#define CHI_ADDR_REQ_RES_HEAD(x, n)     (0x2020)
#define CHI_ADDR_REQ_RES_TAIL(x, n)     (0x2022)
#define CHI_ADDR_CFM_IND_HEAD(x, n)     (0x2400)
#define CHI_ADDR_CFM_IND_TAIL(x, n)     (0x2402)
#define CHI_ADDR_REQ_RES_Q(x, n)        (0x2024)
#define CHI_ADDR_CFM_IND_Q(x, n)        (0x2404)

#else

#define CHI_ADDR_N                      (0)
#define CHI_ADDR_CHI_AREA_PTR           (4)
#define CHI_ADDR_MAGIC                  (8)

#define CHI_ADDR_REQ_RES_HEAD(x, n)     ((x) + 0)
#define CHI_ADDR_REQ_RES_TAIL(x, n)     ((x) + 4)
#define CHI_ADDR_CFM_IND_HEAD(x, n)     ((x) + 8)
#define CHI_ADDR_CFM_IND_TAIL(x, n)     ((x) + 12)
#define CHI_ADDR_REQ_RES_Q(x, n)        ((x) + 16)
#define CHI_ADDR_CFM_IND_Q(x, n)        ((x) + 16 + 4 * ((n) + 1))

#endif	// CF_HI


/***************************************************************************/
/***                       Bootloader Comms Structure                    ***/
/***************************************************************************/

/* Magic number used by the bootloader to indicate that it has initialised */
/* the bootloader code transfer structure. */
#define CHI_BOOT_MAGIC                  (0x43215678)

/* Address where Boot code will be loaded. */
#define CHI_ADDR_BOOTLOADER             (0)

#define CHI_UPPER_CPU                   (0)
#define CHI_LOWER_CPU                   (1)

#ifdef CA_UWA_DOWNLOAD
#define CHI_UWA_CPU                     (2)
#define CHI_NUM_CPUS                    (3)
#else  // CA_UWA_DOWNLOAD
#define CHI_NUM_CPUS                    (2)
#endif //CA_UWA_DOWNLOAD

/* Transfer control codes. */
/* #define CHI_BOOT_IDLE                   (0) not used by PC end */
#define CHI_BOOT_READY                  (1)
#define CHI_BOOT_DATA                   (2)
/* #define  CHI_BOOT_READING                (3) not used by PC end */
#define CHI_BOOT_END                    (4)
#define CHI_BOOT_WAITING                (5)
#define CHI_BOOT_GO                     (6)
#define CHI_BOOT_STORE                  (7)
/* #define CHI_BOOT_STORING                (8) not used by PC end */

//eri.	7/19/04
#if defined(COMMASIC_CFG_CF) || defined(COMMASIC_CFG_SDIO)
#define CHI_ADDR_XFER_CTRL_BASE         (0x2000)
#else
#define CHI_ADDR_XFER_CTRL_BASE         (0x100)
#endif
#define CHI_ADDR_BOOT_MAGIC             (CHI_ADDR_XFER_CTRL_BASE + 0)
#define CHI_ADDR_BOOT_NUM               (CHI_ADDR_XFER_CTRL_BASE + 4)
#define CHI_ADDR_XFER_VECTOR            (CHI_ADDR_XFER_CTRL_BASE + 8)
#define CHI_ADDR_XFER_MAX               (CHI_ADDR_XFER_CTRL_BASE + 12)
#define CHI_ADDR_XFER_LEN               (CHI_ADDR_XFER_CTRL_BASE + 16)
#define CHI_ADDR_XFER_CTRL(x)           (CHI_ADDR_XFER_CTRL_BASE + 20 + ((x) * 4))


//eri.	7/21/04
#ifdef	CF_HI
// DAT message buffer base and size
#define	CHI_DAT_MSG_BUF_BASE			(0x1000)
#define	CHI_DAT_MSG_BUF_SIZE			(0x0100)

// DAT buffer and Mailbox base
#define	CHI_DAT_BUFFER_BASE				(0)
#define CHI_MAILBOX_BASE				(0x2000)

// Bit mask for interrupt status
#define CHI_MASK_MSG(x)					(((x) >> 1) & 0x01)
#define CHI_MASK_RX_BUF(x)				(((x) >> 2) & 0x0F)
#define CHI_MASK_TX_BUF(x)				(((x) >> 6) & 0x03)
#endif


#if defined (__cplusplus)
}
#endif

#define CHI_H
#endif // ifndef CHI_H

/* End of file chi.h. */

⌨️ 快捷键说明

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