mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-02-11 02:13:57 -04:00
SITL: add support for multiple i2c buses
This commit is contained in:
parent
bddea9e046
commit
69c97c1565
@ -94,7 +94,7 @@ int I2C::ioctl_rdwr(i2c_rdwr_ioctl_data *data)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!handled) {
|
if (!handled) {
|
||||||
::fprintf(stderr, "Unhandled i2c message: addr=0x%x flags=%u len=%u\n", msg.addr, msg.flags, msg.len);
|
::fprintf(stderr, "Unhandled i2c message: bus=%u addr=0x%02x flags=%u len=%u\n", msg.bus, msg.addr, msg.flags, msg.len);
|
||||||
return -1; // ?!
|
return -1; // ?!
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,6 +40,7 @@ public:
|
|||||||
#define I2C_M_RD 1
|
#define I2C_M_RD 1
|
||||||
#define I2C_RDWR 0
|
#define I2C_RDWR 0
|
||||||
struct i2c_msg {
|
struct i2c_msg {
|
||||||
|
uint8_t bus;
|
||||||
uint8_t addr;
|
uint8_t addr;
|
||||||
uint8_t flags;
|
uint8_t flags;
|
||||||
uint8_t *buf;
|
uint8_t *buf;
|
||||||
|
Loading…
Reference in New Issue
Block a user