drivers: use updated I2C SPI driver interface

This commit is contained in:
Beat Küng
2021-07-08 12:59:35 -04:00
committed by Daniel Agar
parent c5aef9d512
commit e644036325
218 changed files with 812 additions and 2001 deletions
+4 -5
View File
@@ -35,11 +35,10 @@
constexpr uint8_t L3GD20::_checked_registers[];
L3GD20::L3GD20(I2CSPIBusOption bus_option, int bus, uint32_t device, enum Rotation rotation, int bus_frequency,
spi_mode_e spi_mode) :
SPI(DRV_GYR_DEVTYPE_L3GD20, MODULE_NAME, bus, device, spi_mode, bus_frequency),
I2CSPIDriver(MODULE_NAME, px4::device_bus_to_wq(get_device_id()), bus_option, bus),
_px4_gyro(get_device_id(), rotation),
L3GD20::L3GD20(const I2CSPIDriverConfig &config) :
SPI(config),
I2CSPIDriver(config),
_px4_gyro(get_device_id(), config.rotation),
_sample_perf(perf_alloc(PC_ELAPSED, MODULE_NAME": read")),
_errors(perf_alloc(PC_COUNT, MODULE_NAME": err")),
_bad_registers(perf_alloc(PC_COUNT, MODULE_NAME": bad_reg")),