mirror of
https://github.com/cesanta/mongoose.git
synced 2026-11-07 16:01:30 +00:00
Add arch for CMSIS-RTOS v1 and v2
This commit is contained in:
1 parent
434b129746
commit
f4ed5062f6
6 files changed
+60
-34
No files matched your search
+11
-3
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#if MG_ARCH == MG_ARCH_ARMCC || MG_ARCH == MG_ARCH_RTX
|
||||
#if MG_ARCH == MG_ARCH_ARMCC || MG_ARCH == MG_ARCH_CMSIS_RTOS1 || \
|
||||
MG_ARCH == MG_ARCH_CMSIS_RTOS2
|
||||
|
||||
#include <ctype.h>
|
||||
#include <errno.h>
|
||||
@@ -12,6 +13,13 @@
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <time.h>
|
||||
#if MG_ARCH == MG_ARCH_CMSIS_RTOS1
|
||||
#include "cmsis_os.h" // keep this include
|
||||
// https://developer.arm.com/documentation/ka003821/latest
|
||||
extern uint32_t rt_time_get(void);
|
||||
#elif MG_ARCH == MG_ARCH_CMSIS_RTOS2
|
||||
#include "cmsis_os2.h" // keep this include
|
||||
#endif
|
||||
|
||||
#define strdup(s) ((char *) mg_strdup(mg_str(s)).ptr)
|
||||
|
||||
@@ -24,8 +32,8 @@ static inline int mg_mkdir(const char *path, mode_t mode) {
|
||||
}
|
||||
#endif
|
||||
|
||||
#if MG_ARCH == MG_ARCH_RTX && !defined MG_ENABLE_RL && \
|
||||
(!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) && \
|
||||
#if (MG_ARCH == MG_ARCH_CMSIS_RTOS1 || MG_ARCH == MG_ARCH_CMSIS_RTOS2) && \
|
||||
!defined MG_ENABLE_RL && (!defined(MG_ENABLE_LWIP) || !MG_ENABLE_LWIP) && \
|
||||
(!defined(MG_ENABLE_TCPIP) || !MG_ENABLE_TCPIP)
|
||||
#define MG_ENABLE_RL 1
|
||||
#endif
|
||||
|
||||
Reference in new issue
Block a user