sio_tryread() --> slipif_poll() --> "char" --> slipif_rxbyte_input(,char) --> "char" --> slipif_rxbyte(,char) --> Pointer to full packet (NULL if not yet) --> to netif->input() called by slipif_rxbyte_input()
We can try adding a buffer at slipif_poll(), but the issue is that we still have the delay of the main loop. A combination of:
Increasing the ring buffer at the uart layer (./utils/uart.c) (But it seems pretty high already...)
Copying as much in slipif_poll() and push into the slip stream. (instead of single byte, copy like say 50 bytes) (./thirdparty/lwip/src/netif/slipif.c)
Or we can make the ISR call slipif polling if dangerously too close to the ring buffer limit.
/Users/briankhuu/git/sew-lwm2m-reference-design/thirdparty/lwip/src/netif/slipif.c
within while loop. possible issue with extracting multiple frames in uart stream. Since we only have one slip frame buffer.
Here it is as it currently stands
Annotated:
In ./network/slip/slip_sio.c it shows that we slip uart has receive buffer of 512b
sio_tryread() --> slipif_poll() --> "char" --> slipif_rxbyte_input(,char) --> "char" --> slipif_rxbyte(,char) --> Pointer to full packet (NULL if not yet) --> to
netif->input()
called by slipif_rxbyte_input()We can try adding a buffer at slipif_poll(), but the issue is that we still have the delay of the main loop. A combination of:
Increasing the ring buffer at the uart layer (./utils/uart.c) (But it seems pretty high already...)
Copying as much in slipif_poll() and push into the slip stream. (instead of single byte, copy like say 50 bytes) (./thirdparty/lwip/src/netif/slipif.c)
Or we can make the ISR call slipif polling if dangerously too close to the ring buffer limit.