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

📄 nbuf.h

📁 COLDFIRE 5275板极初始化程序
💻 H
字号:
/*
 * File:		nbuf.h
 * Purpose:		Definitions for Network Buffer Allocation.
 *
 * Notes:		These routines implement a static buffer scheme.
 *				The buffer descriptors are as specified by the 
 *				MPC860T/MCF5275 FEC.
 *
 */

#ifndef _NBUF_H
#define _NBUF_H

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

#define Rx	1
#define Tx	0

/* Buffer sizes in bytes (must be divisible by 16) */
#define RX_BUFFER_SIZE 576
#define TX_BUFFER_SIZE 576

/* Number of Receive and Transmit Buffers and Buffer Descriptors */
#define NUM_RXBDS 3
#define NUM_TXBDS 3

/* Buffer Descriptor Format */
typedef struct
{
	uint16 status;	/* control and status */
	uint16 length;	/* transfer length */
	uint8  *data;	/* buffer address */
} NBUF;

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

/*
 * Bit level Buffer Descriptor definitions
 */

#define TX_BD_R			0x8000
#define TX_BD_INUSE		0x4000
#define TX_BD_TO1		0x4000
#define TX_BD_W			0x2000
#define TX_BD_TO2		0x1000
#define TX_BD_L			0x0800
#define TX_BD_TC		0x0400
#define TX_BD_ABC		0x0200
//#define TX_BD_HB		0x0100
//#define TX_BD_LC		0x0080
//#define TX_BD_RL		0x0040
//#define TX_BD_UN		0x0002
//#define TX_BD_CSL		0x0001

#define RX_BD_E			0x8000
#define RX_BD_INUSE		0x4000
#define RX_BD_R01		0x4000
#define RX_BD_W			0x2000
#define RX_BD_R02		0x1000
#define RX_BD_L			0x0800
#define RX_BD_M			0x0100
#define RX_BD_BC		0x0080
#define RX_BD_MC		0x0040
#define RX_BD_LG		0x0020
#define RX_BD_NO		0x0010
//#define RX_BD_SH		0x0008
#define RX_BD_CR		0x0004
#define RX_BD_OV		0x0002
#define RX_BD_TR		0x0001

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

#endif 	/* _NBUF_H */

⌨️ 快捷键说明

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