mpu9250: start building "NuttX" driver for Linux and QuRT

This commit is contained in:
Daniel Agar
2019-11-13 09:21:02 -05:00
parent 6bd4273b9c
commit c5520cbaca
36 changed files with 1159 additions and 869 deletions
+3 -3
View File
@@ -46,7 +46,7 @@
#ifdef USE_I2C
device::Device *AK8963_I2C_interface(int bus, bool external_bus);
device::Device *AK8963_I2C_interface(int bus);
class AK8963_I2C : public device::I2C
{
@@ -63,7 +63,7 @@ protected:
};
device::Device *
AK8963_I2C_interface(int bus, bool external_bus)
AK8963_I2C_interface(int bus)
{
return new AK8963_I2C(bus);
}
@@ -76,7 +76,7 @@ AK8963_I2C::AK8963_I2C(int bus) : I2C("AK8963_I2C", nullptr, bus, AK8963_I2C_ADD
int
AK8963_I2C::write(unsigned reg_speed, void *data, unsigned count)
{
uint8_t cmd[MPU_MAX_WRITE_BUFFER_SIZE];
uint8_t cmd[2] {};
if (sizeof(cmd) < (count + 1)) {
return -EIO;