Tyler Weaver / ITG3200

Dependents:   9Dof_unit_testing

Fork of ITG3200 by James Watanabe

Revision:
4:155c44407af5
Parent:
3:eea9733ca427
Child:
5:0a0315f0f34e
--- a/ITG3200.cpp	Wed Sep 12 14:37:34 2012 +0000
+++ b/ITG3200.cpp	Wed Sep 12 15:23:29 2012 +0000
@@ -1,4 +1,5 @@
 /**
+ * @file ITG3200.cpp
  * @author Aaron Berk
  *
  * @section LICENSE
@@ -195,9 +196,9 @@
     
 }
 
-int ITG3200::getRawTemperature(void){
+int ITG3200::getWord(int regi){
 
-    char tx = TEMP_OUT_H_REG;
+    char tx = regi;
     char rx[2];
     
     i2c_.write(I2C_ADDRESS, &tx, 1);
@@ -220,51 +221,6 @@
     
 }
 
-int ITG3200::getGyroX(void){
-
-    char tx = GYRO_XOUT_H_REG;
-    char rx[2];
-    
-    i2c_.write((ITG3200_I2C_ADDRESS << 1) & 0xFE, &tx, 1);
-    
-    i2c_.read((ITG3200_I2C_ADDRESS << 1) | 0x01, rx, 2);
-    
-    int16_t output = ((int) rx[0] << 8) | ((int) rx[1]);
-
-    return output;
-
-}
-
-int ITG3200::getGyroY(void){
-
-    char tx = GYRO_YOUT_H_REG;
-    char rx[2];
-    
-    i2c_.write((ITG3200_I2C_ADDRESS << 1) & 0xFE, &tx, 1);
-    
-    i2c_.read((ITG3200_I2C_ADDRESS << 1) | 0x01, rx, 2);
-    
-    int16_t output = ((int) rx[0] << 8) | ((int) rx[1]);
-
-    return output;
-
-}
-
-int ITG3200::getGyroZ(void){
-
-    char tx = GYRO_ZOUT_H_REG;
-    char rx[2];
-    
-    i2c_.write((ITG3200_I2C_ADDRESS << 1) & 0xFE, &tx, 1);
-    
-    i2c_.read((ITG3200_I2C_ADDRESS << 1) | 0x01, rx, 2);
-    
-    int16_t output = ((int) rx[0] << 8) | ((int) rx[1]);
-
-    return output;
-    
-}
-
 void ITG3200::getRawGyroXYZ(int readings[3]){
 
     char tx = GYRO_XOUT_H_REG;