36 PRINT_CONFIG_VAR(IMU_B2_MAG_TYPE)
42 #if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
44 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
46 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
48 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
63 #if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
65 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
67 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
73 #if defined IMU_MAG_45_HACK
78 _imu->
mag.
x = msx - msy;
79 _imu->
mag.
y = msx + msy;
82 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_NONE
93 #if defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_MS2100
106 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_AMI601
107 static inline void foo_handler(
void) {}
120 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC5843
121 static inline void foo_handler(
void) {}
134 #elif defined IMU_B2_MAG_TYPE && IMU_B2_MAG_TYPE == IMU_B2_MAG_HMC58XX
138 if (
imu_b2.mag_hmc.data_available) {
144 imu_b2.mag_hmc.data_available =
false;
148 #define ImuMagEvent() {}
uint16_t max1168_values[MAX1168_NB_CHAN]
void imu_scale_gyro(struct Imu *_imu)
void hmc5843_idle_task(void)
void imu_b2_periodic(void)
#define IMU_MAG_Z_SENS_DEN
void imu_scale_accel(struct Imu *_imu)
Main include for ABI (AirBorneInterface).
void ms2100_event(struct Ms2100 *ms)
volatile uint8_t ami601_status
struct Imu imu
global IMU state
struct Int32Vect3 mag_unscaled
unscaled magnetometer measurements
int32_t r
in rad/s with INT32_RATE_FRAC
#define IMU_MAG_Y_SENS_NUM
#define IMU_MAG_X_SENS_NUM
struct Int32Rates gyro_unscaled
unscaled gyroscope measurements
struct Int32Vect3 accel
accelerometer measurements in m/s^2 in BFP with INT32_ACCEL_FRAC
uint16_t ami601_values[AMI601_NB_CHAN]
struct Int32Vect3 mag_neutral
magnetometer neutral readings (bias) in raw/unscaled units
Architecture independent timing functions.
#define Max1168Periodic()
struct Int32Vect3 mag
magnetometer measurements scaled to 1 in BFP with INT32_MAG_FRAC
Inertial Measurement Unit interface.
#define IMU_MAG_X_SENS_DEN
volatile uint8_t max1168_status
void imu_scale_mag(struct Imu *_imu)
#define MAX1168_DATA_AVAILABLE
#define AMI601Event(_handler)
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
void ms2100_init(struct Ms2100 *ms, struct spi_periph *spi_p, uint8_t slave_idx)
#define IMU_MAG_Z_SENS_NUM
#define AMI601_DATA_AVAILABLE
int32_t p
in rad/s with INT32_RATE_FRAC
arch independent LED (Light Emitting Diodes) API
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
struct Int32Vect3 accel_unscaled
unscaled accelerometer measurements
static void ms2100_periodic(struct Ms2100 *ms)
abstract IMU interface providing fixed point interface
#define ImuMagEvent()
Event functions for imu_b2.
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
void hmc58xx_event(struct Hmc58xx *hmc)
int32_t q
in rad/s with INT32_RATE_FRAC
struct Int32Rates gyro
gyroscope measurements in rad/s in BFP with INT32_RATE_FRAC
#define IMU_MAG_Y_SENS_DEN