No.4328 作者:tuoniao35 邮件:tuoniao35@sina.com.cn ID:4915 登陆:1次 文章数:199篇 最后登陆IP: 最后登陆:2001/11/16 9:53:00 注册:2001/11/16 9:53:00 财富:684 发帖时间:2002/1/4 9:36:00 发贴者IP:211.99.79.117 标题:tuoniao35:老古,看看我的程序 摘要:No.4328老古,看看我的程序 老古,看看我的程序,哪个地方不对指点一下,好么? #define uint unsigned int #define uchar unsigned char typedef union{ struct { uchar b0:1; uchar b1:1; uchar b2:1; uchar b3:1; uchar b4:1; uchar b5:1; uchar b6:1; uchar b7:1; }bit; uchar all; }reg_8019; #define reg *(char *)(0x30000H) //因为片选是cs0,与本人所用单片机有关 /************************************************************ remote dma write &transmit packet 数据包传送方向:单片机M16c-网卡8019-以太网 ************************************************************/ void driver send() { uchar cr; page(0); cr=*reg //commmand register if(cr==0x26h) //判断网上是否有数据包发送 queueit(); //若有,则先排队等待 else //若没有,则远程写 write_dma(0x4000,COUNT); //remote dma write *(reg+5)=count&0xff; *(reg+6)=count>>8;&nb ......
>>返回讨论的主题
|