mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-15 16:03:34 +08:00
ms5611:spi_dev_e is now uint32_t in NuttX
Using new type of uint32_t for spi device
This commit is contained in:
committed by
Daniel Agar
parent
fcbb99200f
commit
0d2124ce13
@@ -66,7 +66,7 @@ device::Device *MS5611_spi_interface(ms5611::prom_u &prom_buf, bool external_bus
|
||||
class MS5611_SPI : public device::SPI
|
||||
{
|
||||
public:
|
||||
MS5611_SPI(uint8_t bus, spi_dev_e device, ms5611::prom_u &prom_buf);
|
||||
MS5611_SPI(uint8_t bus, uint32_t device, ms5611::prom_u &prom_buf);
|
||||
virtual ~MS5611_SPI();
|
||||
|
||||
virtual int init();
|
||||
@@ -120,17 +120,17 @@ MS5611_spi_interface(ms5611::prom_u &prom_buf, uint8_t busnum)
|
||||
|
||||
if (busnum == PX4_SPI_BUS_EXT) {
|
||||
#ifdef PX4_SPIDEV_EXT_BARO
|
||||
return new MS5611_SPI(busnum, (spi_dev_e)PX4_SPIDEV_EXT_BARO, prom_buf);
|
||||
return new MS5611_SPI(busnum, PX4_SPIDEV_EXT_BARO, prom_buf);
|
||||
#else
|
||||
return nullptr;
|
||||
#endif
|
||||
}
|
||||
|
||||
#endif
|
||||
return new MS5611_SPI(busnum, (spi_dev_e)PX4_SPIDEV_BARO, prom_buf);
|
||||
return new MS5611_SPI(busnum, PX4_SPIDEV_BARO, prom_buf);
|
||||
}
|
||||
|
||||
MS5611_SPI::MS5611_SPI(uint8_t bus, spi_dev_e device, ms5611::prom_u &prom_buf) :
|
||||
MS5611_SPI::MS5611_SPI(uint8_t bus, uint32_t device, ms5611::prom_u &prom_buf) :
|
||||
SPI("MS5611_SPI", nullptr, bus, device, SPIDEV_MODE3, 20 * 1000 * 1000 /* will be rounded to 10.4 MHz */),
|
||||
_prom(prom_buf)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user