lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] Getting started with lwIP on a NON-SYS platform


From: Simon Goldschmidt
Subject: Re: [lwip-users] Getting started with lwIP on a NON-SYS platform
Date: Wed, 27 Jun 2012 15:29:21 +0200

Angel CODREAN <address@hidden> wrote:
> LWIP_driver_input is the method I implemented in my driver in order to
> receive packages from the ethernet driver
> 
> /** Called when a packet is received */
> err_t LWIP_driver_input(struct pbuf *pbuf, struct netif *netif)
> {
>   struct pbuf *p=(struct pbuf*)malloc(sizeof(struct pbuf));
>  driver_receive(p->payload, &(p->tot_len));
>   ethernet_input(p, netif);
>   return ERR_OK;
> }

That is totally not the way it should be. Please have a look at the 
ethernetif.c skeleton file to see how a driver should interact with lwIP.

LwIP will *never* call your LWIP_driver_input() function, it is up to you to 
schedule a call to this function (either by polling the driver or by getting an 
RX interrupt).

Simon
-- 
NEU: FreePhone 3-fach-Flat mit kostenlosem Smartphone!                          
        
Jetzt informieren: http://mobile.1und1.de/?ac=OM.PW.PW003K20328T7073a



reply via email to

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