Skip to content
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

Add requestFrom(uint8_t address, size_t len, bool stopBit) #34

Closed
gannaramu opened this issue Oct 19, 2021 · 1 comment
Closed

Add requestFrom(uint8_t address, size_t len, bool stopBit) #34

gannaramu opened this issue Oct 19, 2021 · 1 comment

Comments

@gannaramu
Copy link

The teensy wire library is currently missing the following function prototype:

requestFrom(uint8_t address, size_t len, bool stopBit)

as per the API requirement from Arduino
https://github.com/arduino/ArduinoCore-API/blob/173e8eadced2ad32eeb93bcbd5c49f8d6a055ea6/api/HardwareI2C.h#L39

as suggested by @facchinm at arduino-libraries/ArduinoECCX08#30 (comment)

@torntrousers I really like the begin() overload; about the requestFrom change, I'd prefer to have the whole code without ifdefs, since the ESP32 version could not read more than 256 bytes and would wrap if more are requested while the other can (this shouldn't hurt the behaviour of the library but it's not very clear anyway).

Maybe it's better to convince the ESP32 people to patch their core to be compliant with the API specifications https://github.com/arduino/ArduinoCore-API/blob/173e8eadced2ad32eeb93bcbd5c49f8d6a055ea6/api/HardwareI2C.h#L39 😉

@gannaramu
Copy link
Author

fixed in 2499ec6

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant