mirror of
https://github.com/apache/nuttx.git
synced 2026-10-06 13:55:15 +00:00
sim arch: poll for TX frames to speed up driver
This commit is contained in:
parent
63c9f1a86e
commit
53a8cb734b
1 changed files with 6 additions and 0 deletions
|
|
@ -171,6 +171,12 @@ void netdriver_loop(void)
|
|||
{
|
||||
FAR struct eth_hdr_s *eth;
|
||||
|
||||
/* Check for new frames. If so, then poll the network for new XMIT data */
|
||||
|
||||
net_lock();
|
||||
(void)devif_poll(&g_sim_dev, sim_txpoll);
|
||||
net_unlock();
|
||||
|
||||
/* netdev_read will return 0 on a timeout event and >0 on a data received event */
|
||||
|
||||
g_sim_dev.d_len = netdev_read((FAR unsigned char *)g_sim_dev.d_buf,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue