Hi Matt,

> Is there officially a "restart" condition in I2C?
The restart is a way to restart (hence the name) a communication
sequence without releasing the bus. It is part of the specification
and the i2c hardware of pics does handle this different than stopping
and initiating a new sequence. This is why it is in the i2c interface.
Some slave respond different to a restart than to a stop/start
sequence (but I guess this should be considered a bug).

> Joep, you said "A second start (not preceded by a stop) must be
> changed to restart". Why can't the library handle this? If no stop
> condition was used, a 2nd start should automatically be a restart.
Probably and feel free to give it a try But be sure to verify if it
works correctly on different chips. There are different versions of
the i2c peripheral and  some of them have quircks.

> This issue would not have came about if the I2C lib handles this. We
> could have this issue again in the future on other devices.
The point is it does work with i2c_software, which could give the
impression the problem is in i2c_hardware. I2c_software is
straight-forward and easier to modify without introducting bugs than
i2c_hardware. So maybe we should introduce a 'safe mode' that block
this behavior in i2c_software too. This way we avoid we build
libraries that do work with i2c_software but not with i2c_hardware
without the need to test both.

Joep

-- 
You received this message because you are subscribed to the Google Groups 
"jallib" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/jallib?hl=en.

Reply via email to