ICM20948 DMP代码详解(54)
接前一篇文章:ICM20948 DMP代码详解(53)
上一回解析了inv_icm20948_compass_dmp_cal函数的大部分代码,本回继续讲解inv_icm20948_compass_dmp_cal函数的余下内容。为了便于理解和回顾,再次贴出inv_icm20948_compass_dmp_cal函数代码,在EMD-Core\sources\Invn\Devices\Drivers\ICM20948\Icm20948AuxCompassAkm.c中,如下:
/**
*  @brief      Set up the soft-iron matrix for compass in DMP.
*  @param[in]  Accel/Gyro mounting matrix
*  @param[in]  Compass mounting matrix
*  @return     0 if successful.
*/int inv_icm20948_compass_dmp_cal(struct inv_icm20948 *s, const signed char *m, const signed char *compass_m)
{int8_t trans[NINE_ELEM];