自学内容网 自学内容网

ICM20948 DMP代码详解(68)

接前一篇文章:ICM20948 DMP代码详解(67)

 

上一回先解析了inv_icm20948_set_gyro_fullscale函数的第3段代码。本回翻回来解析第2段也是最后一段代码。为了便于理解和回顾,再次贴出inv_icm20948_set_gyro_fullscale函数代码,在EMD-Core\sources\Invn\Devices\Drivers\ICM20948\Icm20948DataBaseDriver.c中,如下:

int inv_icm20948_set_gyro_fullscale(struct inv_icm20948 *s, int level)
{
int result;
s->base_state.gyro_fullscale = level;
result = inv_icm20948_set_icm20948_gyro_fullscale(s, level);
result |= inv_icm20948_set_gyro_sf(s, s->base_state.gyro_div, level);
result |= dmp_icm20948_set_gyro_fsr(s, 250<<level);

return result;
}

原文地址:https://blog.csdn.net/phmatthaus/article/details/142550406

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!