dikuei yen / Mbed 2 deprecated MTI_2_IMU

Dependencies:   mbed

Revision:
0:75b96455c9ac
Child:
1:f2d1cdd67064
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/MTi2.h	Mon May 02 10:25:37 2022 +0000
@@ -0,0 +1,49 @@
+/*
+ * MTi2.h
+ *
+ *  Created on: 2021年7月8日
+ *      Author: liwei
+ */
+
+#ifndef INC_MTI2_H_
+#define INC_MTI2_H_
+
+#include "mbed.h"
+/*#include "main.h"*/
+
+//define opcode
+#define ProtInfo    0x01
+#define ConfigProt  0x02
+#define Control     0x03
+#define PipeStat    0x04
+#define NotiPipe    0x05
+#define MeasPipe    0x06
+
+int len;
+int ctrl_len;
+uint16_t notificationSize;
+uint16_t measurementSize;
+uint8_t buffer[40];
+uint8_t ctrlBuf[20];
+uint8_t FW[4];
+
+float euler[3];
+float accel[3];
+float omega[3];
+//float euler_[3];// after process
+float accel_[3];// after process
+//float omega_[3];// after process
+
+void SendOpcode(uint8_t Opcode);
+uint8_t ReadProtInfo();
+void ConfigureProt(_Bool M,_Bool N,_Bool O,_Bool P);
+void PipeStatus();
+void NotificationPipe();
+void MeasurementPipe();
+void ControlPipe();
+void ReadData();
+void MTi2_Init();
+
+float   lpf(float input, float output_old, float frequency);    //lpf discrete
+
+#endif /* INC_MTI2_H_ */