diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/fmradio_i2c.c | 13 |
1 files changed, 3 insertions, 10 deletions
diff --git a/firmware/drivers/fmradio_i2c.c b/firmware/drivers/fmradio_i2c.c index b17a979288..1c9bc300c2 100644 --- a/firmware/drivers/fmradio_i2c.c +++ b/firmware/drivers/fmradio_i2c.c | |||
@@ -296,7 +296,7 @@ static void fmradio_i2c_stop(void) | |||
296 | } | 296 | } |
297 | 297 | ||
298 | 298 | ||
299 | static void fmradio_i2c_ack(int bit) | 299 | static void fmradio_i2c_ack(void) |
300 | { | 300 | { |
301 | /* Here's the deal. The slave is slow, and sometimes needs to wait | 301 | /* Here's the deal. The slave is slow, and sometimes needs to wait |
302 | before it can receive the acknowledge. Therefore it forces the clock | 302 | before it can receive the acknowledge. Therefore it forces the clock |
@@ -304,14 +304,7 @@ static void fmradio_i2c_ack(int bit) | |||
304 | high before we release the ack. */ | 304 | high before we release the ack. */ |
305 | 305 | ||
306 | SCL_LO; /* Set the clock low */ | 306 | SCL_LO; /* Set the clock low */ |
307 | if ( bit ) | 307 | SDA_LO; |
308 | { | ||
309 | SDA_HI; | ||
310 | } | ||
311 | else | ||
312 | { | ||
313 | SDA_LO; | ||
314 | } | ||
315 | 308 | ||
316 | SCL_INPUT; /* Set the clock to input */ | 309 | SCL_INPUT; /* Set the clock to input */ |
317 | while(!SCL) /* and wait for the slave to release it */ | 310 | while(!SCL) /* and wait for the slave to release it */ |
@@ -424,7 +417,7 @@ int fmradio_i2c_read(int address, unsigned char* buf, int count) | |||
424 | { | 417 | { |
425 | *buf++ = fmradio_i2c_inb(); | 418 | *buf++ = fmradio_i2c_inb(); |
426 | if (i != 1) | 419 | if (i != 1) |
427 | fmradio_i2c_ack(ack); | 420 | fmradio_i2c_ack(); |
428 | } | 421 | } |
429 | } | 422 | } |
430 | else | 423 | else |