mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-05-01 05:04:07 +08:00
lis3mdl:spi_dev_e is now uint32_t in NuttX
Using new type of uint32_t for spi device
This commit is contained in:
parent
44a07e7084
commit
7df27aa344
@ -70,7 +70,7 @@ device::Device *LIS3MDL_SPI_interface(int bus);
|
||||
class LIS3MDL_SPI : public device::SPI
|
||||
{
|
||||
public:
|
||||
LIS3MDL_SPI(int bus, spi_dev_e device);
|
||||
LIS3MDL_SPI(int bus, uint32_t device);
|
||||
virtual ~LIS3MDL_SPI();
|
||||
|
||||
virtual int init();
|
||||
@ -82,10 +82,10 @@ public:
|
||||
device::Device *
|
||||
LIS3MDL_SPI_interface(int bus)
|
||||
{
|
||||
return new LIS3MDL_SPI(bus, (spi_dev_e)PX4_SPIDEV_LIS);
|
||||
return new LIS3MDL_SPI(bus, PX4_SPIDEV_LIS);
|
||||
}
|
||||
|
||||
LIS3MDL_SPI::LIS3MDL_SPI(int bus, spi_dev_e device) :
|
||||
LIS3MDL_SPI::LIS3MDL_SPI(int bus, uint32_t device) :
|
||||
SPI("LIS3MDL_SPI", nullptr, bus, device, SPIDEV_MODE3, 11 * 1000 * 1000 /* will be rounded to 10.4 MHz */)
|
||||
{
|
||||
_device_id.devid_s.devtype = DRV_MAG_DEVTYPE_LIS3MDL;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user