mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-19 00:43:34 +08:00
px4_fmu-v4: add runtime external SPI4 detection to support pmw3901 (#11301)
* The build is built with SPI4. At run time the signal GPIO_8266_GPIO2 it tested. If it is low the SPI4 is configured. If it is high SPI4 is not configured. * board_common: Add Notion of Board has bus manifest
This commit is contained in:
committed by
Daniel Agar
parent
53a127beb9
commit
6f9a9b3d2c
@@ -94,7 +94,14 @@ SPI::init()
|
||||
|
||||
/* attach to the spi bus */
|
||||
if (_dev == nullptr) {
|
||||
_dev = px4_spibus_initialize(get_device_bus());
|
||||
int bus = get_device_bus();
|
||||
|
||||
if (!board_has_bus(BOARD_SPI_BUS, bus)) {
|
||||
ret = -ENOENT;
|
||||
goto out;
|
||||
}
|
||||
|
||||
_dev = px4_spibus_initialize(bus);
|
||||
}
|
||||
|
||||
if (_dev == nullptr) {
|
||||
|
||||
Reference in New Issue
Block a user