diff options
Diffstat (limited to 'nuttx/arch/z80/include/ez80/types.h')
-rw-r--r-- | nuttx/arch/z80/include/ez80/types.h | 46 |
1 files changed, 29 insertions, 17 deletions
diff --git a/nuttx/arch/z80/include/ez80/types.h b/nuttx/arch/z80/include/ez80/types.h index 52c95ac6b..4ca48e697 100644 --- a/nuttx/arch/z80/include/ez80/types.h +++ b/nuttx/arch/z80/include/ez80/types.h @@ -38,8 +38,8 @@ * through sys/types.h */ -#ifndef __ARCH_CHIP_TYPES_H -#define __ARCH_CHIP_TYPES_H +#ifndef __ARCH_Z80_INCLUDE_EZ80_TYPES_H +#define __ARCH_Z80_INCLUDE_EZ80_TYPES_H /**************************************************************************** * Included Files @@ -55,7 +55,15 @@ #ifndef __ASSEMBLY__ -/* These are the sizes of the types supported by the ZiLOG Z8Encore! compiler: +/* These are the sizes of the standard integer types. NOTE that these type + * names have a leading underscore character. This file will be included + * (indirectly) by include/stdint.h and typedef'ed to the final name without + * the underscore character. This roundabout way of doings things allows + * the stdint.h to be removed from the include/ directory in the event that + * the user prefers to use the definitions provided by their toolchain header + * files + * + * These are the sizes of the types supported by the ZiLOG compiler: * * int - 24-bits * short - 16-bits @@ -64,16 +72,18 @@ * float - 32-bits */ -typedef char sbyte; -typedef unsigned char ubyte; -typedef unsigned char uint8; -typedef unsigned char boolean; -typedef short sint16; -typedef unsigned short uint16; -typedef int sint24; -typedef unsigned int uint24; -typedef long sint32; -typedef unsigned long uint32; +typedef char _int8_t; +typedef unsigned char _uint8_t; + +typedef short _int16_t; +typedef unsigned short _uint16_t; + +typedef int _int24_t; +typedef unsigned int _uint24_t; +#define __INT24_DEFINED + +typedef long _int32_t; +typedef unsigned long _uint32_t; /* A pointer is 2 or 3 bytes, depending upon if the ez80 is in z80 * compatibility mode or not @@ -83,16 +93,18 @@ typedef unsigned long uint32; */ #ifdef CONFIG_EZ80_Z80MODE -typedef unsigned short uintptr; +typedef short _intptr_t; +typedef unsigned short _uintptr_t; #else -typedef unsigned int uintptr; +typedef int _intptr_t; +typedef unsigned int _uintptr_t; #endif /* This is the size of the interrupt state save returned by irqsave(). * It holds the AF regiser pair + a zero pad byte */ -typedef uint24 irqstate_t; +typedef _uint24_t irqstate_t; #endif /* __ASSEMBLY__ */ @@ -100,4 +112,4 @@ typedef uint24 irqstate_t; * Global Function Prototypes ****************************************************************************/ -#endif /* __ARCH_CHIP_TYPES_H */ +#endif /* __ARCH_Z80_INCLUDE_EZ80_TYPES_H */ |