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

📄 nccommon.h

📁 CE下 NET2778 NDIS Drivers, 在每个平台上都可以使用
💻 H
字号:
/******************************************************************************

Copyright (C) 2003, 2004, NetChip Technology, Inc. (http://www.netchip.com)

THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND, 
EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE IMPLIED 
WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A PARTICULAR PURPOSE.

NCCOMMON.H

A collection of common NetChip include files.

******************************************************************************/

///////////////////////////////////////////////////////////////////////////////
#ifndef NCCOMMON_H
#define NCCOMMON_H

///////////////////////////////////////////////////////////////////////////////
// Standard system headers
#include <stdio.h>

///////////////////////////////////////////////////////////////////////////////
// NET2272 chip access option: direct or call interface
//  - Memory mapped: Fast and efficient - every chip access uses in-line 
//    'memory direct' coding
//  - Call interface: Slow (since every chip access results in a function call) 
//    but the call interface can be *extremely* helpful during early development
//    and debug.
// In either case, NCHAL is designed to be easily ported to your new hardware platform.
// The following macro determines which access method will be used...
#define NET2272_DIRECT_ACCESS TRUE  // TRUE: Use direct access (otherwise use function calls)

///////////////////////////////////////////////////////////////////////////////
// NET2272 data width access option: 8 or 16 bit
//  - EP_DATA can be configured for 16 bit access (See Data Width in LOCCTL)
//  - Non-EP_DATA registers are always 8 bit registers (see exception for REGDATA below)
//  - REGADDRPTR/REGDATA note: When Data Width is set, REGDATA is a 16 bit 
//    register for indirect accesses (via REGADDRPTR/REGDATA) to EP_DATA.
//  - PCI-RDK note: Features on the PCI-RDK and NET2272 daughterboard are applied to remap 
//    the NET2272 as a 16 bit device. The NET2272 address bits are shifted one bit (CPU A1 maps 
//    to NET2272 A0, ...). In this configuration, registers are visible at double the address 
//    given in the NET2272 chip spec. For example EP_DATA is visible at offset 0x0a instead 
//    of 0x05; further, if Data Width is set, accesses to EP_DATA are 16 bit. Other registers 
//    are always 8 bit.
//  - Split DMA can only be used when Data Width is configured in 8 bit mode!
#define NET2272_16BIT TRUE // TRUE: Use 16 bit access to NET2272 (otherwise 8 bit)

///////////////////////////////////////////////////////////////////////////////
// NetChip header files
///////////////////////////////////////////////////////////////////////////////

#include <NcTypes.h>        // NetChip's basic types
#include <UsbStd.h>         // NetChip's reference to USB standards defined by the USB-IF
#include <NcFwApi.h>        // NetChip's firmware application interface (API)
#include <System.h>         // NetChip's system functions (malloc, interrupt, DMA)
#include <NcDebug.h>        // NetChip's debugging support

///////////////////////////////////////////////////////////////////////////////
#endif // NCCOMMON_H

///////////////////////////////////////////////////////////////////////////////
//  End of file
///////////////////////////////////////////////////////////////////////////////

⌨️ 快捷键说明

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