1
2
3
4
WRITE_CMD(sc, CMD_TXRESET);
DELAY(10); | 4 |
WRITE_CMD(sc, CMD_TXENA);
Calls the READ_TXS macro to read the transmit status from the transmit status register.
Examines the status for a jabber or an underrun error. If either of these errors happened, then the transmitter must be reset.
Clears the transmit status register and resets the transmitter.
Calls the DELAY macro to wait for 10 microseconds before reenabling the transmitter.
13.3.3 Managing Excessive Data Collisions
The following code shows how the el_tint( ) routine manages excessive data collisions:
} else if (status & (TX_MC<<8)) {
if
} else {
1
2
Increments the output errors because the excessive data collisions status means that the transmit failed.
Indicates excessive collisions.
13.3.4 Writing to the Status Register to Obtain the Next Value
The following code shows how the el_tint( ) routine writes to the status register to obtain the next value:
WRITE_TXS(sc, status);
}
1
status = READ_TXS(sc);
}
2
if
printf("el%d: Transmit in INFINITE loop %04X\n",
1
Writes to the transmit status register to clear the current status in preparation for reading the status for the next transmit completion (if any).
Implementing the Interrupt Section