Add MG_ARCH_RP2040

This commit is contained in:
Sergey Lyubka committed 2022-07-03 23:00:15 +01:00
1 parent dca43f430b
commit 30126072dc
3 files changed
+30

No files matched your search

+15
View File
@@ -40,6 +40,7 @@ extern "C" {
#define MG_ARCH_NEWLIB 10
#define MG_ARCH_RTX 11
#define MG_ARCH_TIRTOS 12
#define MG_ARCH_RP2040 13
#if !defined(MG_ARCH)
#if defined(__unix__) || defined(__APPLE__)
@@ -56,6 +57,8 @@ extern "C" {
#define MG_ARCH MG_ARCH_AZURERTOS
#elif defined(__ZEPHYR__)
#define MG_ARCH MG_ARCH_ZEPHYR
#elif defined(PICO_TARGET_NAME)
#define MG_ARCH MG_ARCH_RP2040
#endif
#if !defined(MG_ARCH)
@@ -318,6 +321,18 @@ struct timeval {
#endif
#if MG_ARCH == MG_ARCH_RP2040
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#endif
#if MG_ARCH == MG_ARCH_RTX
#include <ctype.h>
+3
View File
@@ -13,6 +13,7 @@
#define MG_ARCH_NEWLIB 10
#define MG_ARCH_RTX 11
#define MG_ARCH_TIRTOS 12
#define MG_ARCH_RP2040 13
#if !defined(MG_ARCH)
#if defined(__unix__) || defined(__APPLE__)
@@ -29,6 +30,8 @@
#define MG_ARCH MG_ARCH_AZURERTOS
#elif defined(__ZEPHYR__)
#define MG_ARCH MG_ARCH_ZEPHYR
#elif defined(PICO_TARGET_NAME)
#define MG_ARCH MG_ARCH_RP2040
#endif
#if !defined(MG_ARCH)
+12
View File
@@ -0,0 +1,12 @@
#pragma once
#if MG_ARCH == MG_ARCH_RP2040
#include <errno.h>
#include <stdarg.h>
#include <stdbool.h>
#include <stdint.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <time.h>
#endif