Skip to content
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

I2C slave support (originally by bjoham) #5226

Merged
merged 16 commits into from
Oct 26, 2018

Conversation

suculent
Copy link
Contributor

Resolved conflicts, fixed style, cleaned up in-progress comments and useless lines of code.

@suculent suculent changed the title I2c slave (originally by bjoham) I2C slave support (originally by bjoham) Oct 11, 2018
@devyte
Copy link
Collaborator

devyte commented Oct 26, 2018

Ok, given @suculent 's feedback (in prior incarnations of this PR, not in this one), I'm merging this as-is. If there are issues, they can be addressed with new PRs.

@devyte devyte merged commit cb05b86 into esp8266:master Oct 26, 2018
@devyte devyte added this to the 2.5.0 milestone Oct 26, 2018
@suculent suculent deleted the i2c_slave_by_bjoham branch October 26, 2018 17:25
@freeck
Copy link

freeck commented Feb 6, 2019

From version 2.5.0 on the I2C-library core_esp8266_si2c.c has been extended with slave-functionality. For a performance reason there was decided to put a lot of functions in IRAM!
I don't use these functions but they are linked into the image nevertheless....but this costs 2596 bytes of our scarce IRAM! See also: #5707

@r3na
Copy link

r3na commented Mar 26, 2019

@suculent Did you try this code using different I2C drivers as master? Bellow I am sending another comment I wrote:
#5762 (comment)
Apparently this works well with two ESP8266 using this driver, but with different I2C drivers as master the ESP8266 using this driver does not work as slave.

@rustyx
Copy link

rustyx commented Mar 31, 2019

ESP8266 can never be a compliant I2C slave; there is no hardware support, and a bit-by-bit software solution isn't going to be fast enough for the standard I2C speed of 100kHz because 1) the interrupt won't arrive fast thought and 2) the GPIO bus clock is slower than 100kHz.

That's why this solution can handle 14kHz max, which is useless since most other devices run at 100kHz.

Try ESP32, it has I2C hardware.

@d-a-v d-a-v mentioned this pull request Apr 4, 2019
6 tasks
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.

6 participants