Subversion Repositories Code-Repo

Compare Revisions

Ignore whitespace Rev 261 → Rev 263

/PIC Stuff/Cerebot_32MX7_LED_Cube/ETHERNET.c
115,6 → 115,7
} while (value & 0x8000 != 0);
 
// Delay to wait for the link to be established
// Something needs to be done about this. 5s is WAY too long to wait
Delay_MS(5000);
// Wait for auto-negotiation to finish
309,14 → 310,15
void __ISR(_ETH_VECTOR, ipl1) __ETH_Interrupt_Handler(void) {
// uint32_t value = ETHIRQ;
if (ETHIRQbits.TXBUSE) {
 
// TX bus error, something -should- be done
ETHIRQbits.TXBUSE = 0;
}
if (ETHIRQbits.RXBUSE) {
 
// RX bus error, something -should- be done
ETHIRQbits.RXBUSE = 0;
}
if (ETHIRQbits.RXDONE) {
// Call the previously saved function
if (eth_data->rx_callback != NULL)
(*eth_data->rx_callback)();
ETHIRQbits.RXDONE = 0;
326,22 → 328,23
// ETHIRQbits.PKTPEND = 0;
// }
if (ETHIRQbits.TXDONE) {
// Call the previously saved function
if (eth_data->tx_callback != NULL)
(*eth_data->tx_callback)();
ETHIRQbits.TXDONE = 0;
}
if (ETHIRQbits.TXABORT) {
 
// TX aborted, do we care?
ETHIRQbits.TXABORT = 0;
}
if (ETHIRQbits.RXBUFNA) {
// This is a serious error!
 
// TODO: handle this
ETHIRQbits.RXBUFNA = 0;
}
if (ETHIRQbits.RXOVFLW) {
// This is a serious error!
 
// TODO: handle this
ETHIRQbits.RXOVFLW = 0;
}