gbdk-2020 | GameBoy Development Kit |
| download: https://git.y1.nz/archives/gbdk.tar.gz | |
| README | Files | Log | Refs | LICENSE |
gbdk-lib/include/asm/sm83/types.h
1 /** @file asm/sm83/types.h
2 @anchor file_asm_sm83_types_h
3 Types definitions for the gb.
4 */
5 #ifndef ASM_SM83_TYPES_INCLUDE
6 #define ASM_SM83_TYPES_INCLUDE
7
8 #ifndef __PORT_sm83
9 #error sm83 only.
10 #endif
11
12 #ifdef __SDCC
13
14 #define NONBANKED __nonbanked /**< Placed in the non-banked lower 16K region (bank 0), regardless of the bank selected by it's source file. */
15 #define BANKED __banked /**< The function will use banked sdcc calls, and is placed in the bank selected by it's source file (or compiler switches). */
16 #define REENTRANT /**< Needed for mos6502 target when functions take too many parameters. */
17 #define NO_OVERLAY_LOCALS /**< Optimization for mos6502 target, indicating locals won't conflict with compiler's overlay segment */
18
19 /** Use to create a block of code which should execute with interrupts temporarily turned off.
20
21 __Do not__ use the function definition attributes
22 @ref CRITICAL and @ref INTERRUPT when declaring
23 ISR functions added via add_VBL() (or LCD, etc).
24 These attributes are only required when constructing
25 a bare jump from the interrupt vector itself.
26
27 @see enable_interrupts, disable_interrupts
28 */
29 #define CRITICAL __critical
30
31 /** Indicate to the compiler the function will be used as an interrupt handler.
32
33 __Do not__ use the function definition attributes
34 @ref CRITICAL and @ref INTERRUPT when declaring
35 ISR functions added via add_VBL() (or LCD, etc).
36 These attributes are only required when constructing
37 a bare jump from the interrupt vector itself.
38
39 @see ISR_VECTOR(), ISR_NESTED_VECTOR()
40 */
41 #define INTERRUPT __interrupt
42
43 #endif
44
45 /** Signed eight bit.
46 */
47 typedef signed char INT8;
48 /** Unsigned eight bit.
49 */
50 typedef unsigned char UINT8;
51 /** Signed sixteen bit.
52 */
53 typedef signed int INT16;
54 /** Unsigned sixteen bit.
55 */
56 typedef unsigned int UINT16;
57 /** Signed 32 bit.
58 */
59 typedef signed long INT32;
60 /** Unsigned 32 bit.
61 */
62 typedef unsigned long UINT32;
63
64 #ifndef __SIZE_T_DEFINED
65 #define __SIZE_T_DEFINED
66 typedef unsigned int size_t;
67 #endif
68
69 /** Returned from clock
70 @see clock
71 */
72 typedef unsigned int clock_t;
73
74 #endif
This webpage is intended to be an accessible preview of this repository. To get a fuller picture, clone it and use the git CLI.