platforms/common:SPI - fix hang on bords supporting BOARD_HAS_BUS_MANIFEST

This commit is contained in:
David Sidrane
2021-07-09 12:24:23 -07:00
committed by Lorenz Meier
parent d01cec192f
commit f5e5794930
+2 -3
View File
@@ -112,9 +112,7 @@ bool SPIBusIterator::next()
while (_index < SPI_BUS_MAX_BUS_ITEMS && px4_spi_buses[_index].bus != -1) { while (_index < SPI_BUS_MAX_BUS_ITEMS && px4_spi_buses[_index].bus != -1) {
const px4_spi_bus_t &bus_data = px4_spi_buses[_index]; const px4_spi_bus_t &bus_data = px4_spi_buses[_index];
if (!board_has_bus(BOARD_SPI_BUS, bus_data.bus)) { if (board_has_bus(BOARD_SPI_BUS, bus_data.bus)) {
continue;
}
// Note: we use bus_data.is_external here instead of px4_spi_bus_external(), // Note: we use bus_data.is_external here instead of px4_spi_bus_external(),
// otherwise the chip-select matching does not work if a bus is configured as // otherwise the chip-select matching does not work if a bus is configured as
@@ -156,6 +154,7 @@ bool SPIBusIterator::next()
if (bus_data.is_external) { if (bus_data.is_external) {
++_external_bus_counter; ++_external_bus_counter;
} }
}
++_index; ++_index;
_bus_device_index = -1; _bus_device_index = -1;