types.h (1834B)
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 17/** Use to create a block of of code which should execute with interrupts temporarily turned off. 18 19 __Do not__ use @ref CRITICAL and @ref INTERRUPT attributes for a 20 function added via add_VBL() (or LCD, etc). The attributes 21 are only required when constructing a bare jump from the 22 interrupt vector itself. 23 24 @see enable_interrupts, disable_interrupts 25*/ 26#define CRITICAL __critical 27 28/** Indicate to the compiler the function will be used as an interrupt handler. 29 30 __Do not__ use @ref CRITICAL and @ref INTERRUPT attributes for a 31 function added via add_VBL() (or LCD, etc). The attributes 32 are only required when constructing a bare jump from the 33 interrupt vector itself. 34 35 @see ISR_VECTOR(), ISR_NESTED_VECTOR() 36*/ 37#define INTERRUPT __interrupt 38 39#endif 40 41/** Signed eight bit. 42 */ 43typedef signed char INT8; 44/** Unsigned eight bit. 45 */ 46typedef unsigned char UINT8; 47/** Signed sixteen bit. 48 */ 49typedef signed int INT16; 50/** Unsigned sixteen bit. 51 */ 52typedef unsigned int UINT16; 53/** Signed 32 bit. 54 */ 55typedef signed long INT32; 56/** Unsigned 32 bit. 57 */ 58typedef unsigned long UINT32; 59 60#ifndef __SIZE_T_DEFINED 61#define __SIZE_T_DEFINED 62typedef unsigned int size_t; 63#endif 64 65/** Returned from clock 66 @see clock 67*/ 68typedef unsigned int clock_t; 69 70#endif