-
Notifications
You must be signed in to change notification settings - Fork 1k
Add new method to Wire library #124
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
This would definitely improve performances - possibly significantly |
Same issue for |
I doub't it will add much, if any, i/o performance given that Wire runs as 100Khz by default. Now from a functional perspective, if the new functions could handle arbitrary transfer sizes by doing multiple smaller sized blocks to fully send/receive larger blocks of data on behalf of the application, that would be a very beneficial feature. |
In fact, increase performance is not the goal of this issue. The goal of this issue is to avoid a problem of memory usage. A size of 32 bytes in the internal buffer (inside the library) is enough for most of applications but sometime you need to exchange more than 32 bytes in one time. So to not increase the memory usage (when not needed), a new method is added to use a buffer with a size known by the application. The STM32 HAL is able to manage a large number of bytes but not the Wire library without the patch #131 |
Currently, I've an issue with an I2C eeprom with this patch on lower address. I'm searching why. |
It seems necessary to add a new method to the Wire library to avoid buffer limitation.
We could create a method which pass directly a buffer of data to send directly to the i2c core without to use the
write()
method several time:uint8_t write(uint8_t *buffer, uint16_t size);
shouldn't callwrite(data[i])
but save and pass the pointer toendTransmission()
.The text was updated successfully, but these errors were encountered: