ICM20948 DMP代码详解(85)
接前一篇文章:ICM20948 DMP代码详解(84)
上一回解析了inv_icm20948_ctrl_enable_sensor函数的大部分代码,只剩下一行代码没有解析。为了便于理解和回顾,再次贴出inv_icm20948_ctrl_enable_sensor函数源码,在EMD-Core\sources\Invn\Devices\Drivers\ICM20948\Icm20948DataBaseControl.c中,如下:
int inv_icm20948_ctrl_enable_sensor(struct inv_icm20948 *s, unsigned char androidSensor, unsigned char enable)
{
int result = 0;
if(sensor_needs_compass(androidSensor))
if(!inv_icm20948_get_compass_availability(s))
return -1;
inv_icm20948_prevent_lpen_control(s);
if( s->mems_put_to_sleep ) {
s->mems_put_to_sleep = 0;
result |&#