www.pudn.com > MPC8241BSP.rar > BspCpusApi.h


/********************************************************************* 
* 版权所有 (C)2001, 深圳市中兴通讯股份有限公司。 
*  
* 文件名称: BspCpusApi.h 
* 文件标识:  
* 内容摘要: 子卡提供对外提供函数的头文件 
* 其它说明:  
* 当前版本: V1.0 
* 作    者: 邹同亮 
* 完成日期: 2003年04月25日 
*  
* 修改记录1: 
*    修改日期: 
*    版 本 号: 
*    修 改 人: 
*    修改内容:  
* 修改记录2:… 
**********************************************************************/ 
 
#ifndef _BSPCPUAPI_H_ 
#define _BSPCPUAPI_H_ 
/* 
#include "../../Common/BspPublic.h" 
*/ 
 
#include "rtl8139Config.h" 
 
/************************************************************************** 
                               指示灯宏定义 
***************************************************************************/ 
#define  ENABLE_S_RUN_LED                           \ 
         {                                             \ 
			(* (unsigned char *)XPBCON_EPLD_REG6) |= (1<<(7-4));\ 
			(* (unsigned char *)XPBCON_EPLD_REG5) |= (1<<(7-4));\ 
			(* (unsigned char *)XPBCON_EPLD_REG7) &= (~(1<<(7-4)));\ 
		 } 
		  
#define  DISABLE_S_RUN_LED                             \ 
        {                                                 \ 
        	(* (unsigned char *)XPBCON_EPLD_REG6) |= (1<<(7-4));\ 
			(* (unsigned char *)XPBCON_EPLD_REG5) |= (1<<(7-4));\ 
			(* (unsigned char *)XPBCON_EPLD_REG7) |= (1<<(7-4));\ 
			(* (unsigned char *)XPBCON_EPLD_REG6) &= (~(1<<(7-4))); \ 
			(* (unsigned char *)XPBCON_EPLD_REG5) &= (~(1<<(7-4))); \ 
	    }    
#define ENABLE_S_ALARM_LED                           \ 
        {                                              \ 
			(* (unsigned char *)XPBCON_EPLD_REG6) |= (1<<(7-6));\ 
			(* (unsigned char *)XPBCON_EPLD_REG5) |= (1<<(7-6));\ 
			(* (unsigned char *)XPBCON_EPLD_REG7) &= (~(1<<(7-6)));\ 
		} 
		 
#define DISABLE_S_ALARM_LED                          \ 
        {                                                 \ 
        	(* (unsigned char *)XPBCON_EPLD_REG6) |= (1<<(7-6));\ 
			(* (unsigned char *)XPBCON_EPLD_REG5) |= (1<<(7-6));\ 
			(* (unsigned char *)XPBCON_EPLD_REG7) |= (1<<(7-6));\ 
			(* (unsigned char *)XPBCON_EPLD_REG6) &= (~(1<<(7-6))); \ 
			(* (unsigned char *)XPBCON_EPLD_REG5) &= (~(1<<(7-6))); \ 
	    }    
 
/************************************************************************** 
                               全局结构定义 
***************************************************************************/ 
typedef struct net_add 
{ 
int *DevNum; /* 网口设备号的数组 */ 
int *IntNum; /* 网口中断号的数组 */ 
int *IntPri; /* 网口中断优先级的数组 */ 
int unit;    /* 网口的个数 */ 
}NET_ADD; 
 
/************************************************************************** 
                               函数原型申明 
***************************************************************************/ 
 
extern void  NetIntAdd(NET_ADD * pNetAdded); /* 加网口中断 */ 
extern unsigned long LedRun(unsigned long ledName, unsigned long operation); /* 点灯 */ 
extern unsigned long GetCom2Clk(void); 
 
#endif