etharp_timer.c
来自「lwip tcp/ip 协议栈 adsp BF533 DSP 移植 用 visu」· C语言 代码 · 共 28 行
C
28 行
//
// 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 + =
减小字号Ctrl + -
显示快捷键?