Skip to content

Wire: limit buffer size allocation #1539

Closed
@fpistm

Description

@fpistm

Currently, built-in Wire library dynamically allocate Rx and Tx Buffer and raised an error when no more space are available.
(TwoWire::allocateRxBuffer and TwoWire::allocateTxBuffer)
Goal of this issue is to add a maximum buffer length and return 0 if it is reached to allow application to know the buffer is full and need to be flushed (endTransmission).
Ex: https://github.com/simondlevy/VL53L5/blob/b81b3d1bef74bdecbe7615e3a498a8648a2fdd0d/src/st/platform.cpp#L117-L140

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions