mirror of
https://github.com/logicog/RTLPlayground.git
synced 2026-10-29 17:54:14 +08:00
Merge pull request #407 from DrDoof/fix/arp-aging
Age the ARP cache by calling uip_arp_timer()
This commit is contained in:
1 file changed
+6
@@ -89,6 +89,7 @@ volatile __xdata uint32_t ticks;
|
||||
volatile __xdata uint8_t sec_counter;
|
||||
volatile __xdata uint16_t sleep_ticks;
|
||||
__xdata uint8_t stp_clock;
|
||||
__xdata uint8_t arp_age_secs;
|
||||
extern __xdata struct dhcp_state dhcp_state;
|
||||
|
||||
#define STP_TICK_DIVIDER 3
|
||||
@@ -1559,6 +1560,11 @@ void idle(void)
|
||||
|
||||
// Check for button presses once a second
|
||||
handle_button();
|
||||
// Age the ARP cache: uip_arp_timer() expects a 10 s cadence
|
||||
if (++arp_age_secs >= 10) {
|
||||
arp_age_secs = 0;
|
||||
uip_arp_timer();
|
||||
}
|
||||
|
||||
#ifdef DEBUG
|
||||
print_sfr_data();
|
||||
|
||||
Reference in new issue
Block a user