DeweyOxberger
Member
The I2C buffer length in all versions of the wire library is hard-coded to 32 bytes. I must be the only guy in the world who needs it larger (up to 1.1k at times, but typically more like 53, 350, or 530 bytes).
If I cook up a way to make it settable what are the odds I can get that code included in the Teensy's wire library? I really want to ship code to people and have it compile with no hassle. (We ship Teensy3.2 based demo systems - see Cirque.com. People have to edit the buffer length in the library to get the code to work).
I'm leaning toward factoring the code to use a pointer to the buffer and a buffer length variable (it will create a 32 byte version by default). I could then write an overload to Wire.begin() or add a new Wire.assignBuffer() that lets me redirect the buffer and length. It's more of a ram footprint. This only needs to work with Teensy3.2, 3.5, 3.6, and 4.0.
The real goal is I need an easy way to redefine the buffer length for a project with zero hassle for a customer but something that makes it obvious that we are setting the buffer length (so people can clearly see what length they'll need).
How should I proceed?
If I cook up a way to make it settable what are the odds I can get that code included in the Teensy's wire library? I really want to ship code to people and have it compile with no hassle. (We ship Teensy3.2 based demo systems - see Cirque.com. People have to edit the buffer length in the library to get the code to work).
I'm leaning toward factoring the code to use a pointer to the buffer and a buffer length variable (it will create a 32 byte version by default). I could then write an overload to Wire.begin() or add a new Wire.assignBuffer() that lets me redirect the buffer and length. It's more of a ram footprint. This only needs to work with Teensy3.2, 3.5, 3.6, and 4.0.
The real goal is I need an easy way to redefine the buffer length for a project with zero hassle for a customer but something that makes it obvious that we are setting the buffer length (so people can clearly see what length they'll need).
How should I proceed?