arduino / arduino/ArduinoCore-samd

Size of ring buffer limiting size of I2C (and other) messages

Open
#285 5 comments 0 reactions 0 assignees View on GitHub
Dominant language
C
Stars
502
Forks
740
PR merge metrics
No merged PRs in 30d

Description

The Wire library relies on the ring buffer object and the size of the buffer is hard-coded, therefore limiting the size of any outgoing or incoming messages. https://github.com/arduino/ArduinoCore-samd/blob/8f5e2eb58cb91d68c45449b00ed2a7aca794978b/cores/arduino/RingBuffer.h#L28

For instance, there should be no limitation to the size of messages in the I2C protocol, other than the available memory in the devices that are communicating. 64 bytes are not much when a lot of data needs to be transmitted, and splitting messages is not always an option.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start with the RingBuffer definition at cores/arduino/RingBuffer.h#L28 and trace how the Wire library uses it for incoming and outgoing I2C data. Determine how the fixed 64-byte capacity constrains messages and define completion as supporting larger messages within the device's available memory without breaking existing Wire behavior.

Written by the indexing model from the issue text.

Assessment

Tech stack
c
Domain
embedded-iot
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.