[lwip-users] tcp_tmr and timers.c
Hello everyone, I am diving into lwip and I have found the timers.c module. This module seems to be a nice possibility to setup the different timer (e.g. for arp, DHCP, ...). But I am wondering why is the call to tcp_tmr not included in timers.c? Are there any architectural reasons or do I understand something wrong? BTW. I am working without an OS, NO_SYS = 1 best, Matthias ᐧ ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users
Re: [lwip-users] tcp_tmr and timers.c
All I can tell you, and I don't know if it suffices, is that you call sys_check_timeouts(); in your main loop and all timing is done. Check your lwipopts.h for the number of timers if using dhcp, dns, etc. Should you need to use a timer for your own purposes: static void myfunction(something *myarg); sys_timeout(SEND_TIME, (sys_timeout_handler) myfunction, myarg); // callback gets called back on timeout; sys_untimeout((sys_timeout_handler) myfunction, myarg); // timer removed ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users
Re: [lwip-users] tcp_tmr and timers.c
Hi Sergio, calling sys_check_timeouts in the main loop does not suffice, cause the tcp_tmr is not activated in the timers.c module. For me the natural solution would be to add tcp_tmr activation to timers.c and then call sys_check_timeouts in my main loop. But I am not sure if there's a reasion why tcp_tmr is not integrated in timers.c. best Matthias On Mon, Oct 27, 2014 at 1:37 PM, Sergio R. Caprile scapr...@gmail.com wrote: All I can tell you, and I don't know if it suffices, is that you call sys_check_timeouts(); in your main loop and all timing is done. Check your lwipopts.h for the number of timers if using dhcp, dns, etc. Should you need to use a timer for your own purposes: static void myfunction(something *myarg); sys_timeout(SEND_TIME, (sys_timeout_handler) myfunction, myarg); // callback gets called back on timeout; sys_untimeout((sys_timeout_handler) myfunction, myarg); // timer removed ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users ᐧ ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users
Re: [lwip-users] tcp_tmr and timers.c
All my TCP examples and applications work, and I'm calling sys_check_timeouts(); so, if tcp_tmr is really not called, then something with the same functionality is being called. I do use NO_SYS=1 and have provided a working sys_now() function. DHCP and DNS timeouts are also handled through sys_check_timeouts(), and I have used a timeout for a UDP application as I sent. As this seems to work for any similar scenario, what is actually your problem ? ___ lwip-users mailing list lwip-users@nongnu.org https://lists.nongnu.org/mailman/listinfo/lwip-users