32 #include "generated/modules.h"
36 #if !defined PX4FMU_LOWPASS_FILTER && !defined PX4FMU_SMPLRT_DIV
37 #if (PERIODIC_FREQUENCY == 60) || (PERIODIC_FREQUENCY == 120)
41 #define PX4FMU_LOWPASS_FILTER MPU60X0_DLPF_42HZ
42 #define PX4FMU_SMPLRT_DIV 9
43 PRINT_CONFIG_MSG(
"Gyro/Accel output rate is 100Hz at 1kHz internal sampling")
44 #elif PERIODIC_FREQUENCY == 512
48 #define PX4FMU_LOWPASS_FILTER MPU60X0_DLPF_256HZ
49 #define PX4FMU_SMPLRT_DIV 3
52 #error Non-default PERIODIC_FREQUENCY: please define PX4FMU_LOWPASS_FILTER and PX4FMU_SMPLRT_DIV.
Main include for ABI (AirBorneInterface).
uint32_t get_sys_time_usec(void)
Get the time in microseconds since startup.
process_rx_dma_interrupt & spi1
receive transferred over DMA
void hmc58xx_init(struct Hmc58xx *hmc, struct i2c_periph *i2c_p, uint8_t addr)
Initialize Hmc58xx struct and set default config options.
void hmc58xx_event(struct Hmc58xx *hmc)
static void hmc58xx_periodic(struct Hmc58xx *hmc)
convenience function: read or start configuration if not already initialized
volatile bool data_available
data ready flag
Register defs for Honeywell HMC5843 and HMC5883 magnetometers.
void imu_set_defaults_accel(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Vect3 *neutral, const struct Int32Vect3 *scale)
Set the defaults for a accel sensor WARNING: Should be called before sensor is publishing messages to...
void imu_set_defaults_gyro(uint8_t abi_id, const struct Int32RMat *imu_to_sensor, const struct Int32Rates *neutral, const struct Int32Rates *scale)
Set the defaults for a gyro sensor WARNING: Should be called before sensor is publishing messages to ...
Inertial Measurement Unit interface.
void imu_px4fmu_periodic(void)
void imu_px4fmu_init(void)
struct ImuPx4fmu imu_px4fmu
void imu_px4fmu_event(void)
Driver for the PX4FMU SPI1 for the MPU6000 and I2C2 for the HMC5883.
#define PX4FMU_GYRO_RANGE
#define PX4FMU_ACCEL_RANGE
PRINT_CONFIG_MSG("USE_INS_NAV_INIT defaulting to TRUE")
const struct Int32Rates MPU60X0_GYRO_SENS_FRAC[4][2]
const struct Int32Vect3 MPU60X0_ACCEL_SENS_FRAC[4][2]
uint8_t smplrt_div
Sample rate divider.
enum Mpu60x0DLPF dlpf_cfg
Digital Low Pass Filter.
enum Mpu60x0AccelRanges accel_range
g Range
enum Mpu60x0GyroRanges gyro_range
deg/s Range
void mpu60x0_spi_event(struct Mpu60x0_Spi *mpu)
void mpu60x0_spi_init(struct Mpu60x0_Spi *mpu, struct spi_periph *spi_p, uint8_t slave_idx)
volatile bool data_available
data ready flag
struct Mpu60x0Config config
float temp
temperature in degrees Celcius
union Mpu60x0_Spi::@342 data_rates
static void mpu60x0_spi_periodic(struct Mpu60x0_Spi *mpu)
convenience function: read or start configuration if not already initialized
union Mpu60x0_Spi::@341 data_accel
PRINT_CONFIG_VAR(ONELOOP_ANDI_FILT_CUTOFF)
Architecture independent SPI (Serial Peripheral Interface) API.
unsigned int uint32_t
Typedef defining 32 bit unsigned int type.