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

📄 config.h

📁 周立功的magic2410开发板的DM9000网卡驱动程序
💻 H
字号:
/****************************************Copyright (c)****************************************************                               GuangZhou ZHIYUAN Electronics Co.,LTD.**                                      graduate school**                                 http://www.zyinside.com****--------------File Info-------------------------------------------------------------------------------** File Name: config.h** Last modified Date:  2004-09-17** Last Version: 1.0** Descriptions: User Configurable File****------------------------------------------------------------------------------------------------------** Created By: Chenmingji** Created date:   2004-09-17** Version: 1.0** Descriptions: First version****------------------------------------------------------------------------------------------------------** Modified by:		Yehaoben** Modified date:	205-12-20	** Version:		** Descriptions:	for DM9000E driver**********************************************************************************************************/#ifndef __CONFIG_H#define __CONFIG_H//This segment should not be modified#ifndef TRUE#define TRUE  1#endif#ifndef FALSE#define FALSE 0#endif#ifndef __KERNEL__    #define __KERNEL__#endif#ifndef MODULE    #define MODULE#endif#include <linux/config.h>#include <linux/module.h>#include <linux/kernel.h>       /* printk() *///#include <linux/malloc.h>       /* kmalloc() */#include <linux/slab.h>         /* kmalloc() */#include <linux/fs.h>           /* everything... */#include <linux/errno.h>        /* error codes */#include <linux/proc_fs.h>#include <linux/fcntl.h>        /* O_ACCMODE */#include <asm/system.h>         /* cli(), *_flags */#include <linux/init.h>#include <asm/uaccess.h>#include <linux/netdevice.h>   /* struct device, and other headers */#include <linux/etherdevice.h> /* eth_type_trans *///#include <linux/in.h>//#include <linux/ip.h>          /* struct iphdr *///#include <linux/tcp.h>         /* struct tcphdr */typedef u8      uint8;          /* defined for unsigned 8-bits integer variable 	 无符号8位整型变量  */typedef s8      int8;           /* defined for signed 8-bits integer variable		 有符号8位整型变量  */typedef u16     uint16;         /* defined for unsigned 16-bits integer variable 	 无符号16位整型变量 */typedef s16     int16;          /* defined for signed 16-bits integer variable 		 有符号16位整型变量 */typedef u32     uint32;         /* defined for unsigned 32-bits integer variable 	 无符号32位整型变量 */typedef s32     int32;          /* defined for signed 32-bits integer variable 		 有符号32位整型变量 */typedef float   fp32;           /* single precision floating point variable (32bits) 单精度浮点数(32位长度) */typedef double  fp64;           /* double precision floating point variable (64bits) 双精度浮点数(64位长度) *//********************************//*Application Program Configurations*//*     应用程序配置             *//********************************///This segment could be modified as needed.//以下根据需要改动#include <asm/arch/irqs.h>#include <linux/ioport.h>#include <linux/delay.h>//#include <asm/arch/hardware.h>//#include <asm/irqs.h>#include <asm/hardware.h>#include <asm/io.h>#include <asm/irq.h>#define IOaddress0	vCS8900_BASE//0x18000000#define NET_IRQ         IRQ_EINT0//IRQ_EINT0#define NET_TIMEOUT     10000       /* In jiffies */#define NET_RST0   	(1<<2)//0X00000100//0X00000400#define	Hardware_Initial0()	GPGCON = (GPGCON & (~(3<<4))) | (1<<4)#define	Hardware_Reset_Clr0()	GPGDAT &= (~NET_RST0)#define	Hardware_Reset_Set0()	GPGDAT |= NET_RST0#define	BUS_DELAY		200#ifdef IN_DM9000char MyMacID[] = {0x52, 0x54, 0x4c, 0x38, 0xf7, 0x42, 0x00};static u32 PinG2Save;//static u32 PinG2Save;        inline void mac_hard_open(void){    u32 temp;		    temp = GPGCON;    PinG2Save = temp & (0x03 << 4);//SAVE RESET PIN STATUS    temp &= (~(0x03 << 4));    temp |= (0x01 << 4);//SET RESET    GPGCON = temp;//SET REG    temp = GPGDAT;//CLR RESET PIN     temp &= (~NET_RST0);    GPGDAT = temp;}        inline void mac_hard_close(void){    u32 temp;    temp = GPGCON;    temp &= ~(3 << 4);    temp |= PinG2Save;    GPGCON = temp;}#endif#endif/***********************************************************************************************************                            End Of File********************************************************************************************************/

⌨️ 快捷键说明

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