From 3cef14482a231eb132855f232e35aa4468168e52 Mon Sep 17 00:00:00 2001 From: David Sidrane Date: Wed, 3 May 2017 15:42:21 -1000 Subject: [PATCH] hmc5883:spi_dev_e is now uint32_t in NuttX Using new type of uint32_t for spi device --- src/drivers/hmc5883/hmc5883_spi.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/drivers/hmc5883/hmc5883_spi.cpp b/src/drivers/hmc5883/hmc5883_spi.cpp index 2710f35802..1b94074d62 100644 --- a/src/drivers/hmc5883/hmc5883_spi.cpp +++ b/src/drivers/hmc5883/hmc5883_spi.cpp @@ -73,7 +73,7 @@ device::Device *HMC5883_SPI_interface(int bus); class HMC5883_SPI : public device::SPI { public: - HMC5883_SPI(int bus, spi_dev_e device); + HMC5883_SPI(int bus, uint32_t device); virtual ~HMC5883_SPI(); virtual int init(); @@ -87,10 +87,10 @@ public: device::Device * HMC5883_SPI_interface(int bus) { - return new HMC5883_SPI(bus, (spi_dev_e)PX4_SPIDEV_HMC); + return new HMC5883_SPI(bus, PX4_SPIDEV_HMC); } -HMC5883_SPI::HMC5883_SPI(int bus, spi_dev_e device) : +HMC5883_SPI::HMC5883_SPI(int bus, uint32_t device) : SPI("HMC5883_SPI", nullptr, bus, device, SPIDEV_MODE3, 11 * 1000 * 1000 /* will be rounded to 10.4 MHz */) { _device_id.devid_s.devtype = DRV_MAG_DEVTYPE_HMC5883;