mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-10-14 02:27:39 -04:00
Fix delays in generic i2c driver, reduce delays in ams sansa fmradio i2c driver (tested on m200v4, clip, e200v2, fuze).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@21421 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
e70a23a9d4
commit
fa4135e43d
2 changed files with 2 additions and 3 deletions
|
@ -91,9 +91,9 @@ static unsigned char i2c_inb(const struct i2c_interface *iface, bool ack)
|
|||
|
||||
iface->sda_input();
|
||||
|
||||
iface->delay_su_dat();
|
||||
/* clock in each bit, MSB first */
|
||||
for ( i=0x80; i; i>>=1 ) {
|
||||
iface->delay_su_dat();
|
||||
iface->scl_hi();
|
||||
iface->delay_thigh();
|
||||
if (iface->sda())
|
||||
|
@ -123,7 +123,6 @@ static int i2c_outb(const struct i2c_interface *iface, unsigned char byte)
|
|||
iface->scl_hi();
|
||||
iface->delay_thigh();
|
||||
iface->scl_lo();
|
||||
iface->delay_hd_dat();
|
||||
}
|
||||
|
||||
return i2c_getack(iface);
|
||||
|
|
|
@ -111,7 +111,7 @@ static void fm_delay(void)
|
|||
volatile int i;
|
||||
|
||||
/* this loop is uncalibrated and could use more sophistication */
|
||||
for (i = 0; i < 100; i++) {
|
||||
for (i = 0; i < 20; i++) {
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue