diff options
| author | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-01-29 23:58:04 +0100 |
|---|---|---|
| committer | Xavier Del Campo Romero <xavi.dcr@tutanota.com> | 2024-01-30 01:16:18 +0100 |
| commit | a27a35bd778d9afe9f04e7aed69d950bc4d980e8 (patch) | |
| tree | cad17cb68da4a210538c15a7fba2289374c4fcc1 /src/system | |
| parent | c2e2343054e8d11ebaaf426d6ca105e79e93da6a (diff) | |
| download | jancity-a27a35bd778d9afe9f04e7aed69d950bc4d980e8.tar.gz | |
WIP ESP32 port
Diffstat (limited to 'src/system')
| -rw-r--r-- | src/system/CMakeLists.txt | 4 | ||||
| -rw-r--r-- | src/system/esp32/inc/system/port.h | 13 | ||||
| -rw-r--r-- | src/system/esp32/privinc/system_private.h | 15 | ||||
| -rw-r--r-- | src/system/esp32/src/stubs.c | 6 | ||||
| -rw-r--r-- | src/system/esp32/src/system.c | 25 |
5 files changed, 63 insertions, 0 deletions
diff --git a/src/system/CMakeLists.txt b/src/system/CMakeLists.txt index 26a8803..7ddd98c 100644 --- a/src/system/CMakeLists.txt +++ b/src/system/CMakeLists.txt @@ -17,6 +17,10 @@ elseif(SDL1_2_BUILD) else() set(src ${src} "sdl-1.2/src/stubs.c") endif() +elseif(ESP32_BUILD) + set(src "esp32/src/system.c") + set(inc ${inc} "esp32/inc") + set(privinc ${privinc} "esp32/privinc") endif() add_library(system ${src}) diff --git a/src/system/esp32/inc/system/port.h b/src/system/esp32/inc/system/port.h new file mode 100644 index 0000000..6566c31 --- /dev/null +++ b/src/system/esp32/inc/system/port.h @@ -0,0 +1,13 @@ +#ifndef INIT_ESP32_H +#define INIT_ESP32_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +#ifdef __cplusplus +} +#endif + +#endif /* INIT_SDL_H */ diff --git a/src/system/esp32/privinc/system_private.h b/src/system/esp32/privinc/system_private.h new file mode 100644 index 0000000..70ed8c8 --- /dev/null +++ b/src/system/esp32/privinc/system_private.h @@ -0,0 +1,15 @@ +#ifndef SYSTEM_PRIVATE_H +#define SYSTEM_PRIVATE_H + +#ifdef __cplusplus +extern "C" +{ +#endif + +int system_init_os(void); + +#ifdef __cplusplus +} +#endif + +#endif /* SYSTEM_PRIVATE_H */ diff --git a/src/system/esp32/src/stubs.c b/src/system/esp32/src/stubs.c new file mode 100644 index 0000000..c07a790 --- /dev/null +++ b/src/system/esp32/src/stubs.c @@ -0,0 +1,6 @@ +#include <system_private.h> + +int system_init_os(void) +{ + return 0; +} diff --git a/src/system/esp32/src/system.c b/src/system/esp32/src/system.c new file mode 100644 index 0000000..6221e2e --- /dev/null +++ b/src/system/esp32/src/system.c @@ -0,0 +1,25 @@ +#include <system.h> +#include <system_private.h> +#include <gfx.h> +#include <net.h> +#include <sfx.h> +#include <stdio.h> +#include <stdlib.h> + +bool system_can_exit(void) +{ + return false; +} + +void system_loop(void) +{ +} + +void system_deinit(void) +{ +} + +int system_init(void) +{ + return -1; +} |
