1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #20107 from maribu/cpu/nrf51/periph/i2c.c

cpu/nrf51: fix periph_i2c driver
This commit is contained in:
Marian Buschsieweke 2023-11-24 10:23:57 +00:00 committed by GitHub
commit 60676bfd5c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -103,7 +103,7 @@ static int write(i2c_t dev, uint16_t addr, const void *data, int len,
}
}
return len;
return 0;
}
void i2c_init(i2c_t dev)
@ -198,7 +198,7 @@ int i2c_read_bytes(i2c_t dev, uint16_t address, void *data, size_t length,
while (i2c(dev)->EVENTS_STOPPED == 0) {}
NRF_PPI->CHENCLR = (1 << i2c_config[dev].ppi);
return length;
return 0;
}
int i2c_read_regs(i2c_t dev, uint16_t address, uint16_t reg,