I2C / Wire Modes on x41 #840
ahshah
started this conversation in
Development Plans
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
As Spence is living the nomad life, I thought I'd take a crack at getting the I2C code working for the x41 chipsets in the 2.0.0 codeline. I am about to propose a pull request with ~3 fixes in the code that help things working for both software master and hardware slave configurations. Over the course of the the debugging sessions, I found myself a little confused about why the codeline has 3 modes of Wire/I2C operation.
Okay- I understand the need for master only and slave only, however what is the purpose of both? The code in Wire.cpp is already confusing as heck with all the preprocessor directives to sort out the intended mode of operation. Having the "both" mode seems to add complexity for little gain- but maybe I'm not seeing some bigger picture. What am I missing?
The other issue I had was one of nomeclature- the pulldown "Tools" menu in the IDE. I really think it should say "I2C Mode" or "TWI Mode" not "Wire modes" as I had no idea to look into that menu until a few days had passed. Further, I think it should be clear for the x41 chipset that "Master" is really "Software Master" and Slave is really "Hardware Slave"- finally if we need to keep both it should state "Both: Software Master Hardware Slave" because its not clear that "Both" doesn't force a software implement of slave operations.
Just my two cents that no one asked for :)
Beta Was this translation helpful? Give feedback.
All reactions