@@ -1723,6 +1723,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
1723
1723
unsigned char data_output_control_reg [2 ];
1724
1724
data_output_control_reg [0 ] = (unsigned char )(delta >> 8 );
1725
1725
data_output_control_reg [1 ] = (unsigned char )(delta & 0xff );
1726
+ pdev -> _dataOutCtl1 = delta ; // Diagnostics
1726
1727
result = inv_icm20948_write_mems (pdev , DATA_OUT_CTL1 , 2 , (const unsigned char * )& data_output_control_reg );
1727
1728
if (result != ICM_20948_Stat_Ok )
1728
1729
{
@@ -1732,6 +1733,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
1732
1733
// Write the 'header2' sensor control bits into memory address DATA_OUT_CTL2
1733
1734
data_output_control_reg [0 ] = (unsigned char )(delta2 >> 8 );
1734
1735
data_output_control_reg [1 ] = (unsigned char )(delta2 & 0xff );
1736
+ pdev -> _dataOutCtl2 = delta2 ; // Diagnostics
1735
1737
result = inv_icm20948_write_mems (pdev , DATA_OUT_CTL2 , 2 , (const unsigned char * )& data_output_control_reg );
1736
1738
if (result != ICM_20948_Stat_Ok )
1737
1739
{
@@ -1741,6 +1743,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
1741
1743
// Set the DATA_RDY_STATUS register
1742
1744
data_output_control_reg [0 ] = (unsigned char )(data_rdy_status >> 8 );
1743
1745
data_output_control_reg [1 ] = (unsigned char )(data_rdy_status & 0xff );
1746
+ pdev -> _dataRdyStatus = data_rdy_status ; // Diagnostics
1744
1747
result = inv_icm20948_write_mems (pdev , DATA_RDY_STATUS , 2 , (const unsigned char * )& data_output_control_reg );
1745
1748
if (result != ICM_20948_Stat_Ok )
1746
1749
{
@@ -1764,6 +1767,7 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor(ICM_20948_Device_t *pdev, enum
1764
1767
// Set the MOTION_EVENT_CTL register
1765
1768
data_output_control_reg [0 ] = (unsigned char )(inv_event_control >> 8 );
1766
1769
data_output_control_reg [1 ] = (unsigned char )(inv_event_control & 0xff );
1770
+ pdev -> _motionEventCtl = inv_event_control ; // Diagnostics
1767
1771
result = inv_icm20948_write_mems (pdev , MOTION_EVENT_CTL , 2 , (const unsigned char * )& data_output_control_reg );
1768
1772
if (result != ICM_20948_Stat_Ok )
1769
1773
{
@@ -1836,11 +1840,6 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor_int(ICM_20948_Device_t *pdev,
1836
1840
}
1837
1841
}
1838
1842
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
-
1844
1843
result = ICM_20948_sleep (pdev , false); // Make sure chip is awake
1845
1844
if (result != ICM_20948_Stat_Ok )
1846
1845
{
@@ -1853,6 +1852,12 @@ ICM_20948_Status_e inv_icm20948_enable_dmp_sensor_int(ICM_20948_Device_t *pdev,
1853
1852
return result ;
1854
1853
}
1855
1854
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
+
1856
1861
// Write the interrupt control bits into memory address DATA_INTR_CTL
1857
1862
result = inv_icm20948_write_mems (pdev , DATA_INTR_CTL , 2 , (const unsigned char * )& data_intr_ctl );
1858
1863
0 commit comments