Kieran, I was working on this over the weekend but could not test it at home without the right equipment so I wanted to understand it as much as I could. I used the tcpip_callback to indicate to main (in my case without an OS yet) and did all the processing of the data in main. As part of the main loop, it is looking for packet received from the callback to process. I think this will carry forward when I add the OS and there is no need to go with a different API when I add an OS. As far as I can tell, it is working fine and thank you again for your advice!
DB <SNIP> > > The golden rule is that only one thread should be active in lwIP. The > way this is normally achieved with an OS is to have a thread that is > dedicated to lwIP - this is often referred to as the tcpip thread. The > driver will pass received packets to the tcpip thread by queueing them > and setting a flag for example. The application must do something > similar. The netconn API is one example of how to do this and might be > the easiest way for you, but you can also do it with the raw API. You > just have to make sure you get into the context of the tcpip thread to > do any lwIP actions. E.g. by using the tcpip_callback() function. > > Kieran > _______________________________________________ lwip-users mailing list [email protected] http://lists.nongnu.org/mailman/listinfo/lwip-users
