blob: 91df45f0f23c8b3e95b54f781de5bd700105c284 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
#ifndef PH_GLOBAL_H
#define PH_GLOBAL_H
#define ARRAY_LEN_U(arr) (u32)((sizeof(arr) / sizeof(*arr)))
#define ARRAY_LEN(arr) (s32)(sizeof(arr) / sizeof(*arr))
// Prevent the IDE from reporting errors that the compiler/linker won't report
#ifdef __INTELLISENSE__
#endif
#define ARM _Pragma("thumb off")
#define THUMB _Pragma("thumb on")
// `override` was added in C++11 before the DS, so we only use the keyword to indicate overriden functions
#define override
// Puts variables in the DTCM module by using #pragma section dtcm begin|end
#pragma define_section dtcm ".dtcm" \
".dtcm"
// Define .sbss variables by using #pragma section sbss begin|end
#pragma define_section sbss ".data" \
".sbss"
#endif
|