From 14ee31865e366dc19fb87caf4877a8d93305a01b Mon Sep 17 00:00:00 2001 From: Dave Chapman Date: Sun, 19 Oct 2008 12:47:58 +0000 Subject: [PATCH] The GPIO registers are 8-bit, so define them as such. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@18835 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/as3525.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/firmware/export/as3525.h b/firmware/export/as3525.h index 237656d14f..2453c33ec0 100644 --- a/firmware/export/as3525.h +++ b/firmware/export/as3525.h @@ -296,20 +296,20 @@ interface */ /* GPIO registers */ -#define GPIOA_DIR (*(volatile unsigned long*)(GPIOA_BASE+0x400)) +#define GPIOA_DIR (*(volatile unsigned char*)(GPIOA_BASE+0x400)) #define GPIOA_AFSEL (*(volatile unsigned char*)(GPIOA_BASE+0x420)) -#define GPIOA_PIN(a) (*(volatile unsigned long*)(GPIOA_BASE+4*(1<<(a)))) +#define GPIOA_PIN(a) (*(volatile unsigned char*)(GPIOA_BASE+4*(1<<(a)))) -#define GPIOB_DIR (*(volatile unsigned long*)(GPIOB_BASE+0x400)) +#define GPIOB_DIR (*(volatile unsigned char*)(GPIOB_BASE+0x400)) #define GPIOB_AFSEL (*(volatile unsigned char*)(GPIOB_BASE+0x420)) -#define GPIOB_PIN(a) (*(volatile unsigned long*)(GPIOB_BASE+4*(1<<(a)))) +#define GPIOB_PIN(a) (*(volatile unsigned char*)(GPIOB_BASE+4*(1<<(a)))) -#define GPIOC_DIR (*(volatile unsigned long*)(GPIOC_BASE+0x400)) +#define GPIOC_DIR (*(volatile unsigned char*)(GPIOC_BASE+0x400)) #define GPIOC_AFSEL (*(volatile unsigned char*)(GPIOC_BASE+0x420)) -#define GPIOC_PIN(a) (*(volatile unsigned long*)(GPIOC_BASE+4*(1<<(a)))) +#define GPIOC_PIN(a) (*(volatile unsigned char*)(GPIOC_BASE+4*(1<<(a)))) -#define GPIOD_DIR (*(volatile unsigned long*)(GPIOD_BASE+0x400)) +#define GPIOD_DIR (*(volatile unsigned char*)(GPIOD_BASE+0x400)) #define GPIOD_AFSEL (*(volatile unsigned char*)(GPIOD_BASE+0x420)) -#define GPIOD_PIN(a) (*(volatile unsigned long*)(GPIOD_BASE+4*(1<<(a)))) +#define GPIOD_PIN(a) (*(volatile unsigned char*)(GPIOD_BASE+4*(1<<(a)))) #endif /*__AS3525_H__*/