These initialization functions are called once on startup.
These event functions are called in each cycle of the module event loop.
These functions are called periodically at the specified frequency from the module periodic loop.
<!DOCTYPE module SYSTEM "module.dtd">
<module name="imu_pixhawk6x" dir="imu" task="sensors">
<doc>
<description>
IMU driver for the sensors inside the Pixhawk 6X autopilots
- IMU1: ICM42670
- IMU2: ???
- IMU3: ???
</description>
</doc>
<dep>
<depends>spi_master,i2c,imu_common,imu_heater</depends>
<provides>imu</provides>
</dep>
<header>
<file name="imu_pixhawk6x.h"/>
</header>
<init fun="imu_pixhawk6x_init()"/>
<periodic fun="imu_pixhawk6x_periodic()"/>
<event fun="imu_pixhawk6x_event()"/>
<makefile target="!sim|nps|fbw">
<file name="invensense2.c" dir="peripherals"/>
<file name="invensense3.c" dir="peripherals"/>
<file name="imu_pixhawk6x.c"/>
<configure name="PIXHAWK6X_IMU1_SPI_DEV" default="spi1" case="lower|upper"/>
<configure name="PIXHAWK6X_IMU1_SPI_SLAVE_IDX" default="SPI_SLAVE1"/>
<define name="PIXHAWK6X_IMU1_SPI_DEV" value="$(PIXHAWK6X_IMU1_SPI_DEV_LOWER)"/>
<define name="USE_$(PIXHAWK6X_IMU1_SPI_DEV_UPPER)"/>
<define name="PIXHAWK6X_IMU1_SPI_SLAVE_IDX" value="$(PIXHAWK6X_IMU1_SPI_SLAVE_IDX)"/>
<define name="USE_$(PIXHAWK6X_IMU1_SPI_SLAVE_IDX)"/>
<configure name="PIXHAWK6X_IMU2_SPI_DEV" default="spi2" case="lower|upper"/>
<configure name="PIXHAWK6X_IMU2_SPI_SLAVE_IDX" default="SPI_SLAVE2"/>
<define name="PIXHAWK6X_IMU2_SPI_DEV" value="$(PIXHAWK6X_IMU2_SPI_DEV_LOWER)"/>
<define name="USE_$(PIXHAWK6X_IMU2_SPI_DEV_UPPER)"/>
<define name="PIXHAWK6X_IMU2_SPI_SLAVE_IDX" value="$(PIXHAWK6X_IMU2_SPI_SLAVE_IDX)"/>
<define name="USE_$(PIXHAWK6X_IMU2_SPI_SLAVE_IDX)"/>
<configure name="PIXHAWK6X_IMU3_SPI_DEV" default="spi3" case="lower|upper"/>
<configure name="PIXHAWK6X_IMU3_SPI_SLAVE_IDX" default="SPI_SLAVE3"/>
<define name="PIXHAWK6X_IMU3_SPI_DEV" value="$(PIXHAWK6X_IMU3_SPI_DEV_LOWER)"/>
<define name="USE_$(PIXHAWK6X_IMU3_SPI_DEV_UPPER)"/>
<define name="PIXHAWK6X_IMU3_SPI_SLAVE_IDX" value="$(PIXHAWK6X_IMU3_SPI_SLAVE_IDX)"/>
<define name="USE_$(PIXHAWK6X_IMU3_SPI_SLAVE_IDX)"/>
<define name="IMU_HEATER_GYRO_ID" value="IMU_PIXHAWK2_ID"/>
<define name="IMU_HEATER_TARGET_TEMP" value="45.0"/>
<define name="IMU_HEATER_P_GAIN" value="50.0"/>
<define name="IMU_HEATER_I_GAIN" value="0.07"/>
<test>
<define name="SPI_MASTER"/>
<define name="PIXHAWK6X_IMU1_SPI_DEV" value="spi1"/>
<define name="PIXHAWK6X_IMU1_SPI_SLAVE_IDX" value="1"/>
<define name="PIXHAWK6X_IMU2_SPI_DEV" value="spi2"/>
<define name="PIXHAWK6X_IMU2_SPI_SLAVE_IDX" value="2"/>
<define name="PIXHAWK6X_IMU3_SPI_DEV" value="spi3"/>
<define name="PIXHAWK6X_IMU3_SPI_SLAVE_IDX" value="3"/>
<define name="USE_SPI1"/>
<define name="USE_SPI2"/>
<define name="USE_SPI3"/>
<define name="USE_SPI_SLAVE1"/>
<define name="USE_SPI_SLAVE2"/>
<define name="USE_SPI_SLAVE3"/>
<define name="PERIODIC_FREQUENCY" value="512"/>
<define name="IMU_PIXHAWK6X_PERIODIC_FREQ" value="512"/>
</test>
</makefile>
</module>