fxos8701cq + fxas21002c: add support for I2C

This commit is contained in:
rfu
2020-05-04 09:49:23 +02:00
committed by Beat Küng
parent 09180b9d4a
commit 90c3819df5
32 changed files with 1193 additions and 297 deletions
+2 -2
View File
@@ -117,7 +117,7 @@ L3GD20::read_reg(unsigned reg)
return cmd[1];
}
void
int
L3GD20::write_reg(unsigned reg, uint8_t value)
{
uint8_t cmd[2] {};
@@ -125,7 +125,7 @@ L3GD20::write_reg(unsigned reg, uint8_t value)
cmd[0] = reg | DIR_WRITE;
cmd[1] = value;
transfer(cmd, nullptr, sizeof(cmd));
return transfer(cmd, nullptr, sizeof(cmd));
}
void