grove_gyroscope

Committer:
JackyZhangFromSeeed
Date:
Tue Jun 09 10:18:45 2015 +0000
Revision:
0:d4c2464a3868
grove_gyroscope

Who changed what in which revision?

UserRevisionLine numberNew contents of line
JackyZhangFromSeeed 0:d4c2464a3868 1
JackyZhangFromSeeed 0:d4c2464a3868 2
JackyZhangFromSeeed 0:d4c2464a3868 3
JackyZhangFromSeeed 0:d4c2464a3868 4 #ifndef __GROVE_GYROSCOPE_LIGHT_H__
JackyZhangFromSeeed 0:d4c2464a3868 5 #define __GROVE_GYROSCOPE_LIGHT_H__
JackyZhangFromSeeed 0:d4c2464a3868 6
JackyZhangFromSeeed 0:d4c2464a3868 7 #include "suli2.h"
JackyZhangFromSeeed 0:d4c2464a3868 8
JackyZhangFromSeeed 0:d4c2464a3868 9 #define GYRO_ADDRESS (0x68<<1)
JackyZhangFromSeeed 0:d4c2464a3868 10
JackyZhangFromSeeed 0:d4c2464a3868 11 // ITG3200 Register Defines
JackyZhangFromSeeed 0:d4c2464a3868 12 #define ITG3200_WHO 0x00
JackyZhangFromSeeed 0:d4c2464a3868 13 #define ITG3200_SMPL 0x15
JackyZhangFromSeeed 0:d4c2464a3868 14 #define ITG3200_DLPF 0x16
JackyZhangFromSeeed 0:d4c2464a3868 15 #define ITG3200_INT_C 0x17
JackyZhangFromSeeed 0:d4c2464a3868 16 #define ITG3200_INT_S 0x1A
JackyZhangFromSeeed 0:d4c2464a3868 17 #define ITG3200_TMP_H 0x1B
JackyZhangFromSeeed 0:d4c2464a3868 18 #define ITG3200_TMP_L 0x1C
JackyZhangFromSeeed 0:d4c2464a3868 19 #define ITG3200_GX_H 0x1D
JackyZhangFromSeeed 0:d4c2464a3868 20 #define ITG3200_GX_L 0x1E
JackyZhangFromSeeed 0:d4c2464a3868 21 #define ITG3200_GY_H 0x1F
JackyZhangFromSeeed 0:d4c2464a3868 22 #define ITG3200_GY_L 0x20
JackyZhangFromSeeed 0:d4c2464a3868 23 #define ITG3200_GZ_H 0x21
JackyZhangFromSeeed 0:d4c2464a3868 24 #define ITG3200_GZ_L 0x22
JackyZhangFromSeeed 0:d4c2464a3868 25 #define ITG3200_PWR_M 0x3E
JackyZhangFromSeeed 0:d4c2464a3868 26
JackyZhangFromSeeed 0:d4c2464a3868 27
JackyZhangFromSeeed 0:d4c2464a3868 28 void grove_gyroscope_init(I2C_T *i2c, int pinsda, int pinscl);
JackyZhangFromSeeed 0:d4c2464a3868 29 bool grove_gyro_write_setup(I2C_T *i2c);
JackyZhangFromSeeed 0:d4c2464a3868 30 bool grove_gyro_getangularvelocity(I2C_T *i2c, float *ax,float *ay,float *az);
JackyZhangFromSeeed 0:d4c2464a3868 31 bool grove_gyro_zerocalibrate(I2C_T *i2c);
JackyZhangFromSeeed 0:d4c2464a3868 32
JackyZhangFromSeeed 0:d4c2464a3868 33 #endif