From c0859f04be72b3083e7f9e2a6abbc3700cc81715 Mon Sep 17 00:00:00 2001 From: Bertrik Sikken Date: Thu, 21 May 2009 14:31:47 +0000 Subject: [PATCH] Move private #defines from i2c-pp.h to i2c-pp.c git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21014 a1c6a512-1295-4272-9138-f99709370657 --- firmware/export/i2c-pp.h | 11 ----------- firmware/target/arm/i2c-pp.c | 11 +++++++++++ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/firmware/export/i2c-pp.h b/firmware/export/i2c-pp.h index 55e84b65a4..f126fa812d 100644 --- a/firmware/export/i2c-pp.h +++ b/firmware/export/i2c-pp.h @@ -34,17 +34,6 @@ #ifndef _I2C_PP_H #define _I2C_PP_H -#define I2C_CTRL (*(volatile unsigned char*)(I2C_BASE+0x00)) -#define I2C_ADDR (*(volatile unsigned char*)(I2C_BASE+0x04)) -#define I2C_DATA(X) (*(volatile unsigned char*)(I2C_BASE+0xc+(4*X))) -#define I2C_STATUS (*(volatile unsigned char*)(I2C_BASE+0x1c)) - -/* I2C_CTRL bit definitions */ -#define I2C_SEND 0x80 - -/* I2C_STATUS bit definitions */ -#define I2C_BUSY (1<<6) - /* TODO: Fully implement i2c driver */ /* To be used by drivers that need to do multiple i2c operations diff --git a/firmware/target/arm/i2c-pp.c b/firmware/target/arm/i2c-pp.c index fef2082e60..b162606680 100644 --- a/firmware/target/arm/i2c-pp.c +++ b/firmware/target/arm/i2c-pp.c @@ -36,6 +36,17 @@ #include "ascodec.h" #include "as3514.h" +#define I2C_CTRL (*(volatile unsigned char*)(I2C_BASE+0x00)) +#define I2C_ADDR (*(volatile unsigned char*)(I2C_BASE+0x04)) +#define I2C_DATA(X) (*(volatile unsigned char*)(I2C_BASE+0xc+(4*X))) +#define I2C_STATUS (*(volatile unsigned char*)(I2C_BASE+0x1c)) + +/* I2C_CTRL bit definitions */ +#define I2C_SEND 0x80 + +/* I2C_STATUS bit definitions */ +#define I2C_BUSY (1<<6) + /* Local functions definitions */ static struct mutex i2c_mtx SHAREDBSS_ATTR;