Rename unzip tool.
[SquirrelJME.git] / nanocoat / include / sjme / payload.h
blobe126564932c7289278354679bcad47d98070274f
1 /* -*- Mode: C; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the Mozilla Public License Version 2.0.
7 // See license.mkd for licensing and copyright information.
8 // -------------------------------------------------------------------------*/
10 /**
11 * Static SquirrelJME payload setup, can be used at compile time to set some
12 * initial boot settings and otherwise embedded into the image.
14 * @since 2023/07/27
17 #ifndef SQUIRRELJME_PAYLOAD_H
18 #define SQUIRRELJME_PAYLOAD_H
20 #include "sjme/nvm.h"
21 #include "sjme/config.h"
23 /* Anti-C++. */
24 #ifdef __cplusplus
25 #ifndef SJME_CXX_IS_EXTERNED
26 #define SJME_CXX_IS_EXTERNED
27 #define SJME_CXX_SQUIRRELJME_PAYLOAD_H
28 extern "C" {
29 #endif /* #ifdef SJME_CXX_IS_EXTERNED */
30 #endif /* #ifdef __cplusplus */
32 /*--------------------------------------------------------------------------*/
34 /** The maximum ROMs permitted in the payload. */
35 #define SJME_NVM_PAYLOAD_MAX_ROMS 10
37 typedef struct sjme_payload_rom
39 /** Is this ROM active? */
40 sjme_jboolean isActive;
42 /** Is this a library? If not then it is a ROM. */
43 sjme_jboolean isLibrary;
45 /** The address of the ROM data. */
46 sjme_pointer address;
48 /** The length of the ROM data. */
49 sjme_jint length;
50 } sjme_payload_rom;
52 /**
53 * Contains the payload information.
55 * @since 2023/07/27
57 struct sjme_payload_config
59 /** ROMs that are available built-in. */
60 sjme_payload_rom roms[SJME_NVM_PAYLOAD_MAX_ROMS];
63 /** The static payload configuration. */
64 extern const sjme_payload_config sjme_payload_config_data;
66 /*--------------------------------------------------------------------------*/
68 /* Anti-C++. */
69 #ifdef __cplusplus
70 #ifdef SJME_CXX_SQUIRRELJME_PAYLOAD_H
72 #undef SJME_CXX_SQUIRRELJME_PAYLOAD_H
73 #undef SJME_CXX_IS_EXTERNED
74 #endif /* #ifdef SJME_CXX_SQUIRRELJME_PAYLOAD_H */
75 #endif /* #ifdef __cplusplus */
77 #endif /* SQUIRRELJME_PAYLOAD_H */