[ZLG-ARM] 请教高手RTL8019AS驱动

[复制链接]
2330|0
 楼主| lw2008 发表于 2009-10-30 08:45 | 显示全部楼层 |阅读模式
为简洁没贴出全部,IMR_PTX、IMR_TXE是错误标志位。


// 轮询接收
void RTL8019_Poll(void)
{
       ........................
        // Check whether currently transmitting a packet.
        if(NIC & TXP)
        {
            // If neither a successful transmission nor a tx abort error
            // has occured, then flag current tx packet for resend.
            if(!((ISR & IMR_PTX) || (ISR & IMR_TXE)))  // 无错
            {
                retransmit = 1; // 重发
            }
        }
        ...............

        if(retransmit)  // 无错置位为何重发
        {
            // Retransmit packet in RTL8019AS local tx buffer.
            NIC = ABORT | TXP | START_CR;   
        }
        ...............
}
您需要登录后才可以回帖 登录 | 注册

本版积分规则

49

主题

296

帖子

0

粉丝
快速回复 在线客服 返回列表 返回顶部