thread safety in newlib, newer lwip, optimized ISR for UART, some more stuff

This commit is contained in:
2023-10-06 17:29:07 +02:00
parent 1ba3d9412d
commit 1eb406074c
14 changed files with 75 additions and 157 deletions

View File

@ -10,7 +10,9 @@
#define LWIP_TIMEVAL_PRIVATE 0
#include <sys/time.h>
#define LWIP_ERRNO_INCLUDE <errno.h>
// errno is a macro. If we define LWIP_ERRNO_INCLUDE to errno.h the preprocessor will replace it,
// breaking the include. Instead we supply a helper include which in turn includes errno.h
#define LWIP_ERRNO_INCLUDE <onrre.h>
#define LWIP_RAND rand
@ -22,10 +24,4 @@
#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.
#define LWIP_FREERTOS_SYS_ARCH_PROTECT_USES_MUTEX 1