[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
In the I2C driver, there is a i2c_sendack(), but there is no i2c_sendnack().
I2C devices I've seen so far all require the master to NACK the last byte in a
register read command.
However, the i2c_readreg() function does ACK the last received byte.
I've grepped for this function, to see who uses it, and it turns out only
pcf8563.c is using it at the moment.
And in the pcf8564 datasheet, it says that a NACK is required after the last
byte read, just before the stop condition.
So I've added the following function to i2c.c:
* enable output
* generate clock pulse
And changed i2c_readreg's last 'i2c_sendack()' into a 'i2c_sendnack()'