mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 13:13:33 +08:00
tap-v1:spi_dev_e is now uint32_t in NuttX
Using new type of uint32_t for spi device and macros that define a PX4 device on a given BUS and Chip Select
This commit is contained in:
committed by
Daniel Agar
parent
dad290a8fc
commit
69661df783
@@ -72,13 +72,13 @@ __EXPORT void stm32_spiinitialize(void)
|
||||
}
|
||||
|
||||
|
||||
__EXPORT void stm32_spi2select(FAR struct spi_dev_s *dev, enum spi_dev_e devid, bool selected)
|
||||
__EXPORT void stm32_spi2select(FAR struct spi_dev_s *dev, uint32_t devid, bool selected)
|
||||
{
|
||||
/* there can only be one device on this bus, so always select it */
|
||||
stm32_gpiowrite(GPIO_SPI_CS_SDCARD, !selected);
|
||||
}
|
||||
|
||||
__EXPORT uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, enum spi_dev_e devid)
|
||||
__EXPORT uint8_t stm32_spi2status(FAR struct spi_dev_s *dev, uint32_t devid)
|
||||
{
|
||||
return !stm32_gpioread(GPIO_SPI_SD_SW);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user