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

📄 sysks8695end.c

📁 kedin bsp for vxWorks
💻 C
字号:
/* sysKS8695End.c - KS8695/P System Enhanced network interface support library *//* Copyright 1997-2002 Wind River Systems, Inc. *//* LIQUN RUAN * Created for KS8695/P SOHO Router driver */#include "copyright_wrs.h"/*modification history--------------------LIQUN RUAN (RLQ), 10/07/2003, first created for KS8695/P*//*DESCRIPTIONThis file contains the board-specific routines for Ethernet adapterinitialisation of Micrel KS8695/KS8695P SOHO router chip-based board.NOTEAt the time of writing, this module has only been tested with the followingEthernet cards:    KS8695P based board.    KS8695  based board is not verified yet.Refer to the BSP reference entry for any eventual limitations orproblems related to the BSP.SEE ALSO: ifLib,.I "Micrel Semiconductor KS8695/P SOHO Router Datasheet"*/#include "vxWorks.h"#include "config.h"#include "stdio.h"#ifdef INCLUDE_END/* defines */#define	END_LD_STR_SIZE	80/* END load strings */LOCAL char	ks8695LoadStr[KS8695_MAX_END_DEVS][END_LD_STR_SIZE];/* Index of devices */LOCAL int	ks8695EndDevice = 0;/* imports *//* End device table - defined in configNet.h */IMPORT END_TBL_ENTRY	endDevTbl[];/* KS8695 specific imports */IMPORT END_OBJ	*ks8695EndLoad(char *, void *);/*IMPORT END_OBJ	*ks8695EndLoad(char *);*//********************************************************************************* sysEndInit - prepare WAN/LAN (and EMAC if KS8695) driver for initialization** This routine initialize WAN/LAN (and EMAC if KS8695) driver.** RETURNS*	OK		if successful*	ERROR	otherwise*/STATUS sysEndInit(void){    unsigned int	i;		/* counter */	/*	 * Update the END device table & dynamically create the load	 * string we need for this device	 */	/*for (i = 0; i < KS8695_MAX_END_DEVS; i++) {*/	for (i = 0; i < 1; i++) {		sprintf(ks8695LoadStr[ks8695EndDevice],			/* sounds that unit number is prefixed automatically */#if 0			"%#x:%#x:%#x:%#x:%#x:%#x:%#x:%#x",			i,					/* unit */#endif			"%#x:%#x:%#x:%#x:%#x:%#x:%#x",			TXDESC_DEFAULT,		/* Tx descriptors */			RXDESC_DEFAULT,		/* Rx descriptors */			TXCHECKSUM_DEFAULT,	/* Tx checksum */			RXCHECKSUM_DEFAULT,	/* Rx checksum */			FLOWCONTROL_DEFAULT,/* flow control */			PBL_DEFAULT,		/* PBL */			TRUE);				/* Phy Power Reset */		endDevTbl[ks8695EndDevice].unit = i;		endDevTbl[ks8695EndDevice].endLoadFunc = ks8695EndLoad;		endDevTbl[ks8695EndDevice].endLoadString = ks8695LoadStr[ks8695EndDevice];		endDevTbl[ks8695EndDevice].endLoan = RXDESC_LOAN_NUM;		ks8695EndDevice++;	}    return OK;}/********************************************************************************* sysLanIntEnable - enable interrupts** This routine enables interrupts.  This may involve operations on* interrupt control hardware.** RETURNS: OK or ERROR for invalid arguments.*/STATUS sysLanIntEnable    (    int	level		/* level number */    )    {    return (intEnable(level));    }/********************************************************************************* sysLanIntDisable - disable interrupts** This routine disables interrupts.  This may involve operations on* interrupt control hardware.** RETURNS: OK or ERROR for invalid arguments.*/STATUS sysLanIntDisable    (    int	level		/* level number */    )    {    return (intDisable(level));    }#endif  /* INCLUDE_END */

⌨️ 快捷键说明

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