Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mistake the i2c_bitbang direction

> > I think mistake to set the direction.  We necessary DIR(INPUT) before READ,
> > and DIR(OUTPUT) before SETBITS().
> No.
> DIR() should be used only for SDA, not for SCL.
> As I noted in the log message, using DIR(INPUT) to read SCL
> in i2c_wait_for_scl() causes unexpected stop condition
> in SCL=H, SDA=L and DIR(OUTPUT) case.

Furthermore, we have to do SETBITS() before DIR(OUTPUT) in some case
otherwise the device might put unexpected glitch during delay between
Izumi Tsutsui

Home | Main Index | Thread Index | Old Index