@@ -1723,6 +1723,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
17231723 unsigned char data_output_control_reg [2 ];
17241724 data_output_control_reg [0 ] = (unsigned char )(delta >> 8 );
17251725 data_output_control_reg [1 ] = (unsigned char )(delta & 0xff );
1726+ pdev -> _dataOutCtl1 = delta ; // Diagnostics
17261727 result = inv_icm20948_write_mems (pdev , DATA_OUT_CTL1 , 2 , (const unsigned char * )& data_output_control_reg );
17271728 if (result != ICM_20948_Stat_Ok )
17281729 {
@@ -1732,6 +1733,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
17321733 // Write the 'header2' sensor control bits into memory address DATA_OUT_CTL2
17331734 data_output_control_reg [0 ] = (unsigned char )(delta2 >> 8 );
17341735 data_output_control_reg [1 ] = (unsigned char )(delta2 & 0xff );
1736+ pdev -> _dataOutCtl2 = delta2 ; // Diagnostics
17351737 result = inv_icm20948_write_mems (pdev , DATA_OUT_CTL2 , 2 , (const unsigned char * )& data_output_control_reg );
17361738 if (result != ICM_20948_Stat_Ok )
17371739 {
@@ -1741,6 +1743,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
17411743 // Set the DATA_RDY_STATUS register
17421744 data_output_control_reg [0 ] = (unsigned char )(data_rdy_status >> 8 );
17431745 data_output_control_reg [1 ] = (unsigned char )(data_rdy_status & 0xff );
1746+ pdev -> _dataRdyStatus = data_rdy_status ; // Diagnostics
17441747 result = inv_icm20948_write_mems (pdev , DATA_RDY_STATUS , 2 , (const unsigned char * )& data_output_control_reg );
17451748 if (result != ICM_20948_Stat_Ok )
17461749 {
@@ -1764,6 +1767,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
17641767 // Set the MOTION_EVENT_CTL register
17651768 data_output_control_reg [0 ] = (unsigned char )(inv_event_control >> 8 );
17661769 data_output_control_reg [1 ] = (unsigned char )(inv_event_control & 0xff );
1770+ pdev -> _motionEventCtl = inv_event_control ; // Diagnostics
17671771 result = inv_icm20948_write_mems (pdev , MOTION_EVENT_CTL , 2 , (const unsigned char * )& data_output_control_reg );
17681772 if (result != ICM_20948_Stat_Ok )
17691773 {
@@ -1836,11 +1840,6 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor_int(ICM_20948_Device_t *pdev,
18361840 }
18371841 }
18381842
1839- unsigned char data_intr_ctl [2 ];
1840-
1841- data_intr_ctl [0 ] = (unsigned char )(delta >> 8 );
1842- data_intr_ctl [1 ] = (unsigned char )(delta & 0xff );
1843-
18441843 result = ICM_20948_sleep (pdev , false); // Make sure chip is awake
18451844 if (result != ICM_20948_Stat_Ok )
18461845 {
@@ -1853,6 +1852,12 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor_int(ICM_20948_Device_t *pdev,
18531852 return result ;
18541853 }
18551854
1855+ unsigned char data_intr_ctl [2 ];
1856+
1857+ data_intr_ctl [0 ] = (unsigned char )(delta >> 8 );
1858+ data_intr_ctl [1 ] = (unsigned char )(delta & 0xff );
1859+ pdev -> _dataIntrCtl = delta ; // Diagnostics
1860+
18561861 // Write the interrupt control bits into memory address DATA_INTR_CTL
18571862 result = inv_icm20948_write_mems (pdev , DATA_INTR_CTL , 2 , (const unsigned char * )& data_intr_ctl );
18581863
0 commit comments