mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-03 21:11:36 +08:00
drivers: use updated I2C SPI driver interface
This commit is contained in:
@@ -40,10 +40,10 @@ static constexpr int16_t combine(uint8_t msb, uint8_t lsb)
|
||||
return (msb << 8u) | lsb;
|
||||
}
|
||||
|
||||
IST8310::IST8310(I2CSPIBusOption bus_option, int bus, uint8_t addr, int bus_frequency, enum Rotation rotation) :
|
||||
I2C(DRV_MAG_DEVTYPE_IST8310, MODULE_NAME, bus, addr, bus_frequency),
|
||||
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus, addr),
|
||||
_px4_mag(get_device_id(), rotation)
|
||||
IST8310::IST8310(const I2CSPIDriverConfig &config) :
|
||||
I2C(config),
|
||||
I2CSPIDriver(config),
|
||||
_px4_mag(get_device_id(), config.rotation)
|
||||
{
|
||||
_px4_mag.set_external(external());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user