Converting existing NO_SYS implementation to use sequential API
I have existing LWIP implementation, that is running everything inside one
thread (from driver to application layer). It has NO_SYS=1, but there is
actually RTOS available, just everything LWIP related is in single thread.
Now, I want to use that same implementation, and I want to use sequential
netconn API. Reason is that I want to write "client" application, that seems
to be much easier to do with sequential API. Writing same thing using
asynchronous API would lead to complicated state-machines.
What would be best way to achieve this? I came up with two viable options:
1) Convert the implementation to use tcpip thread. However I need a context
to periodically service the driver and the stack itself(= set IP addresses
etc). Is it a good idea to service the driver and stack inside the tcpip
thread? I would periodically call tcpip_callback_with_block to my service
2) keep entire stack in one thread and write a layer, that would convert
"RAW" calls to sequential API. I don't particularly like this, as I would be
writing pretty much same thing as is already in LWIP.
Can you provide some insight to my options? Is there other viable options?
I'm new to LWIP so there might be ways to do this that I didn't even think