34 #ifndef DRIVERS_IMU_LSM303AGR_LSM303AGR_HPP_ 35 #define DRIVERS_IMU_LSM303AGR_LSM303AGR_HPP_ 45 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 91 class LSM303AGR :
public device::SPI,
public px4::ScheduledWorkItem
99 virtual int ioctl(
struct file *filp,
int cmd,
unsigned long arg);
111 bool _collect_phase{
false};
113 unsigned _measure_interval{0};
115 unsigned _call_mag_interval{0};
119 static constexpr
float _mag_range_scale{1.5f / 1000.0f};
120 static constexpr
float _mag_range_ga{49.152f};
122 int _class_instance{-1};
124 unsigned _mag_samplerate{100};
188 uint8_t read_reg(
unsigned reg);
196 void write_reg(
unsigned reg, uint8_t value);
static constexpr uint8_t CFG_REG_C_M_I2C_DIS
static constexpr uint8_t CFG_REG_A_M_SOFT_RST
static constexpr uint8_t CFG_REG_C_M_BDU
static constexpr uint8_t CFG_REG_A_M_ODR0
static int _mag_orb_class_instance
instance handle for mag devices
mag scaling factors; Vout = (Vin * Vscale) + Voffset
static constexpr uint8_t OUTY_H_REG_M
int reset(enum LPS22HB_BUS busid)
Reset the driver.
Namespace encapsulating all device framework classes, functions and data.
High-resolution timer with callouts and timekeeping.
static constexpr uint8_t CFG_REG_A_M_MD1
static constexpr uint8_t CFG_REG_A_M
static constexpr uint8_t WHO_AM_I_M
perf_counter_t _bad_values
static constexpr uint8_t CFG_REG_B_M_OFF_CANC
static constexpr uint8_t CFG_REG_C_M_Self_test
void init()
Activates/configures the hardware registers.
static constexpr uint8_t CFG_REG_A_M_ODR1
Rotation
Enum for board and external compass rotations.
static constexpr uint8_t CFG_REG_C_M
Simple error/warning functions, heavily inspired by the BSD functions of the same names...
__BEGIN_DECLS typedef void * orb_advert_t
ORB topic advertiser handle.
static constexpr uint8_t OUTY_L_REG_M
static constexpr uint8_t OUTX_L_REG_M
static constexpr uint8_t OUTZ_L_REG_M
static constexpr uint8_t OUTZ_H_REG_M
struct @83::@85::@87 file
perf_counter_t _mag_sample_perf
static constexpr uint8_t STATUS_REG_M_Zyxda
static constexpr uint8_t STATUS_REG_M
static constexpr uint8_t CFG_REG_B_M
static constexpr uint8_t CFG_REG_B_M_OFF_LPF
perf_counter_t _bad_registers
static constexpr uint8_t OUTX_H_REG_M
static constexpr uint8_t CFG_REG_A_M_MD0
Performance measuring tools.