[an error occurred while processing this directive]
|
// byte_read - глобальная переменная - в нее записывается результат
// функции чтения из RTL - read_rtl(reg)
// так уж было в оригинале...void test_nic() //Look for a packet in the receive buffer ring
{
//start the NIC
write_rtl(CR,0x22);
//read the interrupt status register
read_rtl(ISR);
if(byte_read & OVW) reset_overflow();//if the receive buffer holds a good packet
if(byte_read & PRX)
get_packet();read_rtl(BNRY);
data_L = byte_read;
write_rtl(CR,0x62);
read_rtl(CURR);
data_H = byte_read;
write_rtl(CR,0x22);
//buffer is not empty.. get next packet
if(data_L != data_H)
get_packet();//reset the interrupt bits
write_rtl(ISR,0xFF);
}