Skip to content

Commit 7e6d93d

Browse files
authored
Fix CI build for megaavr by removing ambiguity for requestFrom call. (#20)
This is done by making it clear to the compiler that the constant defining the address is in fact a uint8_t.
1 parent d825b86 commit 7e6d93d

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Arduino_APDS9960.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -258,7 +258,7 @@ bool APDS9960::read(uint8_t reg, uint8_t *val) {
258258
size_t APDS9960::readBlock(uint8_t reg, uint8_t *val, unsigned int len) {
259259
size_t i = 0;
260260
if (!write(reg)) return 0;
261-
_wire.requestFrom(APDS9960_ADDR, len);
261+
_wire.requestFrom((uint8_t)APDS9960_ADDR, len);
262262
while (_wire.available()) {
263263
if (i == len) return 0;
264264
val[i++] = _wire.read();

0 commit comments

Comments
 (0)