forked from ROMEO/obsw
31 lines
1.1 KiB
C
31 lines
1.1 KiB
C
#pragma once
|
|
|
|
#include <stdio.h>
|
|
#include <stdlib.h>
|
|
|
|
#include "lwipopts.h"
|
|
|
|
/** if you want to use the struct timeval provided
|
|
* by your system, set this to 0 and include <sys/time.h> in cc.h */
|
|
#define LWIP_TIMEVAL_PRIVATE 0
|
|
#include <sys/time.h>
|
|
|
|
#define LWIP_ERRNO_INCLUDE <errno.h>
|
|
|
|
#define LWIP_RAND rand
|
|
|
|
#define PACK_STRUCT_FIELD(x) x
|
|
#define PACK_STRUCT_STRUCT __attribute__((packed))
|
|
#define PACK_STRUCT_BEGIN
|
|
#define PACK_STRUCT_END
|
|
|
|
#define LWIP_PLATFORM_ASSERT(x)
|
|
#define LWIP_PLATFORM_DIAG(x) do { printf x; } while(0)
|
|
|
|
|
|
//overwrite protection function, we need ISR aware one, which the default FreeRTOS port does not support
|
|
#define SYS_ARCH_DECL_PROTECT(lev) uint32_t lev //caution, type is actually sys_prot_t, which is not available here.
|
|
#define SYS_ARCH_PROTECT(lev) lev = sys_arch_protect_ca0()
|
|
#define SYS_ARCH_UNPROTECT(lev) sys_arch_unprotect_ca0(lev)
|
|
uint32_t sys_arch_protect_ca0(void); //caution, type is actually sys_prot_t, which is not available here.
|
|
void sys_arch_unprotect_ca0(uint32_t pval); //caution, type is actually sys_prot_t, which is not available here.
|