Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: Host_Software_MAX32664GWEB_HR_wrist Host_Software_MAX32664GWEC_SpO2_HR Host_Software_MAX32664GWEB_HR_EXTENDED Host_Software_MAX32664GWEC_SpO2_HR-_EXTE ... more
Diff: bmi160.cpp
- Revision:
- 10:9e219f2f1fb3
- Parent:
- 9:ca6b5fecdd63
- Child:
- 12:64931a80340d
--- a/bmi160.cpp Tue Dec 20 01:08:33 2016 +0000
+++ b/bmi160.cpp Tue Dec 20 01:27:13 2016 +0000
@@ -192,3 +192,19 @@
return rtnVal;
}
+
+
+//*****************************************************************************
+int32_t BMI160::getSensorTime(float *data)
+{
+ uint8_t localData[3];
+ int32_t rtnVal = readBlock(SENSORTIME_0, SENSORTIME_2, localData);
+
+ if(rtnVal == RTN_NO_ERROR)
+ {
+ *data = (((localData[2] << 16) | (localData[1] << 8) | localData[0]) * 39e-6);
+ }
+
+ return rtnVal;
+}
+