mirror of https://github.com/ARMmbed/mbed-os.git
Modify to not missed the received data in EthernetInerface
In EthernetInerface, we added the measures so as not to miss the received data.pull/1404/head
parent
6bdf53a4e8
commit
3d708b73dd
|
@ -24,9 +24,11 @@ static void rza1_recv_task(void *arg) {
|
|||
struct eth_hdr *ethhdr;
|
||||
u16_t recv_size;
|
||||
struct pbuf *p;
|
||||
int cnt;
|
||||
|
||||
while (1) {
|
||||
sys_arch_sem_wait(&recv_ready_sem, 0);
|
||||
for (cnt = 0; cnt < 16; cnt++) {
|
||||
recv_size = ethernet_receive();
|
||||
if (recv_size != 0) {
|
||||
p = pbuf_alloc(PBUF_RAW, recv_size, PBUF_RAM);
|
||||
|
@ -51,6 +53,9 @@ static void rza1_recv_task(void *arg) {
|
|||
pbuf_free(p);
|
||||
break;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue