mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-06-01 02:55:07 +08:00
Board support: UVify Core. As Core is not using SPI4 as external, SPI4 external interface related code removed.
Also, PMW3901 flow sensor is added on SPI2 bus.
This commit is contained in:
@@ -189,7 +189,7 @@ CONFIG_STM32_SPI1=y
|
|||||||
CONFIG_STM32_SPI1_DMA=y
|
CONFIG_STM32_SPI1_DMA=y
|
||||||
CONFIG_STM32_SPI1_DMA_BUFFER=1024
|
CONFIG_STM32_SPI1_DMA_BUFFER=1024
|
||||||
CONFIG_STM32_SPI2=y
|
CONFIG_STM32_SPI2=y
|
||||||
CONFIG_STM32_SPI4=y
|
CONFIG_STM32_SPI4=n
|
||||||
CONFIG_STM32_SPI_DMA=y
|
CONFIG_STM32_SPI_DMA=y
|
||||||
CONFIG_STM32_SPI_DMATHRESHOLD=8
|
CONFIG_STM32_SPI_DMATHRESHOLD=8
|
||||||
CONFIG_STM32_TIM10=y
|
CONFIG_STM32_TIM10=y
|
||||||
|
|||||||
@@ -46,14 +46,13 @@ constexpr px4_spi_bus_t px4_spi_buses[SPI_BUS_MAX_BUS_ITEMS] = {
|
|||||||
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin10}),
|
initSPIDevice(SPIDEV_FLASH(0), SPI::CS{GPIO::PortD, GPIO::Pin10}),
|
||||||
initSPIDevice(DRV_BARO_DEVTYPE_MS5611, SPI::CS{GPIO::PortD, GPIO::Pin7}),
|
initSPIDevice(DRV_BARO_DEVTYPE_MS5611, SPI::CS{GPIO::PortD, GPIO::Pin7}),
|
||||||
initSPIDevice(DRV_BARO_DEVTYPE_MS5607, SPI::CS{GPIO::PortD, GPIO::Pin7}),
|
initSPIDevice(DRV_BARO_DEVTYPE_MS5607, SPI::CS{GPIO::PortD, GPIO::Pin7}),
|
||||||
}),
|
initSPIDevice(DRV_FLOW_DEVTYPE_PMW3901, SPI::CS{GPIO::PortB, GPIO::Pin12})
|
||||||
initSPIBusExternal(SPI::Bus::SPI4, {
|
})
|
||||||
SPI::CS{GPIO::PortA, GPIO::Pin8},
|
|
||||||
}),
|
|
||||||
};
|
};
|
||||||
|
|
||||||
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
|
static constexpr bool unused = validateSPIConfig(px4_spi_buses);
|
||||||
|
|
||||||
|
#if defined(BOARD_HAS_BUS_MANIFEST)
|
||||||
__EXPORT bool board_has_bus(enum board_bus_types type, uint32_t bus)
|
__EXPORT bool board_has_bus(enum board_bus_types type, uint32_t bus)
|
||||||
{
|
{
|
||||||
bool rv = true;
|
bool rv = true;
|
||||||
@@ -73,4 +72,4 @@ __EXPORT bool board_has_bus(enum board_bus_types type, uint32_t bus)
|
|||||||
|
|
||||||
return rv;
|
return rv;
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|||||||
Reference in New Issue
Block a user