mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-22 21:53:33 +08:00
board support add px4_i2c_bus_external/px4_spi_bus_external
This commit is contained in:
committed by
Lorenz Meier
parent
2aeb4aa55f
commit
53595bac0e
@@ -114,7 +114,7 @@ AK8963_I2C::ioctl(unsigned operation, unsigned &arg)
|
||||
switch (operation) {
|
||||
|
||||
case ACCELIOCGEXTERNAL:
|
||||
return _bus == PX4_I2C_BUS_EXPANSION ? 1 : 0;
|
||||
return external();
|
||||
|
||||
case DEVIOCGDEVICEID:
|
||||
return CDev::ioctl(nullptr, operation, arg);
|
||||
|
||||
@@ -112,7 +112,7 @@ MPU9250_I2C::ioctl(unsigned operation, unsigned &arg)
|
||||
switch (operation) {
|
||||
|
||||
case ACCELIOCGEXTERNAL:
|
||||
return _bus == PX4_I2C_BUS_EXPANSION ? 1 : 0;
|
||||
return external();
|
||||
|
||||
case DEVIOCGDEVICEID:
|
||||
return CDev::ioctl(nullptr, operation, arg);
|
||||
|
||||
@@ -168,11 +168,7 @@ MPU9250_SPI::ioctl(unsigned operation, unsigned &arg)
|
||||
switch (operation) {
|
||||
|
||||
case ACCELIOCGEXTERNAL:
|
||||
#if defined(PX4_SPI_BUS_EXT)
|
||||
return _bus == PX4_SPI_BUS_EXT ? 1 : 0;
|
||||
#else
|
||||
return 0;
|
||||
#endif
|
||||
external();
|
||||
|
||||
case DEVIOCGDEVICEID:
|
||||
return CDev::ioctl(nullptr, operation, arg);
|
||||
|
||||
Reference in New Issue
Block a user