Contains added code for stm32-L432KC compatibility

Dependents:   BNO080_stm32_compatible

Revision:
3:197ad972fb7c
Parent:
1:aac28ffd63ed
--- a/BNO080Constants.h	Sat Dec 29 04:09:34 2018 -0800
+++ b/BNO080Constants.h	Fri Jun 14 20:31:37 2019 -0700
@@ -8,7 +8,7 @@
 
 //-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
 
-//Registers
+// Channels
 #define CHANNEL_COMMAND 0
 #define CHANNEL_EXECUTABLE 1
 #define CHANNEL_CONTROL 2
@@ -27,6 +27,9 @@
 #define SHTP_REPORT_COMMAND_REQUEST 0xF2
 #define SHTP_REPORT_FRS_READ_RESPONSE 0xF3
 #define SHTP_REPORT_FRS_READ_REQUEST 0xF4
+#define SHTP_REPORT_FRS_WRITE_RESPONSE 0xF5
+#define SHTP_REPORT_FRS_WRITE_DATA 0xF6
+#define SHTP_REPORT_FRS_WRITE_REQUEST 0xF7
 #define SHTP_REPORT_PRODUCT_ID_RESPONSE 0xF8
 #define SHTP_REPORT_PRODUCT_ID_REQUEST 0xF9
 #define SHTP_REPORT_BASE_TIMESTAMP 0xFB
@@ -63,6 +66,7 @@
 #define ROTATION_ACCURACY_Q_POINT 12 // for rotation accuracy data
 #define POWER_Q_POINT 10 // for power information in the metadata
 #define ORIENTATION_QUAT_Q_POINT 14 // for the set orientation command
+#define FRS_ORIENTATION_Q_POINT 30 // for the sensor orientation FRS record
 
 // Report IDs on the Executable channel
 // See Figure 1-27 in the BNO080 datasheet
@@ -71,13 +75,7 @@
 //Record IDs from SH-2 figure 28
 //These are used to read and set various configuration options
 #define FRS_RECORDID_SERIAL_NUMBER 0x4B4B
-
-//Record IDs from SH-2 figure 29
-//These are used to read the metadata for each sensor type
-#define FRS_RECORDID_ACCELEROMETER 0xE302
-#define FRS_RECORDID_GYROSCOPE_CALIBRATED 0xE306
-#define FRS_RECORDID_MAGNETIC_FIELD_CALIBRATED 0xE309
-#define FRS_RECORDID_ROTATION_VECTOR 0xE30B
+#define FRS_RECORDID_SYSTEM_ORIENTATION 0x2D3E
 
 //Command IDs from section 6.4, page 42
 //These are used to calibrate, initialize, set orientation, tare etc the sensor
@@ -101,6 +99,9 @@
 
 // timing for reset
 // per my measurement, reset takes about 90ms, so let's take twice that
+// By the way, I discovered (by accident) that a symptom of brownout is the chip taking
+// a long time to reset.  So if you had to increase this, check that your Vcc is 
+// within the allowed range.
 #define BNO080_RESET_TIMEOUT .18f
 
 #endif //HAMSTER_BNO080CONSTANTS_H