mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-02 14:41:35 +08:00
mpu9250: start building "NuttX" driver for Linux and QuRT
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user