lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] ethernetif_input usage with Ethernet over SPI


From: Tomáš Švec
Subject: Re: [lwip-users] ethernetif_input usage with Ethernet over SPI
Date: Thu, 23 Aug 2012 16:21:30 +0200

Well, to clarify, I send whole Ethernet frames via SPI. ARP should be handled by the external chip, though, as it does not let any ARP packages through and responds to ARP queries without the TCP/IP stack. I stumbled upon a problem with ARP, however - everytime I try to turn it off in lwipopts.h, a bunch of errors pops up in ethernetif.c, telling me everytime I access a "struct netif" structure:
"dereferencing pointer to incomplete type", even with fields that should be fine, like hwaddr.

2012/8/22 Simon Goldschmidt <address@hidden>
Tomáš Švec <address@hidden> wrote:

> Thank you for the quick answer. By ISR you mean an interrupt routine? In that case it is correct, since the event polling kind of replaces interrupts.

Yes.

> I also implemented low_level_output, but it seems to be called only from the etharp.c file.

Which function you need depends on how you pass data through SPI. If you only want to pass IP packets (so etharp does not run over SPI), you don't need low_level_output.

> Is it necessary to implement a function like "ethernetif_output" as well and call it somewhere?

As above, if etharp does not run per SPI, yes. That's what you'll set to netif->output so that it gets called instead of etharp_output. Pbuf payload points to the IP header in this function.

Simon
_______________________________________________
lwip-users mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/lwip-users


reply via email to

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