初始化版本

This commit is contained in:
冯佳
2026-02-09 10:27:21 +08:00
commit 64d767932f
4467 changed files with 2486822 additions and 0 deletions

34
lwip/port/arch/sys_arch.h Normal file
View File

@ -0,0 +1,34 @@
#ifndef __ARCH_SYS_ARCH_H__
#define __ARCH_SYS_ARCH_H__
#include "osal.h"
/* LwIP Type Mapping to OSAL Types */
typedef osal_sem_t sys_sem_t;
typedef osal_mutex_t sys_mutex_t;
typedef osal_mq_t sys_mbox_t;
typedef osal_thread_t sys_thread_t;
/* LwIP Constants */
#define SYS_MBOX_NULL NULL
#define SYS_SEM_NULL NULL
/* OSAL returns OSAL_ETIMEOUT, LwIP expects SYS_ARCH_TIMEOUT (usually 0xFFFFFFFF) */
#define SYS_ARCH_TIMEOUT 0xffffffffUL
/* Protection (Critical Section) */
typedef uint32_t sys_prot_t;
static inline sys_prot_t sys_arch_protect(void)
{
osal_enter_critical();
return 1;
}
static inline void sys_arch_unprotect(sys_prot_t pval)
{
(void)pval;
osal_exit_critical();
}
#endif /* __ARCH_SYS_ARCH_H__ */