-
Notifications
You must be signed in to change notification settings - Fork 613
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[API] I2C repeated start #81
Comments
We currently don't support that, it's done by using I2C_RDWR and we need to work out a sensible API for it to work on C/C++ as well python/js but should definately be do-able. As part of this we definately need to start using i2c.h:i2c_get_functionality() to make sure our bus supports all these 'fancy' features. |
I looked at the i2c-dev that is being used, I don't think i2c-dev supports mixed transactions. We will have to use an i2c_msg struct to support repeated start, does it make sense? or is there a software I2C (bit banging) that would be easier to implement/ port. |
Hi, I have a temporary fix here https://github.com/sajingeo/i2crw and I have verified it works :) we still need to integrate it to MRAA. |
Thanks that's really helpful, question is do we want to support just a simple Rx/Tx buf combination or do we want to be more flexible and let users construct their own i2c_msg? The first should be fairly easy, the second is much more complicated (especially when it comes to exposing this via SWIG). |
Hi @sajingeo @arfoll , |
Hi @arfoll and maybe @jontrulson Is there such a workaround for Edisons ? This condition is not needed for all sensors and i have understood that it was complicated to implement it as a generic feature, Would-it be possible to get a function that could be called before the creation of the sensor with the upm init function. I am a python user and I would love to be able to write something like :
Is it possible ? Is it huge work ? Can anybody with skills please contribute ? |
Hi @g-vidal, just for objectivity's sake - neither of the two issues you've mentioned has to do with repeated start. The "combined" thing doesn't exist on Edison, I think. So all this would need to be implemented from scratch. Can't comment on the amount of work, that would require some further analysis of specific use cases and API we want to expose. |
Hi @alext-mkrs From what I have read here
Which means that using combined is a trick to get repeated start by default. It is unfortunate that it does not exist in Edisons ;-(. We have thrown away (not too far) all our repeated start devices but the question remains, are there any plans to add this option in mraa lib. |
No plans to the best of my knowledge - as there have been virtually no requests for that so far, aside from this one, which as we can see is not drawing too much community attention. So... I'm sorry to say that, but this is still up for grabs for anyone who's willing. |
I was trying to implement a I2C Repeated start for a sensor, is there a way around it or is it a feature.
http://www.i2c-bus.org/repeated-start-condition/
The text was updated successfully, but these errors were encountered: