From f487006a0518b56a2b95e3a9e4df1072a4092578 Mon Sep 17 00:00:00 2001 From: Marcel Telka Date: Tue, 2 Jul 2002 14:50:36 +0000 Subject: [PATCH] Added register offsets. git-svn-id: https://urjtag.svn.sourceforge.net/svnroot/urjtag/trunk@38 b68d4a1b-bc3d-0410-92ed-d4ac073336b7 --- include/arm/sa11x0/gpio.h | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/include/arm/sa11x0/gpio.h b/include/arm/sa11x0/gpio.h index 92b802a1..8940146a 100644 --- a/include/arm/sa11x0/gpio.h +++ b/include/arm/sa11x0/gpio.h @@ -32,14 +32,13 @@ #ifndef SA11X0_GPIO_H #define SA11X0_GPIO_H -#ifndef uint32_t -typedef unsigned int uint32_t; -#endif +#include /* GPIO Registers */ #define GPIO_BASE 0x90040000 +#if LANGUAGE == C typedef volatile struct GPIO_registers { uint32_t gplr; uint32_t gpdr; @@ -63,5 +62,15 @@ typedef volatile struct GPIO_registers { #define GFER GPIO_pointer->gfer #define GEDR GPIO_pointer->gedr #define GAFR GPIO_pointer->gafr +#endif /* LANGUAGE == C */ + +#define GPLR_OFFSET 0x00 +#define GPDR_OFFSET 0x04 +#define GPSR_OFFSET 0x08 +#define GPCR_OFFSET 0x0C +#define GRER_OFFSET 0x10 +#define GFER_OFFSET 0x14 +#define GEDR_OFFSET 0x18 +#define GAFR_OFFSET 0x1C #endif /* SA11X0_GPIO_H */