mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-11-04 02:31:35 +08:00
bma180: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
b4a9c1578b
commit
bd185ceb22
@@ -123,7 +123,7 @@ extern "C" { __EXPORT int bma180_main(int argc, char *argv[]); }
|
|||||||
class BMA180 : public device::SPI
|
class BMA180 : public device::SPI
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
BMA180(int bus, spi_dev_e device);
|
BMA180(int bus, uint32_t device);
|
||||||
virtual ~BMA180();
|
virtual ~BMA180();
|
||||||
|
|
||||||
virtual int init();
|
virtual int init();
|
||||||
@@ -229,7 +229,7 @@ private:
|
|||||||
int set_lowpass(unsigned frequency);
|
int set_lowpass(unsigned frequency);
|
||||||
};
|
};
|
||||||
|
|
||||||
BMA180::BMA180(int bus, spi_dev_e device) :
|
BMA180::BMA180(int bus, uint32_t device) :
|
||||||
SPI("BMA180", ACCEL_DEVICE_PATH, bus, device, SPIDEV_MODE3, 8000000),
|
SPI("BMA180", ACCEL_DEVICE_PATH, bus, device, SPIDEV_MODE3, 8000000),
|
||||||
_call_interval(0),
|
_call_interval(0),
|
||||||
_reports(nullptr),
|
_reports(nullptr),
|
||||||
@@ -784,7 +784,7 @@ start()
|
|||||||
}
|
}
|
||||||
|
|
||||||
/* create the driver */
|
/* create the driver */
|
||||||
g_dev = new BMA180(1 /* XXX magic number */, (spi_dev_e)PX4_SPIDEV_BMA);
|
g_dev = new BMA180(1 /* XXX magic number */, PX4_SPIDEV_BMA);
|
||||||
|
|
||||||
if (g_dev == nullptr) {
|
if (g_dev == nullptr) {
|
||||||
goto fail;
|
goto fail;
|
||||||
|
|||||||
Reference in New Issue
Block a user