Forum Discussion
Altera_Forum
Honored Contributor
14 years agoGood point! Yes, true, about 50 days. The point was to provide a TSE lwIP driver and the application is far from production ready (or production usable in a real application). However, this example isn't correct and it should be. Originally I was going to post only the TSE driver. I thought it would be nice to see it work so threw in main.c - hastily as you pointed out:
The:lwip250mStimer += 250;Should be:
if( lwip250mStimer >= 0xFFFFFFFF - 249 )
lwip250mStimer = 0;
else
lwip250mStimer += 250;
Thanks - good find. There is probably a better and/or more efficient way to call lwIP timers. lwIP also now includes timer handling internally so if used would avoid this bug as well. See timers.c/h in lwIP and LWIP_TIMERS in lwipopts.h. Bill