summaryrefslogtreecommitdiff
path: root/firmware/drivers/i2c.c
diff options
context:
space:
mode:
authorJens Arnold <amiconn@rockbox.org>2006-11-10 20:26:01 +0000
committerJens Arnold <amiconn@rockbox.org>2006-11-10 20:26:01 +0000
commit780f79e7a4028a57e4bf591539a540dbfae2496d (patch)
tree48ddec4b94e11ebc545070b2af6f52144661bf3c /firmware/drivers/i2c.c
parent270cb0b68172c740820f772563e66a79308e641e (diff)
Removed the Gmini 120 and Gmini SP code. These ports are dead, unfortunately.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11504 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/drivers/i2c.c')
-rw-r--r--firmware/drivers/i2c.c28
1 files changed, 2 insertions, 26 deletions
diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c
index 2b439c23ad..83ac21fae8 100644
--- a/firmware/drivers/i2c.c
+++ b/firmware/drivers/i2c.c
@@ -24,26 +24,6 @@
#include "system.h"
/* cute little functions, atomic read-modify-write */
-#if CONFIG_I2C == I2C_GMINI
-
-/* This is done like this in the Archos' firmware.
- * However, the TCC370 has an integrated I2C
- * controller (bound to the same lines). It should be
- * possible to use it and thus save some space in flash.
- */
-#define SDA_LO (P3 &= ~0x20)
-#define SDA_HI (P3 |= 0x20)
-#define SDA_INPUT (P3CONH &= ~0x0C)
-#define SDA_OUTPUT (P3CONH |= 0x04)
-#define SDA (P3 & 0x20)
-
-#define SCL_LO (P3 &= ~0x10)
-#define SCL_HI (P3 |= 0x10)
-#define SCL_INPUT (P3CONH &= ~0x03)
-#define SCL_OUTPUT (P3CONH |= 0x01)
-#define SCL (P3 & 0x10)
-
-#else /* non Gmini below */
/* SDA is PB7 */
#define SDA_LO and_b(~0x80, &PBDRL)
@@ -67,7 +47,6 @@
#define SCL_HI or_b(0x20, &PBDRH)
#define SCL (PBDRH & 0x20)
#endif
-#endif /* ! I2C_GMINI */
/* arbitrary delay loop */
#define DELAY do { int _x; for(_x=0;_x<20;_x++);} while (0)
@@ -106,13 +85,10 @@ void i2c_init(void)
{
int i;
-#if CONFIG_I2C == I2C_GMINI
- SCL_INPUT;
- SDA_INPUT;
-#elif CONFIG_I2C == I2C_ONDIO
+#if CONFIG_I2C == I2C_ONDIO
/* make PB6 & PB7 general I/O */
PBCR2 &= ~0xf000;
-#else /* not Gmini, not Ondio */
+#else /* not Ondio */
/* make PB7 & PB13 general I/O */
PBCR1 &= ~0x0c00; /* PB13 */
PBCR2 &= ~0xc000; /* PB7 */