mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-26 06:53:34 +08:00
i2c_spi_buses: add support for multiple instances of the same device on a bus
This also simplifies the API a bit, since we anyway have to change the drivers to pass additional information (the bus device index). The orientation flag is merged with the rotation.
This commit is contained in:
@@ -158,11 +158,13 @@ public:
|
||||
|
||||
bool external() const { return px4_spi_bus_external(bus()); }
|
||||
|
||||
int busDeviceIndex() const { return _bus_device_index; }
|
||||
|
||||
private:
|
||||
const FilterType _filter;
|
||||
const uint16_t _devid_driver_index;
|
||||
const int _bus;
|
||||
int _index{-1};
|
||||
int _external_bus_counter{0};
|
||||
int _bus_device_index{0};
|
||||
int _index{0};
|
||||
int _external_bus_counter{1};
|
||||
int _bus_device_index{-1};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user