HAL_PX4: added different modes for external SPI

and lower bus speed to 1MHz
This commit is contained in:
Andrew Tridgell 2016-11-18 17:31:46 +11:00
parent bcb6663187
commit 60801314e0

View File

@ -85,16 +85,19 @@ SPIDesc SPIDeviceManager::device_table[] = {
#ifdef PX4_SPI_BUS_EXT
#ifdef PX4_SPIDEV_EXT0
SPIDesc("external0", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT0, SPIDEV_MODE3, 5*MHZ, 5*MHZ),
SPIDesc("external0m0", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT0, SPIDEV_MODE0, 2*MHZ, 2*MHZ),
SPIDesc("external0m1", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT0, SPIDEV_MODE1, 2*MHZ, 2*MHZ),
SPIDesc("external0m2", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT0, SPIDEV_MODE2, 2*MHZ, 2*MHZ),
SPIDesc("external0m3", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT0, SPIDEV_MODE3, 2*MHZ, 2*MHZ),
#endif
#ifdef PX4_SPIDEV_EXT1
SPIDesc("external1", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT1, SPIDEV_MODE3, 5*MHZ, 5*MHZ),
SPIDesc("external1", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT1, SPIDEV_MODE3, 2*MHZ, 2*MHZ),
#endif
#ifdef PX4_SPIDEV_EXT2
SPIDesc("external2", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT2, SPIDEV_MODE3, 5*MHZ, 5*MHZ),
SPIDesc("external2", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT2, SPIDEV_MODE3, 2*MHZ, 2*MHZ),
#endif
#ifdef PX4_SPIDEV_EXT3
SPIDesc("external3", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT3, SPIDEV_MODE3, 5*MHZ, 5*MHZ),
SPIDesc("external3", PX4_SPI_BUS_EXT, (spi_dev_e)PX4_SPIDEV_EXT3, SPIDEV_MODE3, 2*MHZ, 2*MHZ),
#endif
#endif