Skip to content

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

Merged
merged 2 commits into from
Dec 15, 2017

Conversation

agdl
Copy link
Member

@agdl agdl commented Dec 11, 2017

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

@agdl agdl changed the title Allow General Calls on I2C bus (aka brodcast) Allow General Calls on I2C bus (aka broadcast) Dec 11, 2017
@@ -400,17 +400,20 @@ void SERCOM::disableWIRE()
}
}

void SERCOM::initSlaveWIRE( uint8_t ucAddress )
void SERCOM::initSlaveWIRE( uint8_t ucAddress, bool broadcast )
Copy link
Member

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

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe enableGeneralCall?

Copy link

@lupalby lupalby left a 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.

@agdl
Copy link
Member Author

agdl commented Dec 15, 2017

@lupalby I think you will like this too ;) https://github.com/agdl/WireUpdate

@sandeepmistry sandeepmistry merged commit 8f5e2eb into arduino:master Dec 15, 2017
@lupalby
Copy link

lupalby commented Dec 15, 2017

@agdl That's a cool feature! I will look into it

@agdl agdl deleted the WireBroadcast branch December 17, 2017 13:09
@sandeepmistry sandeepmistry added this to the Release 1.6.18 milestone Jan 25, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants