-
-
Notifications
You must be signed in to change notification settings - Fork 729
Allow General Calls on I2C bus (aka broadcast) #282
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
Conversation
cores/arduino/SERCOM.cpp
Outdated
@@ -400,17 +400,20 @@ void SERCOM::disableWIRE() | |||
} | |||
} | |||
|
|||
void SERCOM::initSlaveWIRE( uint8_t ucAddress ) | |||
void SERCOM::initSlaveWIRE( uint8_t ucAddress, bool broadcast ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we call the parameter listen_on_broadcast
or something similar? @sandeepmistry
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe enableGeneralCall
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree that the bool name could be changed in enableGeneralCall, but this functionality is very much needed. I did these same changes in my local copy and I was going to create a pull request myself if this didn't exist already. It works perfectly.
@lupalby I think you will like this too ;) https://github.com/agdl/WireUpdate |
@agdl That's a cool feature! I will look into it |
This allow to call a Wire.begin(address, true) to enable general call (broadcast messages on address 0x00) feature on SAMD21 based devices. All the legacy calls to Wire.begin(address) are ok since the extra parameter is false by default