PX4 Firmware
PX4 Autopilot Software http://px4.io
|
Common sensor API and ioctl definitions. More...
#include <px4_platform_common/defines.h>
#include <stdint.h>
#include <sys/ioctl.h>
#include "drv_device.h"
Go to the source code of this file.
Common sensor API and ioctl definitions.
Definition in file drv_sensor.h.
#define _SENSORIOC | ( | _n | ) | (_PX4_IOC(_SENSORIOCBASE, _n)) |
Definition at line 128 of file drv_sensor.h.
#define _SENSORIOCBASE (0x2000) |
Definition at line 127 of file drv_sensor.h.
#define DRV_ACC_DEVTYPE_ACCELSIM 0x14 |
Definition at line 68 of file drv_sensor.h.
#define DRV_ACC_DEVTYPE_ADIS16448 0x55 |
Definition at line 106 of file drv_sensor.h.
Referenced by ADIS16448::ADIS16448().
#define DRV_ACC_DEVTYPE_ADIS16477 0x59 |
Definition at line 110 of file drv_sensor.h.
Referenced by ADIS16477::ADIS16477().
#define DRV_ACC_DEVTYPE_ADIS16497 0x63 |
Definition at line 114 of file drv_sensor.h.
Referenced by ADIS16497::ADIS16497().
#define DRV_ACC_DEVTYPE_BMA180 0x12 |
Definition at line 66 of file drv_sensor.h.
Referenced by BMA180::BMA180().
#define DRV_ACC_DEVTYPE_BMI055 0x41 |
Definition at line 92 of file drv_sensor.h.
Referenced by BMI055_accel::BMI055_accel().
#define DRV_ACC_DEVTYPE_BMI160 0x17 |
Definition at line 70 of file drv_sensor.h.
Referenced by BMI160::BMI160().
#define DRV_ACC_DEVTYPE_FXOS8701C 0x52 |
Definition at line 103 of file drv_sensor.h.
Referenced by FXOS8701CQ::FXOS8701CQ().
#define DRV_ACC_DEVTYPE_ICM20602 0x37 |
Definition at line 82 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_ACC_DEVTYPE_ICM20608 0x39 |
Definition at line 84 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_ACC_DEVTYPE_ICM20689 0x3B |
Definition at line 86 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_ACC_DEVTYPE_LSM303AGR 0x61 |
Definition at line 112 of file drv_sensor.h.
#define DRV_ACC_DEVTYPE_LSM303D 0x11 |
Definition at line 65 of file drv_sensor.h.
Referenced by LSM303D::LSM303D().
#define DRV_ACC_DEVTYPE_MPU6000 0x13 |
Definition at line 67 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_ACC_DEVTYPE_MPU6050 0x33 |
Definition at line 78 of file drv_sensor.h.
#define DRV_ACC_DEVTYPE_MPU6500 0x34 |
Definition at line 79 of file drv_sensor.h.
#define DRV_ACC_DEVTYPE_MPU9250 0x16 |
Definition at line 69 of file drv_sensor.h.
Referenced by MPU9250::MPU9250(), and MPU9250_SPI::MPU9250_SPI().
#define DRV_BARO_DEVTYPE_BAROSIM 0x65 |
Definition at line 116 of file drv_sensor.h.
#define DRV_BARO_DEVTYPE_BMP280 0x3F |
Definition at line 90 of file drv_sensor.h.
#define DRV_BARO_DEVTYPE_BMP285 0x44 |
Definition at line 95 of file drv_sensor.h.
#define DRV_BARO_DEVTYPE_LPS22HB 0x58 |
Definition at line 109 of file drv_sensor.h.
Referenced by LPS22HB::LPS22HB().
#define DRV_BARO_DEVTYPE_LPS25H 0x40 |
Definition at line 91 of file drv_sensor.h.
Referenced by LPS25H::LPS25H().
#define DRV_BARO_DEVTYPE_MPL3115A2 0x51 |
Definition at line 102 of file drv_sensor.h.
Referenced by MPL3115A2::MPL3115A2().
#define DRV_BARO_DEVTYPE_MS5607 0x3E |
Definition at line 89 of file drv_sensor.h.
Referenced by MS5611::init().
#define DRV_BARO_DEVTYPE_MS5611 0x3D |
Definition at line 88 of file drv_sensor.h.
Referenced by MS5611::init().
#define DRV_DEVTYPE_BMI088 0x66 |
Definition at line 117 of file drv_sensor.h.
Referenced by BMI088_accel::BMI088_accel(), and BMI088_gyro::BMI088_gyro().
#define DRV_DEVTYPE_BMP388 0x67 |
Definition at line 118 of file drv_sensor.h.
Referenced by BMP388::BMP388().
#define DRV_DEVTYPE_ICM20948 0x0A |
Definition at line 64 of file drv_sensor.h.
Referenced by ICM20948::ICM20948(), and ICM20948_SPI::ICM20948_SPI().
#define DRV_DIFF_PRESS_DEVTYPE_ETS3 0x45 |
Definition at line 96 of file drv_sensor.h.
#define DRV_DIFF_PRESS_DEVTYPE_MS4525 0x46 |
Definition at line 97 of file drv_sensor.h.
Referenced by ETSAirspeed::ETSAirspeed(), and MEASAirspeed::MEASAirspeed().
#define DRV_DIFF_PRESS_DEVTYPE_MS5525 0x47 |
Definition at line 98 of file drv_sensor.h.
Referenced by MS5525::init_ms5525().
#define DRV_DIFF_PRESS_DEVTYPE_SDP31 0x48 |
Definition at line 99 of file drv_sensor.h.
Referenced by Sensors::diff_pres_poll(), and SDP3X::init_sdp3x().
#define DRV_DIFF_PRESS_DEVTYPE_SDP32 0x49 |
Definition at line 100 of file drv_sensor.h.
Referenced by Sensors::diff_pres_poll(), and SDP3X::init_sdp3x().
#define DRV_DIFF_PRESS_DEVTYPE_SDP33 0x50 |
Definition at line 101 of file drv_sensor.h.
Referenced by Sensors::diff_pres_poll(), and SDP3X::init_sdp3x().
#define DRV_GYR_DEVTYPE_ADIS16448 0x57 |
Definition at line 108 of file drv_sensor.h.
Referenced by ADIS16448::ADIS16448().
#define DRV_GYR_DEVTYPE_ADIS16477 0x60 |
Definition at line 111 of file drv_sensor.h.
Referenced by ADIS16477::ADIS16477().
#define DRV_GYR_DEVTYPE_ADIS16497 0x64 |
Definition at line 115 of file drv_sensor.h.
Referenced by ADIS16497::ADIS16497().
#define DRV_GYR_DEVTYPE_BMI055 0x42 |
Definition at line 93 of file drv_sensor.h.
Referenced by BMI055_gyro::BMI055_gyro().
#define DRV_GYR_DEVTYPE_BMI160 0x25 |
Definition at line 75 of file drv_sensor.h.
Referenced by BMI160::BMI160().
#define DRV_GYR_DEVTYPE_FXAS2100C 0x54 |
Definition at line 105 of file drv_sensor.h.
Referenced by FXAS21002C::FXAS21002C().
#define DRV_GYR_DEVTYPE_GYROSIM 0x23 |
Definition at line 73 of file drv_sensor.h.
#define DRV_GYR_DEVTYPE_ICM20602 0x38 |
Definition at line 83 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_GYR_DEVTYPE_ICM20608 0x3A |
Definition at line 85 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_GYR_DEVTYPE_ICM20689 0x3C |
Definition at line 87 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_GYR_DEVTYPE_L3GD20 0x22 |
Definition at line 72 of file drv_sensor.h.
Referenced by L3GD20::L3GD20().
#define DRV_GYR_DEVTYPE_MPU6000 0x21 |
Definition at line 71 of file drv_sensor.h.
Referenced by MPU6000::MPU6000().
#define DRV_GYR_DEVTYPE_MPU6050 0x35 |
Definition at line 80 of file drv_sensor.h.
#define DRV_GYR_DEVTYPE_MPU6500 0x36 |
Definition at line 81 of file drv_sensor.h.
#define DRV_GYR_DEVTYPE_MPU9250 0x24 |
Definition at line 74 of file drv_sensor.h.
Referenced by MPU9250::MPU9250().
#define DRV_MAG_DEVTYPE_ADIS16448 0x56 |
Definition at line 107 of file drv_sensor.h.
Referenced by ADIS16448::ADIS16448().
#define DRV_MAG_DEVTYPE_AK09916 0x09 |
Definition at line 63 of file drv_sensor.h.
Referenced by AK09916::AK09916(), and ICM20948_mag::ICM20948_mag().
#define DRV_MAG_DEVTYPE_BMM150 0x43 |
Definition at line 94 of file drv_sensor.h.
Referenced by BMM150::BMM150().
#define DRV_MAG_DEVTYPE_HMC5883 0x01 |
Sensor type definitions.
Used to create a unique device id for redundant and combo sensors
Definition at line 55 of file drv_sensor.h.
Referenced by HMC5883::HMC5883(), HMC5883_I2C::HMC5883_I2C(), and UavcanMagnetometerBridge::UavcanMagnetometerBridge().
#define DRV_MAG_DEVTYPE_IST8310 0x06 |
Definition at line 60 of file drv_sensor.h.
Referenced by IST8310::IST8310().
#define DRV_MAG_DEVTYPE_LIS3MDL 0x05 |
Definition at line 59 of file drv_sensor.h.
Referenced by LIS3MDL::LIS3MDL().
#define DRV_MAG_DEVTYPE_LSM303AGR 0x62 |
Definition at line 113 of file drv_sensor.h.
Referenced by LSM303AGR::LSM303AGR().
#define DRV_MAG_DEVTYPE_LSM303D 0x02 |
Definition at line 56 of file drv_sensor.h.
Referenced by LSM303D::LSM303D().
#define DRV_MAG_DEVTYPE_MAGSIM 0x03 |
Definition at line 57 of file drv_sensor.h.
#define DRV_MAG_DEVTYPE_MPU9250 0x04 |
Definition at line 58 of file drv_sensor.h.
Referenced by MPU9250_mag::MPU9250_mag().
#define DRV_MAG_DEVTYPE_QMC5883 0x08 |
Definition at line 62 of file drv_sensor.h.
Referenced by QMC5883::QMC5883(), and QMC5883_I2C::QMC5883_I2C().
#define DRV_MAG_DEVTYPE_RM3100 0x07 |
Definition at line 61 of file drv_sensor.h.
Referenced by RM3100::RM3100().
#define DRV_RNG_DEVTYPE_LL40LS 0x32 |
Definition at line 77 of file drv_sensor.h.
#define DRV_RNG_DEVTYPE_MB12XX 0x31 |
Definition at line 76 of file drv_sensor.h.
#define SENSOR_POLLRATE_DEFAULT 1000003 |
poll at driver normal rate
Definition at line 136 of file drv_sensor.h.
Referenced by rm3100::init(), lis3mdl::init(), Airspeed::ioctl(), MPL3115A2::ioctl(), SF0X::ioctl(), LPS22HB::ioctl(), SF1XX::ioctl(), SRF02::ioctl(), LSM303AGR::ioctl(), MS5611::ioctl(), LIS3MDL::ioctl(), HMC5883::ioctl(), RM3100::ioctl(), BMA180::ioctl(), QMC5883::ioctl(), LPS25H::ioctl(), IST8310::ioctl(), BMM150::ioctl(), ms5525_airspeed::reset(), sdp3x_airspeed::reset(), pmw3901::reset(), bmm150::reset(), lps22hb::reset(), rm3100::reset(), lis3mdl::reset(), meas_airspeed::reset(), srf02::reset(), sf1xx::reset(), mpl3115a2::reset(), sf0x::reset(), lps25h::reset(), bma180::reset(), qmc5883::reset(), ist8310::reset(), bmm150::start(), lsm303agr::start(), sf0x::start(), bma180::start(), sdp3x_airspeed::start_bus(), ms5525_airspeed::start_bus(), lps22hb::start_bus(), hmc5883::start_bus(), ms5611::start_bus(), ets_airspeed::start_bus(), meas_airspeed::start_bus(), srf02::start_bus(), sf1xx::start_bus(), mpl3115a2::start_bus(), lps25h::start_bus(), qmc5883::start_bus(), ist8310::start_bus(), bmm150::test(), srf02::test(), sf1xx::test(), and sf0x::test().
#define SENSORIOCRESET _SENSORIOC(4) |
Reset the sensor to its default configuration.
Definition at line 141 of file drv_sensor.h.
Referenced by GPSSIM::devIOCTL(), MPL3115A2::ioctl(), LPS22HB::ioctl(), LSM303AGR::ioctl(), MS5611::ioctl(), LIS3MDL::ioctl(), HMC5883::ioctl(), RM3100::ioctl(), BMA180::ioctl(), QMC5883::ioctl(), LPS25H::ioctl(), PWMIN::ioctl(), IST8310::ioctl(), BMM150::ioctl(), pwmin_reset(), ms5525_airspeed::reset(), sdp3x_airspeed::reset(), pmw3901::reset(), bmm150::reset(), lps22hb::reset(), rm3100::reset(), lis3mdl::reset(), meas_airspeed::reset(), gpssim::reset(), srf02::reset(), sf1xx::reset(), mpl3115a2::reset(), sf0x::reset(), lps25h::reset(), bma180::reset(), qmc5883::reset(), and ist8310::reset().
#define SENSORIOCSPOLLRATE _SENSORIOC(0) |
Set the driver polling rate to (arg) Hz, or one of the SENSOR_POLLRATE constants.
Definition at line 134 of file drv_sensor.h.
Referenced by HMC5883::calibrate(), LIS3MDL::calibrate(), IST8310::calibrate(), do_accel(), do_gyro(), do_mag(), rm3100::init(), lis3mdl::init(), Airspeed::ioctl(), MPL3115A2::ioctl(), SF0X::ioctl(), LPS22HB::ioctl(), SF1XX::ioctl(), SRF02::ioctl(), LSM303AGR::ioctl(), MS5611::ioctl(), LIS3MDL::ioctl(), HMC5883::ioctl(), RM3100::ioctl(), BMA180::ioctl(), QMC5883::ioctl(), LPS25H::ioctl(), IST8310::ioctl(), BMM150::ioctl(), ms5525_airspeed::reset(), sdp3x_airspeed::reset(), pmw3901::reset(), bmm150::reset(), lps22hb::reset(), rm3100::reset(), lis3mdl::reset(), meas_airspeed::reset(), srf02::reset(), sf1xx::reset(), mpl3115a2::reset(), sf0x::reset(), lps25h::reset(), bma180::reset(), qmc5883::reset(), ist8310::reset(), bmm150::start(), lsm303agr::start(), sf0x::start(), bma180::start(), sdp3x_airspeed::start_bus(), ms5525_airspeed::start_bus(), lps22hb::start_bus(), hmc5883::start_bus(), ms5611::start_bus(), ets_airspeed::start_bus(), meas_airspeed::start_bus(), srf02::start_bus(), sf1xx::start_bus(), mpl3115a2::start_bus(), lps25h::start_bus(), qmc5883::start_bus(), ist8310::start_bus(), bmm150::test(), lis3mdl::test(), srf02::test(), sf1xx::test(), and sf0x::test().