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

Compile error due to type parameters I2C #19

Open
RobTillaart opened this issue Mar 5, 2025 · 0 comments
Open

Compile error due to type parameters I2C #19

RobTillaart opened this issue Mar 5, 2025 · 0 comments

Comments

@RobTillaart
Copy link

See - https://forum.arduino.cc/t/sparkfun-apds-9960-gesturetest-on-avery-compile-error/1360155/13

The library has two places where it uses Wire.requestFrom() in the .cpp file

line 2193 - Wire.requestFrom(APDS9960_I2C_ADDR, 1);
line 2221 - Wire.requestFrom(APDS9960_I2C_ADDR, len);

Fix is to cast the parameters to the same type e.g. (uint8_t)

line 2193 - Wire.requestFrom((uint8_t) APDS9960_I2C_ADDR, (uint8_t) 1);
line 2221 - Wire.requestFrom((uint8_t) APDS9960_I2C_ADDR, (uint8_t) len);

Thanks for your time,
Rob

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