Forum Discussion
Altera_Forum
Honored Contributor
16 years agoAltera TSE driver and example program for lwIP (1.3.2)
After many many requests and complaints about lack of support and/or documentation for support of lwIP for the Altera TSE, I have developed a drop-in TSE driver and example program and made this avai...
Altera_Forum
Honored Contributor
14 years agoTimers should normally use 'modulo' arithmetic - where you always subtract the two values that contain 'times' and then look at the value of the difference.
So if the current time is 'ms_ticks' use:
if ((int)(ms_ticks - lwip250mStimer) >= 0) {
/* timer has expired */
lwip250mStimer += 250;
}Rather than checking for ms_ticks >= lwip250mStimer.