From f2fc18f82dd7900465d6ab3ae2080726d5589d39 Mon Sep 17 00:00:00 2001 From: spicyjpeg <88942473+spicyjpeg@users.noreply.github.com> Date: Tue, 17 Aug 2021 11:37:03 +0000 Subject: Added dynamic linker API and example, updated README and changelog --- examples/system/dynlink/library/dll_common.h | 30 ++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 examples/system/dynlink/library/dll_common.h (limited to 'examples/system/dynlink/library/dll_common.h') diff --git a/examples/system/dynlink/library/dll_common.h b/examples/system/dynlink/library/dll_common.h new file mode 100644 index 0000000..4f9314b --- /dev/null +++ b/examples/system/dynlink/library/dll_common.h @@ -0,0 +1,30 @@ +/* + * PSn00bSDK dynamic linker example (shared header) + * (C) 2021 spicyjpeg - MPL licensed + */ + +#ifndef __DLL_COMMON_H +#define __DLL_COMMON_H + +#include + +/* Common structures shared by the main executable and DLLs */ + +#define OT_LEN 256 +#define PACKET_LEN 16384 + +typedef struct { + DISPENV disp; + DRAWENV draw; + uint32_t ot[OT_LEN]; + uint8_t p[PACKET_LEN]; +} DB; + +typedef struct { + uint16_t xres, yres; + DB db[2]; + uint32_t db_active; + uint8_t *db_nextpri; +} CONTEXT; + +#endif -- cgit v1.2.3