Browse Source

HAL_PX4: added different modes for external SPI

and lower bus speed to 1MHz
mission-4.1.18
Andrew Tridgell 8 years ago
parent
commit
60801314e0
  1. 11
      libraries/AP_HAL_PX4/SPIDevice.cpp

11
libraries/AP_HAL_PX4/SPIDevice.cpp

@ -85,16 +85,19 @@ SPIDesc SPIDeviceManager::device_table[] = { @@ -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

Loading…
Cancel
Save