-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Conversation
…Arduino into i2c_slave_by_bjoham * 'i2c_slave_by_bjoham' of https://github.com/thinx-cloud/Arduino: cleaning up commit as requested by esp8266#5162 (review)
…Arduino into i2c_slave_by_bjoham * 'i2c_slave_by_bjoham' of https://github.com/thinx-cloud/Arduino: Update debugging.rst (esp8266#5234) ESP8266httpClient crash-on-destructor bugfix (esp8266#5220) Add stack repainting call to ESP class (esp8266#5221)
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. |
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! |
@suculent Did you try this code using different I2C drivers as master? Bellow I am sending another comment I wrote: |
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. |
Resolved conflicts, fixed style, cleaned up in-progress comments and useless lines of code.