No.28420 作者:long22885528 邮件:long22885528@163.net ID:11001 登陆:73次 文章数:97篇 最后登陆IP:221.6.29.75 最后登陆:2007/4/4 9:24:23 注册:2003/4/8 21:55:48 财富:495 发帖时间:2003/5/4 9:41:23 发贴者IP:211.161.79.187 标题:long22885528:帮忙看看程序:关于以太网通讯的(8019) 摘要:No.28420帮忙看看程序:关于以太网通讯的(8019) 小弟在看下面的程序时有一些疑惑,希望大家给予指导,谢谢!~~ Q1)就是"if(len <60)len=60;"中的LEN的值是那来的??是从TCP/IP包那得到的么?? Q2)就是"if (txd_buffer_select) reg09=0x40 ; //txdwrite highaddress else reg09=0x46 ; //txdwrite highaddress reg08=0x00 ; //read page address low" 中的IF.....ELSE的关系;为什么会用到他呢?? if (txd_buffer_select)又是什么意思呢?? Q3)就是"for (ii=4;ii <len+4;ii++) " 中的LEN又为什么要加4,并且发送起始页也要加4呢?? 有空的话能将这段程序的每一条的功能解释一下么??谢谢!~~~~~ void send_frame(UCHAR xdata * outbuf, UINT len)/*发送一个数据包的命令,长度最小为60字节,最大1514字节*/ { UCHAR i; UINT ii; page(0); if(len <60)len=60; txd_buffer_select=!txd_buffer_select; if (txd_buffer_select) reg09=0x40 ; //txdwrite highaddress else reg09=0x46 ; //txdwrite highaddress reg08=0x00; //read page address low reg0b=len> > 8; //read count high reg0a=le ......
>>返回讨论的主题
|