KurtE
Senior Member+
Thanks Nox771 and Defragster and Michael,
Not sure what we are all recommending here. My read here is a) Punt.
For me this is not much of an issue as I don't often use I2C, other than try to answer the issue coming up on the forum.
I was just hoping there was a reasonable answer for those who are using Wire for their stuff and then decide they would like to use the 2nd I2C interface to maybe add a sonar sensor, without having to go back and modify every library they use that includes Wire.
My thoughts on b) was, if you are now including i2c_t3.h because you wish to be able to use the other i2c buses, and not to change the actual functionality of your existing code, the existing code would use the Wire object that is part of the Wire library. If you are changing the functionality, you might also be adapting the library to be able to use any of the Wire objects, like I did while playing with the Sonar objects, where I pass in a reference to which object I wish to use. So in this case passing in Wire0 would not be much of an issue. But I do understand your point.
c) Again I totally understand. It is more of question of someone wishes to rename i2c_t3.h into Wire.h how compatible do these interfaces need to be. Believe me I understand the decoder card concept, as I did a lot of the work to add the new pins To Usarts and SPI...
As for size. I totally agree with you that on the T3.5/T3.6 who cares if we grow the library by a little bit. But is that true if you are currently running code on the TLC or T3.2?
Personally I like b) as I think it can give you better compatibility, for the reason I mentioned, but I totally understand the reasons for not doing so.
Not sure what we are all recommending here. My read here is a) Punt.
For me this is not much of an issue as I don't often use I2C, other than try to answer the issue coming up on the forum.
I was just hoping there was a reasonable answer for those who are using Wire for their stuff and then decide they would like to use the 2nd I2C interface to maybe add a sonar sensor, without having to go back and modify every library they use that includes Wire.
My thoughts on b) was, if you are now including i2c_t3.h because you wish to be able to use the other i2c buses, and not to change the actual functionality of your existing code, the existing code would use the Wire object that is part of the Wire library. If you are changing the functionality, you might also be adapting the library to be able to use any of the Wire objects, like I did while playing with the Sonar objects, where I pass in a reference to which object I wish to use. So in this case passing in Wire0 would not be much of an issue. But I do understand your point.
c) Again I totally understand. It is more of question of someone wishes to rename i2c_t3.h into Wire.h how compatible do these interfaces need to be. Believe me I understand the decoder card concept, as I did a lot of the work to add the new pins To Usarts and SPI...
As for size. I totally agree with you that on the T3.5/T3.6 who cares if we grow the library by a little bit. But is that true if you are currently running code on the TLC or T3.2?
Personally I like b) as I think it can give you better compatibility, for the reason I mentioned, but I totally understand the reasons for not doing so.