ICM20948 DMP代码详解(48)
接前一篇文章:ICM20948 DMP代码详解(47)
上一回解析了inv_icm20948_write_secondary函数的第2段代码,本回解析后续的代码。为了便于理解和回顾,再次贴出该函数源码,在EMD-Core\sources\Invn\Devices\Drivers\ICM20948\Icm20948AuxTransport.c中,如下:
/*
* inv_icm20948_write_secondary(): set secondary registers for writing?.
The chip must be set as bank 3 before calling.
* This is derived from inv_icm20948_write_secondary in linux...
* for now, uses a very simple data struct for the registers
*
* index gives the mapping to the particular SLVx registers
* addr is the physical address of the device to be accessed
* reg is the device register w