📄 etharp_timer.c
字号:
//
// etharp_timer.c
//
// A small thread that runs once every ARP_TMR_INTERVAL to update the
// ARP table.
//
#include "lwip/opt.h"
#include "lwip/sys.h"
#include "netif/etharp.h"
#include "netif/etharp_timer.h"
static void etharp_timer_thread(void* arg)
{
sys_sem_t sem = sys_sem_new(0);
while (1) {
etharp_tmr();
sys_sem_wait_timeout(sem, ARP_TMR_INTERVAL);
}
}
void etharp_timer_init()
{
sys_thread_new(etharp_timer_thread, NULL, TCPIP_THREAD_PRIO);
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -