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_cube" dir="imu" task="sensors">
<doc>
<description>
IMU driver for the sensors inside the cube autopilots
- IMU1: ICM20948 (non-isolated)
- IMU2: ICM20602 (isolated)
- IMU3: ICM20649 (isolated)
</description>
</doc>
<dep>
<depends>spi_master,i2c,imu_common,intermcu_iomcu,imu_heater</depends>
<provides>imu</provides>
</dep>
<header>
<file name="imu_cube.h"/>
</header>
<init fun="imu_cube_init()"/>
<periodic fun="imu_cube_periodic()"/>
<event fun="imu_cube_event()"/>
<makefile target="!sim|nps|fbw">
<configure name="CUBE_IMU1_SPI_DEV" default="spi1" case="lower|upper"/>
<configure name="CUBE_IMU1_SPI_SLAVE_IDX" default="SPI_SLAVE2"/>
<define name="CUBE_IMU1_SPI_DEV" value="$(CUBE_IMU1_SPI_DEV_LOWER)"/>
<define name="USE_$(CUBE_IMU1_SPI_DEV_UPPER)"/>
<define name="CUBE_IMU1_SPI_SLAVE_IDX" value="$(CUBE_IMU1_SPI_SLAVE_IDX)"/>
<define name="USE_$(CUBE_IMU1_SPI_SLAVE_IDX)"/>
<configure name="CUBE_IMU2_SPI_DEV" default="spi4" case="lower|upper"/>
<configure name="CUBE_IMU2_SPI_SLAVE_IDX" default="SPI_SLAVE3"/>
<define name="CUBE_IMU2_SPI_DEV" value="$(CUBE_IMU2_SPI_DEV_LOWER)"/>
<define name="USE_$(CUBE_IMU2_SPI_DEV_UPPER)"/>
<define name="CUBE_IMU2_SPI_SLAVE_IDX" value="$(CUBE_IMU2_SPI_SLAVE_IDX)"/>
<define name="USE_$(CUBE_IMU2_SPI_SLAVE_IDX)"/>
<configure name="CUBE_IMU3_SPI_DEV" default="spi4" case="lower|upper"/>
<configure name="CUBE_IMU3_SPI_SLAVE_IDX" default="SPI_SLAVE8"/>
<define name="CUBE_IMU3_SPI_DEV" value="$(CUBE_IMU3_SPI_DEV_LOWER)"/>
<define name="USE_$(CUBE_IMU3_SPI_DEV_UPPER)"/>
<define name="CUBE_IMU3_SPI_SLAVE_IDX" value="$(CUBE_IMU3_SPI_SLAVE_IDX)"/>
<define name="USE_$(CUBE_IMU3_SPI_SLAVE_IDX)"/>
<define name="IMU_HEATER_GYRO_ID" value="IMU_CUBE2_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"/>
<define name="IMU_CUBE_ORANGEPLUS" value="TRUE" cond="ifeq ($(BOARD_VERSION), orange_plus)"/>
<file name="invensense2.c" dir="peripherals"/>
<file name="invensense3.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange_plus)"/>
<file name="mpu60x0.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange)"/>
<file name="mpu60x0_spi.c" dir="peripherals" cond="ifeq ($(BOARD_VERSION), orange)"/>
<file name="imu_cube.c"/>
<test>
<define name="SPI_MASTER"/>
<define name="CUBE_IMU1_SPI_DEV" value="spi1"/>
<define name="CUBE_IMU1_SPI_SLAVE_IDX" value="0"/>
<define name="CUBE_IMU2_SPI_DEV" value="spi4"/>
<define name="CUBE_IMU2_SPI_SLAVE_IDX" value="1"/>
<define name="CUBE_IMU3_SPI_DEV" value="spi4"/>
<define name="CUBE_IMU3_SPI_SLAVE_IDX" value="2"/>
<define name="USE_SPI1"/>
<define name="USE_SPI4"/>
<define name="USE_SPI_SLAVE0"/>
<define name="USE_SPI_SLAVE2"/>
<define name="USE_SPI_SLAVE2"/>
<define name="PERIODIC_FREQUENCY" value="512"/>
<define name="IMU_CUBE_PERIODIC_FREQ" value="512"/>
</test>
</makefile>
</module>