Rob,
It’s a trade-off. The AVRs have very limited RAM, and this buffer is essentially statically defined. Most folks, I think, use I2C to send very small messages, and so the extra is wasted. I have wanted to make the default smaller, since I get more people asking me to streamline it than expand it…
On the other hand, two extra bytes are unlikely to break the bank.
This is a perfect example of a case where being able to pass #DEFINES to a library would be a huge win.
Cheers,
Todd
--
You received this message because you are subscribed to the Google Groups "Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
developers+...@arduino.cc.
I have wanted to make the default smaller,
It sounds like, as Paul has done, I’ve spent a lot of time digging through the Wire library. (There are a number of bugs in the statemachine…)
Let me clean up what I have and I’ll submit it…
Thanks Paul for this insight of the 5 buffers...,So maybe we need a complete rewrite of the Wire library to use less buffers
and name it I2C ?
Paul,
What is your concern WRT compatibility? (Just kidding)
I’m happy to work on that, unless you have it done already… The existing API is, in my opinion, both hard to use, and really hard to code efficiently.
From: Paul Stoffregen [mailto:pa...@pjrc.com]
Sent: Wednesday, November 13, 2013 11:05 AM
To: Rob Tillaart
Cc: Arduino Developers
Imho a test suite / verification approach is needed for something as fundamental as the I2C implementation for Arduino... has any work been done on that front?
That is to say, for a chance to be accepted, it must be demonstrates to work on some subset of real, agreed upon hardware and use-cases.
Regards,
Vic
p.s. I'm desperately hoping to not open a whole other can of worms here.