thexeno / HardWire-Arduino-Library

A spinoff of the Arduino Wire library, implements a fully controllable I2C slave.
28 stars 4 forks source link

Registers support #10

Closed an-dr closed 4 years ago

an-dr commented 4 years ago

Hi! I have some project using I2c for communication, for which I've implemented registers for slaves, on top of Wire library an-dr/arduino_i2c_with_regs - quite simple, but useful. I'm using it for Rpi-Arduino communications in my robot.

For me, it would be more useful to have a maintained not only by me library. So I'm interested, what if I implement this king od functional for your library (and, probably, switch to your repo in my projects)?

thexeno commented 4 years ago

Hi!

Feel free to play with it. It is the exact reason why I wrote it: I wanted to use a register model to emulate an RTC chip, and was latching stuff in between I2C transactions. So maybe working with a register model using this library might be a benefit.

If I understand, you want to fork the repo (as you did) and adapting it in your project? If what you implement is useful to merge it back in the original repo, I would be totally fine in discussing it.

But keep in mind, though, that a register model is on a higher/different layer than the I2C protocol itself.

an-dr commented 4 years ago

Nice) So will see what's will turn out of this) I'm closing this and probably will back with the PR after a while and we will have something to discuss