mirror of
https://github.com/ArduPilot/ardupilot
synced 2025-01-22 08:38:36 -04:00
AP_HAL_Linux: added SPI support for raspilot
This commit is contained in:
parent
7d329205ec
commit
25cddbcbaa
@ -46,6 +46,16 @@ LinuxSPIDeviceDriver LinuxSPIDeviceManager::_device[] = {
|
||||
LinuxSPIDeviceDriver(2, 0, AP_HAL::SPIDevice_MPU9250, SPI_MODE_3, 8, SPI_CS_KERNEL, 1*MHZ, 20*MHZ),
|
||||
LinuxSPIDeviceDriver(2, 1, AP_HAL::SPIDevice_MS5611, SPI_MODE_3, 8, SPI_CS_KERNEL, 10*MHZ,10*MHZ),
|
||||
};
|
||||
#elif CONFIG_HAL_BOARD_SUBTYPE == HAL_BOARD_SUBTYPE_LINUX_RASPILOT
|
||||
LinuxSPIDeviceDriver LinuxSPIDeviceManager::_device[] = {
|
||||
/* MPU9250 is restricted to 1MHz for non-data and interrupt registers */
|
||||
LinuxSPIDeviceDriver(0, 0, AP_HAL::SPIDevice_MPU6000, SPI_MODE_3, 8, RPI_GPIO_25, 1*MHZ, 8*MHZ),
|
||||
LinuxSPIDeviceDriver(0, 0, AP_HAL::SPIDevice_MS5611, SPI_MODE_3, 8, RPI_GPIO_23, 1*MHZ, 8*MHZ),
|
||||
LinuxSPIDeviceDriver(0, 0, AP_HAL::SPIDevice_L3GD20, SPI_MODE_3, 8, RPI_GPIO_12, 1*MHZ, 8*MHZ),
|
||||
LinuxSPIDeviceDriver(0, 0, AP_HAL::SPIDevice_LSM303D, SPI_MODE_3, 8, RPI_GPIO_22, 1*MHZ, 8*MHZ),
|
||||
LinuxSPIDeviceDriver(0, 0, AP_HAL::SPIDevice_Dataflash, SPI_MODE_3, 8, RPI_GPIO_5, 1*MHZ, 8*MHZ),
|
||||
LinuxSPIDeviceDriver(0, 0, AP_HAL::SPIDevice_RASPIO, SPI_MODE_3, 8, RPI_GPIO_7, 8*MHZ, 8*MHZ),
|
||||
};
|
||||
#else
|
||||
// empty device table
|
||||
LinuxSPIDeviceDriver LinuxSPIDeviceManager::_device[0];
|
||||
|
Loading…
Reference in New Issue
Block a user