lwip-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lwip-users] Initialization with raw api


From: Simon Goldschmidt
Subject: Re: [lwip-users] Initialization with raw api
Date: Sat, 12 Mar 2011 19:17:54 +0100

Stephen Cleary <address@hidden> wrote:

My guess is that the raw initialization (tcp_new, etc) should go into the tcpip_init callback, correct?

Yep.

(Another possibility would be ethernetif_init (which is run, I assume, in the context of tcpip_thread

That pretty much depends on your initialization: ethernetif_init is called from the call stack where netif_add is called, so you have to ensure that netif_add is called in the tcpip_thread.

), but it seems wrong to put raw api calls in that function.)

Yes, it does seem wrong :-)

I’m pretty sure that’s right, but I can’t find any documentation stating that, nor any samples taking that approach. The only raw api sample code I can find doesn’t have a separate EMAC task at all.

That doesn't really depend on whether the EMAC driver has its own thread. The EMAC driver just has to make sure it does not violate lwIP threading requirements (I.e. Call netif->input, which has to be set to ethernetif_input for ethernet MACs).

Simon


reply via email to

[Prev in Thread] Current Thread [Next in Thread]