summaryrefslogtreecommitdiff
path: root/nuttx/arch/z80
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-14 15:46:55 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2009-12-14 15:46:55 +0000
commit24bdea23f746984480bd59dd13dd4d631a210320 (patch)
tree66cd9e753d9cf77ec35b1b06be757025188cefab /nuttx/arch/z80
parenta23845ccf98018e8fc455677579fca2a947e1074 (diff)
downloadpx4-nuttx-24bdea23f746984480bd59dd13dd4d631a210320.tar.gz
px4-nuttx-24bdea23f746984480bd59dd13dd4d631a210320.tar.bz2
px4-nuttx-24bdea23f746984480bd59dd13dd4d631a210320.zip
Changing NuttX fixed size type names to C99 standard names -- things will be broken for awhile
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@2335 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/arch/z80')
-rw-r--r--nuttx/arch/z80/include/ez80/irq.h10
-rw-r--r--nuttx/arch/z80/include/ez80/types.h46
-rw-r--r--nuttx/arch/z80/include/irq.h10
-rw-r--r--nuttx/arch/z80/include/z8/irq.h2
-rw-r--r--nuttx/arch/z80/include/z8/types.h37
-rw-r--r--nuttx/arch/z80/include/z80/irq.h8
-rw-r--r--nuttx/arch/z80/include/z80/types.h37
7 files changed, 90 insertions, 60 deletions
diff --git a/nuttx/arch/z80/include/ez80/irq.h b/nuttx/arch/z80/include/ez80/irq.h
index 2cbd376f0..dd478d503 100644
--- a/nuttx/arch/z80/include/ez80/irq.h
+++ b/nuttx/arch/z80/include/ez80/irq.h
@@ -38,8 +38,8 @@
* only indirectly through nuttx/irq.h (via arch/irq.h)
*/
-#ifndef __ARCH_EZ80_IRQ_H
-#define __ARCH_EZ80_IRQ_H
+#ifndef __ARCH_Z80_INCLUDE_EZ80_IRQ_H
+#define __ARCH_Z80_INCLUDE_EZ80_IRQ_H
#ifndef _EZ80F91
# error "Only the EZ80F91 is currently supported"
@@ -197,9 +197,9 @@
/* This is the type of the register save array */
#ifdef CONFIG_EZ80_Z80MODE
-typedef uint16 chipreg_t;
+typedef uint16_t chipreg_t;
#else
-typedef uint24 chipreg_t;
+typedef uint24_t chipreg_t;
#endif
/* This struct defines the way the registers are stored. */
@@ -254,5 +254,5 @@ EXTERN void irqrestore(irqstate_t flags);
#endif
#endif
-#endif /* __ARCH_EZ80_IRQ_H */
+#endif /* __ARCH_Z80_INCLUDE_EZ80_IRQ_H */
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 */
diff --git a/nuttx/arch/z80/include/irq.h b/nuttx/arch/z80/include/irq.h
index 6ef0188ac..62957914f 100644
--- a/nuttx/arch/z80/include/irq.h
+++ b/nuttx/arch/z80/include/irq.h
@@ -1,7 +1,7 @@
/****************************************************************************
- * arch/irq.h
+ * arch/z80/include/irq.h
*
- * Copyright (C) 2007, 2008 Gregory Nutt. All rights reserved.
+ * Copyright (C) 2007-2009 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt <spudmonkey@racsa.co.cr>
*
* Redistribution and use in source and binary forms, with or without
@@ -37,8 +37,8 @@
* only indirectly through nuttx/irq.h
*/
-#ifndef __ARCH_IRQ_H
-#define __ARCH_IRQ_H
+#ifndef __ARCH_Z80_INCLUDE_IRQ_H
+#define __ARCH_Z80_INCLUDE_IRQ_H
/****************************************************************************
* Included Files
@@ -77,5 +77,5 @@ extern "C" {
#endif
#endif
-#endif /* __ARCH_IRQ_H */
+#endif /* __ARCH_Z80_INCLUDE_IRQ_H */
diff --git a/nuttx/arch/z80/include/z8/irq.h b/nuttx/arch/z80/include/z8/irq.h
index 25c80e009..764ace338 100644
--- a/nuttx/arch/z80/include/z8/irq.h
+++ b/nuttx/arch/z80/include/z8/irq.h
@@ -306,7 +306,7 @@
/* This is the type of the register save array */
-typedef uint16 chipreg_t;
+typedef uint16_t chipreg_t;
/* This struct defines the way the registers are stored. */
diff --git a/nuttx/arch/z80/include/z8/types.h b/nuttx/arch/z80/include/z8/types.h
index 79f2682f6..0e269a5de 100644
--- a/nuttx/arch/z80/include/z8/types.h
+++ b/nuttx/arch/z80/include/z8/types.h
@@ -38,8 +38,8 @@
* through sys/types.h
*/
-#ifndef __ARCH_CHIP_TYPES_H
-#define __ARCH_CHIP_TYPES_H
+#ifndef __ARCH_Z80_INCLUDE_Z8_IRQ_H
+#define __ARCH_Z80_INCLUDE_Z8_IRQ_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 Z8Encore! compiler:
*
* int - 16-bits
* short - 16-bits
@@ -71,22 +79,23 @@
* rom pointer - 16-bits
*/
-typedef char sbyte;
-typedef unsigned char ubyte;
-typedef unsigned char uint8;
-typedef unsigned char boolean;
-typedef int sint16;
-typedef unsigned int uint16;
-typedef long sint32;
-typedef unsigned long uint32;
+typedef char _int8_t;
+typedef unsigned char _uint8_t;
+
+typedef int _int16_t;
+typedef unsigned int _uint16_t;
+
+typedef long _int32_t;
+typedef unsigned long _uint32_t;
/* A pointer is 2 bytes */
-typedef unsigned int uintptr;
+typedef unsigned int _intptr_t;
+typedef unsigned int _uintptr_t;
/* This is the size of the interrupt state save returned by irqsave() */
-typedef ubyte irqstate_t;
+typedef _uint8_t irqstate_t;
#endif /* __ASSEMBLY__ */
@@ -94,4 +103,4 @@ typedef ubyte irqstate_t;
* Global Function Prototypes
****************************************************************************/
-#endif /* __ARCH_CHIP_TYPES_H */
+#endif /* __ARCH_Z80_INCLUDE_Z8_IRQ_H */
diff --git a/nuttx/arch/z80/include/z80/irq.h b/nuttx/arch/z80/include/z80/irq.h
index 042e44e17..05e62a019 100644
--- a/nuttx/arch/z80/include/z80/irq.h
+++ b/nuttx/arch/z80/include/z80/irq.h
@@ -38,8 +38,8 @@
* only indirectly through nuttx/irq.h (via arch/irq.h)
*/
-#ifndef __ARCH_Z80_IRQ_H
-#define __ARCH_Z80_IRQ_H
+#ifndef __ARCH_Z80_INCLUDE_Z80_IRQ_H
+#define __ARCH_Z80_INCLUDE_Z80_IRQ_H
/****************************************************************************
* Included Files
@@ -90,7 +90,7 @@
/* This is the type of the register save array */
-typedef uint16 chipreg_t;
+typedef uint16_t chipreg_t;
/* This struct defines the way the registers are stored. */
@@ -144,5 +144,5 @@ EXTERN void irqrestore(irqstate_t flags) __naked;
#endif
#endif
-#endif /* __ARCH_Z80_IRQ_H */
+#endif /* __ARCH_Z80_INCLUDE_Z80_IRQ_H */
diff --git a/nuttx/arch/z80/include/z80/types.h b/nuttx/arch/z80/include/z80/types.h
index d482725bc..652ea5adf 100644
--- a/nuttx/arch/z80/include/z80/types.h
+++ b/nuttx/arch/z80/include/z80/types.h
@@ -38,8 +38,8 @@
* through sys/types.h
*/
-#ifndef __ARCH_CHIP_TYPES_H
-#define __ARCH_CHIP_TYPES_H
+#ifndef __ARC_Z80_INCLUDE_Z80_TYPES_H
+#define __ARC_Z80_INCLUDE_Z80_TYPES_H
/****************************************************************************
* Included Files
@@ -55,7 +55,15 @@
#ifndef __ASSEMBLY__
-/* These are the sizes of the standard SDCC types
+/* 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 standard SDCC types
*
* For SDCC, sizeof(int) is 16 and sizeof(long) is 32. long long and double
* are not supported.
@@ -64,22 +72,23 @@
* space information.
*/
-typedef char sbyte;
-typedef unsigned char ubyte;
-typedef unsigned char uint8;
-typedef unsigned char boolean;
-typedef int sint16;
-typedef unsigned int uint16;
-typedef long sint32;
-typedef unsigned long uint32;
+typedef char _int8_t;
+typedef unsigned char _uint8_t;
+
+typedef int _int16_t;
+typedef unsigned int _uint16_t;
+
+typedef long _int32_t;
+typedef unsigned long _uint32_t;
/* A pointer is 2 bytes */
-typedef unsigned int uintptr;
+typedef int _intptr_t;
+typedef unsigned int _uintptr_t;
/* This is the size of the interrupt state save returned by irqsave() */
-typedef uint16 irqstate_t;
+typedef _uint16_t irqstate_t;
#endif /* __ASSEMBLY__ */
@@ -87,4 +96,4 @@ typedef uint16 irqstate_t;
* Global Function Prototypes
****************************************************************************/
-#endif /* __ARCH_CHIP_TYPES_H */
+#endif /* __ARC_Z80_INCLUDE_Z80_TYPES_H */