This is the mail archive of the ecos-devel@sourceware.org mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Potential I2C API Enhancement


While working with the I2C interface using Kinetis to write a SMBus/PMBus layer over it, I could not implement a probe.

PMBus developers typically probe the bus looking for slaves by sending an address and using ACK/NACK to determine presence.

The only way one can probe with the current I2C API is to send at least one data byte, so that the return is an indicator of success or failure. However, this is a dangerous way to probe, because it might have side effects.

Sometimes people probe with Addr+Read, but most use Addr+Write, because that avoids a potential ARA response.

I am looking for ideas how best to deal with this problem. Potential solutions:

1) Use a target specific API
2) Add to existing API, like i2c_slave_present(...
3) Add new API/Package

In my opinion, choice 2 would be the best because it is target independent, and least confusing.

The practical impact is people developing SMBus/PMBus tend to use Cortex M. There are a small number of targets (5) in the dev tree. So perhaps it is still possible to add to the I2C API?

Thoughts?

Mike



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]