update dm9000a driver
git-svn-id: https://rt-thread.googlecode.com/svn/trunk@195 bbd45198-f89e-11dd-88c7-29a3b14d5316
This commit is contained in:
parent
729a0f4516
commit
a7b56e9c45
@ -175,12 +175,11 @@ void rt_dm9000_isr()
|
|||||||
/* Received the coming packet */
|
/* Received the coming packet */
|
||||||
if (int_status & ISR_PRS)
|
if (int_status & ISR_PRS)
|
||||||
{
|
{
|
||||||
rt_err_t result;
|
/* disable receive interrupt */
|
||||||
|
dm9000_device.imr_all = IMR_PAR | IMR_PTM;
|
||||||
|
|
||||||
/* a frame has been received */
|
/* a frame has been received */
|
||||||
result = eth_device_ready(&(dm9000_device.parent));
|
eth_device_ready(&(dm9000_device.parent));
|
||||||
if (result != RT_EOK) rt_kprintf("eth notification failed\n");
|
|
||||||
RT_ASSERT(result == RT_EOK);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Transmit Interrupt check */
|
/* Transmit Interrupt check */
|
||||||
@ -560,8 +559,9 @@ struct pbuf *rt_dm9000_rx(rt_device_t dev)
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* restore interrupt */
|
/* restore receive interrupt */
|
||||||
// dm9000_io_write(DM9000_IMR, dm9000_device.imr_all);
|
dm9000_device.imr_all = IMR_PAR | IMR_PTM | IMR_PRM;
|
||||||
|
dm9000_io_write(DM9000_IMR, dm9000_device.imr_all);
|
||||||
}
|
}
|
||||||
|
|
||||||
/* unlock DM9000 device */
|
/* unlock DM9000 device */
|
||||||
|
Loading…
x
Reference in New Issue
Block a user