Skip to content

TwoWire to support running as I2C Slave, responding to multiple IDs #1

@hattesen

Description

@hattesen

The class TwoWire interface should be updates to operate as I2C Slave responding to multiple Slave IDs.

Header (class TwoWire [Sic!]) file: Wire.h

Implementation file: Wire.cpp

Proposed implementation design

void begin(uint8_t);

Should be overloaded with one, or both, of these alternatives:

// Starting as I2C Slave, responding when the bus master addresses any one of the IDs contained in the slave_ID[]
void begin(uint8_t const* slave_id[]);
// Starting as I2C Slave, responding when the bus master addresses an ID to which the `idPtr(uint8_t const slaveID)` responds `!=0`
bool (*idPtr)(uint8_t const slaveID);

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions