Skip to content

Implement Wire #181

Closed
Closed
@jgfoster

Description

@jgfoster

cpp/arduino/Wire.h has a number of // TODO comments. I'd like to complete the implementation and would appreciate guidance (or at least feedback on some ideas).

One extreme would be to pull in an existing implementation with the assumption that a "real" implementation would work by reading and writing pins (pins 20 & 21 on the Duo and Mega2560). With that, it is just like any other code that reads and writes pins.

A middle ground would be to write a new implementation that reads and write pins, but that seems like duplicate work.

The other extreme would be to mock the API at a higher level (and not set pins). Tests would not look at pins but would need to call a new testing API that could get and set values at a higher level than bits on a pin. This could be something added to Godmode or to Wire itself.

I propose a new high-level API (I would want it anyway) and that it be in Wire (I'd prefer not to further pollute Godmode). Thoughts?

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