lwip-users
[Top][All Lists]
Advanced

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

Re: [lwip-users] help: how to use interrupt in RAW_API mode under Xilinx


From: ye wu
Subject: Re: [lwip-users] help: how to use interrupt in RAW_API mode under Xilinx-V2
Date: Wed, 25 Oct 2006 09:59:12 +0800

Sathya,
 
Very appreciate for your help!
 
I tryed the code you give me and it's work fine.
 
I see how interrupt work in a RAW_API mode now!
 
There's one thing i do not understand very much,
in your code, in the while function, we still have xemacif_input(default_netif); in it.
the question is, do we still need that in the interrupt mode ?
as i think before, we use interrupt to replace the xemacif_input that used in the polling mode.
Is that i misunderstood before?
 
the segmentation of code is that:
   while (1) {
      while (waiting_for_timer) {
         xemacif_input(default_netif);
         XTime_GetTime(&ml_new);
         if ( ml_new >= ml_base ) {
            waiting_for_timer = 0;
            ml_base = ml_new + ml_offset;
         }
      }
      // Call my_tmr() every ml_offset cycles
      my_tmr();
      waiting_for_timer = 1;
   }
 
Thanks for your help and looking forward to your replay.
 
Best Regards,
Ye Wu

 
On 10/25/06, Sathya Thammanur <address@hidden> wrote:
Ye Wu,
RAW API does not use any of the kernel services like mailboxes, semaphores. The RAW API works on a callback mechanism as in the application, call back functions should be registered with the lwIP stack for various events associated with a protocol.

Hope this helps in understanding. Attached is a TCP based echo server example which you can use for your understanding. Along similar lines, UDP events need to be registered with stack (depending on whether you use server or client).

Sathya

reply via email to

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