Iridescence
1.00
Embedded Graphic Framework
Loading...
Searching...
No Matches
ds_resource.h
1
/* Copyright (C) 2017 - 2024, Thornwave Labs Inc - All Rights Reserved.
2
* Unauthorized copying of this file, via any medium is strictly prohibited.
3
* Proprietary and confidential.
4
* Written by Razvan Turiac <razvan.turiac@thornwave.com>
5
*/
6
7
#ifndef _DS_RESOURCE_H
8
#define _DS_RESOURCE_H
9
10
#include <stdint.h>
11
12
13
#define INCLUDE_RESOURCE_EXTERN(name) \
14
extern const uint8_t name[];\
15
extern const uint8_t name##_end[];
16
17
#define RESOURCE_SIZE(name) (name##_end - name)
18
19
20
#define INCLUDE_RESOURCE_ALIGN(name, file, alignment) \
21
__asm__(\
22
".section .rodata, \"a\", %progbits"" \n"\
23
".balign " #alignment "\n"\
24
#name ":\n"\
25
".incbin \"" #file "\"\n"\
26
#name "_end:\n"\
27
".balign 4\n"\
28
);\
29
INCLUDE_RESOURCE_EXTERN(name)
30
31
32
#define INCLUDE_RESOURCE(name, file) INCLUDE_RESOURCE_ALIGN(name, file, 4)
33
34
35
#endif
inc
ds_resource.h
Generated by
1.9.8