mongoose/src/arch.h

51 lines
1.6 KiB
C
Raw Normal View History

2020-12-05 11:26:32 +00:00
#pragma once
#define MG_ARCH_CUSTOM 0 // User creates its own mongoose_config.h
2023-11-02 09:25:38 +00:00
#define MG_ARCH_UNIX 1 // Linux, BSD, Mac, ...
#define MG_ARCH_WIN32 2 // Windows
#define MG_ARCH_ESP32 3 // ESP32
#define MG_ARCH_ESP8266 4 // ESP8266
#define MG_ARCH_FREERTOS 5 // FreeRTOS
#define MG_ARCH_AZURERTOS 6 // MS Azure RTOS
#define MG_ARCH_ZEPHYR 7 // Zephyr RTOS
#define MG_ARCH_NEWLIB 8 // Bare metal ARM
#define MG_ARCH_CMSIS_RTOS1 9 // CMSIS-RTOS API v1 (Keil RTX)
#define MG_ARCH_TIRTOS 10 // Texas Semi TI-RTOS
#define MG_ARCH_RP2040 11 // Raspberry Pi RP2040
#define MG_ARCH_ARMCC 12 // Keil MDK-Core with Configuration Wizard
#define MG_ARCH_CMSIS_RTOS2 13 // CMSIS-RTOS API v2 (Keil RTX5, FreeRTOS)
#define MG_ARCH_RTTHREAD 14 // RT-Thread RTOS
2024-09-24 18:45:58 -03:00
#define MG_ARCH_ARMCGT 15 // Texas Semi ARM-CGT
2020-12-05 11:26:32 +00:00
#if !defined(MG_ARCH)
2021-05-11 09:12:06 +01:00
#if defined(__unix__) || defined(__APPLE__)
2020-12-05 11:26:32 +00:00
#define MG_ARCH MG_ARCH_UNIX
#elif defined(_WIN32)
#define MG_ARCH MG_ARCH_WIN32
#endif
2022-11-03 12:59:55 +00:00
#endif // !defined(MG_ARCH)
2020-12-05 11:26:32 +00:00
2024-01-16 14:17:20 -03:00
#if !defined(MG_ARCH) || (MG_ARCH == MG_ARCH_CUSTOM)
#include "mongoose_config.h" // keep this include
2020-12-05 11:26:32 +00:00
#endif
#if !defined(MG_ARCH)
2024-04-18 17:28:40 -03:00
#error "MG_ARCH is not specified and we couldn't guess it. Define MG_ARCH=... in your compiler"
2020-12-05 11:26:32 +00:00
#endif
2022-09-28 12:42:20 +01:00
// http://esr.ibiblio.org/?p=5095
#define MG_BIG_ENDIAN (*(uint16_t *) "\0\xff" < 0x100)
2022-09-28 12:42:20 +01:00
2020-12-05 11:26:32 +00:00
#include "arch_esp32.h"
#include "arch_esp8266.h"
#include "arch_freertos.h"
2022-05-01 13:47:33 +01:00
#include "arch_newlib.h"
2022-05-12 08:07:51 +01:00
#include "arch_rtx.h"
2020-12-05 11:26:32 +00:00
#include "arch_unix.h"
#include "arch_win32.h"
2022-03-30 07:56:44 +01:00
#include "arch_zephyr.h"
#include "net_ft.h"
#include "net_lwip.h"
#include "net_rl.h"