[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().
> 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
DIR(OUTPUT) and SETBITS().
Main Index |
Thread Index |