37 #include <px4_platform_common/px4_config.h> 42 #include <px4_platform_common/px4_work_queue/ScheduledWorkItem.hpp> 83 class AK09916 :
public device::I2C, px4::ScheduledWorkItem
89 virtual int init()
override;
97 int setup_master_i2c();
105 uint8_t read_reg(uint8_t reg);
106 void read_block(uint8_t reg, uint8_t *val, uint8_t count);
107 void write_reg(uint8_t reg, uint8_t value);
113 uint32_t _cycle_interval{0};
static constexpr uint8_t AK09916_RESET
static constexpr unsigned AK09916_CONVERSION_INTERVAL_us
static constexpr uint8_t AK09916REG_CNTL2
static constexpr uint8_t AK09916_ST2_HOFL
static constexpr uint8_t AK09916REG_ST1
static constexpr uint8_t AK09916_ST1_DOR
int reset(enum LPS22HB_BUS busid)
Reset the driver.
static constexpr uint8_t AK09916_I2C_ADDR
High-resolution timer with callouts and timekeeping.
perf_counter_t _mag_reads
perf_counter_t _mag_overruns
void init()
Activates/configures the hardware registers.
static constexpr uint8_t AK09916_ST1_DRDY
Definition of commonly used conversions.
Rotation
Enum for board and external compass rotations.
perf_counter_t _mag_errors
Vector< float, 6 > f(float t, const Matrix< float, 6, 1 > &, const Matrix< float, 3, 1 > &)
static constexpr uint8_t AK09916REG_CNTL3
static constexpr uint8_t AK09916_CNTL2_CONTINOUS_MODE_100HZ
perf_counter_t _mag_overflows
static constexpr auto AK09916_DEVICE_PATH_MAG_EXT
static constexpr uint8_t AK09916REG_HXL
static constexpr uint8_t AK09916REG_WIA
static constexpr float AK09916_MAG_RANGE_GA
Performance measuring tools.
static constexpr uint8_t AK09916_DEVICE_ID_A
static constexpr auto AK09916_DEVICE_PATH_MAG
Base class for devices connected via I2C.