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
_______________________________________________
lwip-users mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/lwip-users