Skip to content

Allow configuring Wire.h buffer size#8388

Closed
flaviut wants to merge 1 commit into
esp8266:masterfrom
flaviut:patch-1
Closed

Allow configuring Wire.h buffer size#8388
flaviut wants to merge 1 commit into
esp8266:masterfrom
flaviut:patch-1

Conversation

@flaviut

@flaviut flaviut commented Nov 27, 2021

Copy link
Copy Markdown
Contributor

This is needed since in some applications, we need much much larger buffers.

See emporia-vue-local/emporia-vue2-reversing#1 (comment)

This is needed since in some applications, we need much much larger buffers.

See emporia-vue-local/emporia-vue2-reversing#1 (comment)
@flaviut

flaviut commented Nov 27, 2021

Copy link
Copy Markdown
Contributor Author

After further investigation prompted by @Maelstrom96's comments elsewhere, this isn't sufficient to allow for the 284 byte payloads we need to handle.

We'd also need #ifs to make sure that the various types aren't uint8_t, but are promoted to uint16_t when the size of the payload is increased. I'd be happy to do that work, if the maintainers would chime in on if that'd be an acceptable solution, or if it'd be better to fork the Wire library.

@flaviut

flaviut commented Nov 27, 2021

Copy link
Copy Markdown
Contributor Author

Whoops! I shouldn't be programming before fully waking up! I'm actually looking to do this on the ESP32, not ESP8266.

I'd be happy to port any changes here too, please re-open this if you'd like me to do that.

@flaviut flaviut closed this Nov 27, 2021
@mcspr

mcspr commented Nov 27, 2021

Copy link
Copy Markdown
Collaborator

See #8388 espressif/arduino-esp32#5172
Might be a good idea to share the name of the setting

@d-a-v

d-a-v commented Nov 27, 2021

Copy link
Copy Markdown
Collaborator

Using int16 or even int32 sometimes generate less code / is faster than when using int8, on this architecture.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants