From aaa8443af95aa03b225cea935ff49691ec94d0f9 Mon Sep 17 00:00:00 2001 From: Daniel Stenberg Date: Tue, 21 Jan 2003 19:37:29 +0000 Subject: Based on Ludovic Lange excellent work, I've modified things to increase likeliness that this works on an FM Recorder. Reports please! git-svn-id: svn://svn.rockbox.org/rockbox/trunk@3143 a1c6a512-1295-4272-9138-f99709370657 --- firmware/drivers/i2c.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'firmware/drivers/i2c.c') diff --git a/firmware/drivers/i2c.c b/firmware/drivers/i2c.c index ccd11e01de..97d7a511e1 100644 --- a/firmware/drivers/i2c.c +++ b/firmware/drivers/i2c.c @@ -124,7 +124,7 @@ int i2c_getack(void) low until it is ready. We need to poll the clock line until it goes high before we read the ack. */ -#ifndef ARCHOS_RECORDER +#ifdef HAVE_I2C_LOW_FIRST SDA_LO; /* First, discharge the data line */ #endif SDA_INPUT; /* And set to input */ @@ -167,7 +167,7 @@ unsigned char i2c_inb(int ack) /* clock in each bit, MSB first */ for ( i=0x80; i; i>>=1 ) { -#ifndef ARCHOS_RECORDER +#ifdef HAVE_I2C_LOW_FIRST /* 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 */ -- cgit v1.2.3