summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Nielsen Feltzing <linus@haxx.se>2002-06-19 12:00:37 +0000
committerLinus Nielsen Feltzing <linus@haxx.se>2002-06-19 12:00:37 +0000
commit9d937e9c231ffa0b18bb448875c0548aacc0e8e6 (patch)
tree1500a582c353427abccb6caaa39e0539e651a146
parent2bfa0473c3f965dcf96be61d13f9812bb7e01154 (diff)
downloadrockbox-9d937e9c231ffa0b18bb448875c0548aacc0e8e6.zip
rockbox-9d937e9c231ffa0b18bb448875c0548aacc0e8e6.tar.gz
rockbox-9d937e9c231ffa0b18bb448875c0548aacc0e8e6.tar.bz2
rockbox-9d937e9c231ffa0b18bb448875c0548aacc0e8e6.tar.xz
Recorder modifications
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@1071 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/drivers/i2c.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c
index e9b06ed..5aa822e 100644
--- a/firmware/drivers/i2c.c
+++ b/firmware/drivers/i2c.c
@@ -111,10 +111,11 @@ int i2c_getack(void)
before it can send the acknowledge. Therefore it forces the clock
low until it is ready. We need to poll the clock line until it goes
high before we read the ack. */
-
+
+#ifndef ARCHOS_RECORDER
SDA_LO; /* First, discharge the data line */
+#endif
SDA_INPUT; /* And set to input */
- SCL_LO; /* Set the clock low */
SCL_INPUT; /* Set the clock to input */
while(!SCL) /* and wait for the MAS to release it */
yield();
@@ -154,9 +155,11 @@ unsigned char i2c_inb(int ack)
/* clock in each bit, MSB first */
for ( i=0x80; i; i>>=1 ) {
+#ifndef ARCHOS_RECORDER
/* Tricky business. Here we discharge the data line by driving it low
and then set it to input to see if it stays low or goes high */
SDA_LO; /* First, discharge the data line */
+#endif
SDA_INPUT; /* And set to input */
SCL_HI;
if ( SDA )