看到别家的中断处理,我明天去改改试试:
void ENET_IRQHandler(void)
{
uint32_t reval;
/* clear the enet DMA Rx interrupt pending bits */
enet_interrupt_flag_clear(ENET_DMA_INT_FLAG_RS_CLR);
enet_interrupt_flag_clear(ENET_DMA_INT_FLAG_NI_CLR);
/* handles all the received frames */
do{
reval = enet_rxframe_size_get();
if(reval > 1){
lwip_pkt_handle();
}
}while(reval != 0);
}
|