iPod Classic: rework on I2C driver

- Some rewrite with the intent to get ride of these random errors
  appearing on some builds/devices (not much noticeable on RB but
  can ruin bootloader builds).
- Error handling (ACK).
- IIC clock increased to be the same as in OF.

Change-Id: Idf8cfa3c230a0a61ec9c879bf6f0ea8b061a4607
This commit is contained in:
Cástor Muñoz 2016-08-12 14:03:54 +02:00
parent adbd2969e6
commit 578525b463
3 changed files with 153 additions and 144 deletions

View file

@ -144,8 +144,6 @@ bool dbg_hw_info(void)
_DEBUG_PRINTF("USB D+: %d mV", adc_read_usbdata_voltage(true));
_DEBUG_PRINTF("USB D-: %d mV", adc_read_usbdata_voltage(false));
line++;
extern unsigned long i2c_rd_err, i2c_wr_err;
_DEBUG_PRINTF("i2c rd/wr errors: %lu/%lu", i2c_rd_err, i2c_wr_err);
}
#ifdef UC870X_DEBUG
else if(state==(max_states-1))