77 |
|
|
78 |
netif_set_default(&netif); |
netif_set_default(&netif); |
79 |
|
|
80 |
|
netif_set_up(&netif); |
81 |
|
|
82 |
echo_init(); |
echo_init(); |
83 |
|
|
84 |
printf("Applications started.\n"); |
printf("Applications started.\n"); |
86 |
|
|
87 |
while (1) { |
while (1) { |
88 |
|
|
89 |
if (mintapif_wait(&netif, TCP_TMR_INTERVAL) == MINTAPIF_TIMEOUT) { |
if (mintapif_wait(&netif, TCP_FAST_INTERVAL) == MINTAPIF_TIMEOUT) { |
90 |
tcp_tmr(); |
static u8_t slow_timer = 0; |
91 |
|
|
92 |
|
tcp_fasttmr(); |
93 |
|
|
94 |
|
if (slow_timer == 4) { |
95 |
|
slow_timer = 0; |
96 |
|
tcp_slowtmr(); |
97 |
|
} else { |
98 |
|
slow_timer++; |
99 |
|
} |
100 |
} |
} |
101 |
|
|
102 |
} |
} |