91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 30KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發(fā)布日期: 2021-06-08
  • 語言: 其他
  • 標簽: nios??ii??

資源簡介

nios ii下Internet 接口LAN91C111驅動

資源截圖

代碼片段和文件信息

/*
?*?FILENAME:?smsc91x.c
?*
?*?Copyright??2002?By?InterNiche?Technologies?Inc.?All?rights?reserved
?*
?*
?*??This?file?contains?the?portable?portions?fo?the?Interniche?SMSC91c111
?*?ethernet?chip?family?driver.
?*?
?*
?*?MODULE:?smsc91x
?*
?*?ROUTINES:?prep_s91()?s91_init()?s91_close()
?*?ROUTINES:?s91_pkt_send()?s91_low_send()?s91_stats()?s91_rcv()?
?*?ROUTINES:?s91_isr()?s91_reset()?s91_enable()
?*
?*?PORTABLE:?no
?*/

#ifdef?ALT_INICHE

#include?“ipport.h“
#include?“in_utils.h“
#include?“netbuf.h“
#include?“net.h“
#include?“q.h“
#include?“ether.h“
#include?“altera_avalon_lan91c111_regs.h“
#include?“smsc91x.h“
#include?“unistd.h“

/*?#define?STATIC_TX???1?*/

int?SMSC_UP?=?FALSE;

struct?smsc_parms?smsc91s[S91_DEVICES];


#ifdef?ALT_INICHE

#include?
#include?“alt_iniche_dev.h“

error_t?alt_avalon_lan91c111_init(
????alt_iniche_dev??????????????*p_dev)
{
????extern?int?prep_s91(int?index);

????prep_s91(p_dev->if_num);

????return?(0);
}

#endif?/*?ALT_INICHE?*/


/*?FUNCTION:?prep_s91()
?*?
?*?PARAM1:?int?index
?*
?*?RETURNS:?
?*/

int
prep_s91(int?index)
{
???int??????i;
???unshort??bank;
???SMSC??smsc;
???NET?ifp;

???for?(i?=?0;?i????{
??????smsc?=?&smsc91s[i];??/*?get?pointer?to?device?structure?*/

??????/*?Call?the?per-port?hardware?setup.?Speed?settings?should?be
???????*?set?in?smsc->req_speed?by?the?application?prior?to?starting
???????*?the?driver?else?it?will?default?to?autoneg.
???????*/
??????s91_port_prep(i);????/*?set?up?device?parameters?(IObase?etc)?*/

??????/*?make?sure?SMSC?chip?appears?at?IO?base.?The?bank?select?register?always
???????*?has?a?“0x33“?in?it‘s?high?byte?so?we?use?this?as?a?rough?test.
???????*/
??????bank?=?IORD_ALTERA_AVALON_LAN91C111_BSR(smsc->regbase);
??????if?(?(bank?&?0xff00)?!=?0x3300?)
??????{
?????????dtrap();??????/*?programing?or?hardware?setup?error??*/
?????????continue;
??????}

??????ifp?=?nets[index];
??????ifp->n_mib->ifAdminStatus?=?2;???/*?status?=?down?*/
??????ifp->n_mib->ifOperStatus?=?2;????/*?will?be?set?up?in?init()??*/
??????ifp->n_mib->ifLastChange?=?cticks?*?(100/TPS);
??????ifp->n_mib->ifPhysAddress?=?(u_char*)smsc->mac_addr;
??????ifp->n_mib->ifDescr?=?(u_char*)“SMSC?9100?series?ethernet“;
??????ifp->n_lnh?=?ETHHDR_SIZE;????????/*?ethernet?header?size?*/
??????ifp->n_hal?=?6;??????????????????/*?hardware?address?length?*/
??????ifp->n_mib->ifType?=?ETHERNET;???/*?device?type?*/
??????ifp->n_mtu?=?MTU;????????????????/*?max?frame?size?*/
??????/*?install?our?hardware?driver?routines?*/
??????ifp->n_init?=?s91_init;
??????ifp->pkt_send?=?s91_pkt_send;
??????ifp->n_close?=?s91_close;
??????ifp->n_stats?=?s91_stats;

#ifdef?IP_V6
??????ifp->n_flags?|=?(NF_NBPROT?|?NF_IPV6);
#else
??????ifp->n_flags?|=?NF_NBPROT;
#endif

??????nets[index]->n_mib->ifPhysAddress?=?(u_char*)smsc->mac_addr;???/*?ptr?to?MAC?address?*/

??????/*?set?cr

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

????.......??????1782??2009-10-22?07:42??altera_avalon_lan91c111\altera_avalon_lan91c111_hal_sw.tcl

????.......??????1831??2009-10-22?07:42??altera_avalon_lan91c111\altera_avalon_lan91c111_ucosii_sw.tcl

????.......?????10423??2009-10-22?07:42??altera_avalon_lan91c111\class.ptf

????.......??????3380??2009-10-22?07:42??altera_avalon_lan91c111\HAL\inc\altera_avalon_lan91c111.h

????.......?????35807??2009-10-22?07:42??altera_avalon_lan91c111\inc\altera_avalon_lan91c111_regs.h

????.......??????3367??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\inc\altera_avalon_lan91c111.h

????.......??????4397??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\inc\iniche\altera_avalon_lan91c111_iniche.h

????.......??????1322??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\inc\iniche\s91_port.h

????.......??????9167??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\inc\iniche\smsc91x.h

????.......??????3104??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\src\component.mk

????.......?????18558??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\src\iniche\smsc91x.c

????.......?????14514??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\src\iniche\smsc_mem.c

????.......?????14155??2009-10-22?07:42??altera_avalon_lan91c111\UCOSII\src\iniche\smsc_phy.c

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\UCOSII\inc\iniche

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\UCOSII\src\iniche

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\HAL\inc

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\UCOSII\inc

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\UCOSII\src

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\HAL

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\inc

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111\UCOSII

?????目錄??????????0??2010-05-24?21:20??altera_avalon_lan91c111

-----------?---------??----------?-----??----

???????????????121807????????????????????22


評論

共有 條評論