mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-04-14 10:07:39 +08:00
hmc5883:spi_dev_e is now uint32_t in NuttX
Using new type of uint32_t for spi device
This commit is contained in:
parent
81bd05d49c
commit
3cef14482a
@ -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;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user