Ratchapong T / Mbed 2 deprecated MBED3

Dependencies:   LSM9DS0 mbed

Fork of 4180_LSM9DS0_lab by Allen Wild

Revision:
2:4d1fd40fbf43
Parent:
0:29ab304ca8ce
--- a/LSM9DS0.cpp	Mon Jan 26 06:23:41 2015 +0000
+++ b/LSM9DS0.cpp	Mon Jan 26 06:32:58 2015 +0000
@@ -6,8 +6,6 @@
 	// xmAddress and gAddress will store the 7-bit I2C address, if using I2C.
 	xmAddress = xmAddr;
 	gAddress = gAddr;
-	
-//	i2c_ = new I2Cdev(sda, scl);
 }
 
 uint16_t LSM9DS0::begin(gyro_scale gScl, accel_scale aScl, mag_scale mScl, 
@@ -419,42 +417,26 @@
 {
 	// Whether we're using I2C or SPI, write a byte using the
 	// accelerometer-specific I2C address or SPI CS pin.
-		return I2CwriteByte(xmAddress, subAddress, data);
+	return I2CwriteByte(xmAddress, subAddress, data);
 }
 
 uint8_t LSM9DS0::gReadByte(uint8_t subAddress)
 {
-		return I2CreadByte(gAddress, subAddress);
+	return I2CreadByte(gAddress, subAddress);
 }
 
-//void LSM9DS0::gReadBytes(uint8_t subAddress, uint8_t * dest, uint8_t count)
-//{
-//	// Whether we're using I2C or SPI, read multiple bytes using the
-//	// gyro-specific I2C address.
-//		I2CreadBytes(gAddress, subAddress, dest, count);
-//}
-
 uint8_t LSM9DS0::xmReadByte(uint8_t subAddress)
 {
 	// Whether we're using I2C or SPI, read a byte using the
 	// accelerometer-specific I2C address.
-		return I2CreadByte(xmAddress, subAddress);
+	return I2CreadByte(xmAddress, subAddress);
 }
 
-//void LSM9DS0::xmReadBytes(uint8_t subAddress, uint8_t * dest, uint8_t count)
-//{
-//	// read multiple bytes using the
-//	// accelerometer-specific I2C address.
-//	I2CreadBytes(xmAddress, subAddress, dest, count);
-//}
-//
-
 void LSM9DS0::I2CwriteByte(char address, char subAddress, char data)
 {	
 	char cmd[2] = {subAddress, data};
 	i2c.write(address<<1, cmd, 2);
 
-//	i2c_->writeByte(address,subAddress,data);
 }
 
 uint8_t LSM9DS0::I2CreadByte(char address, char subAddress)
@@ -463,15 +445,6 @@
 	i2c.write(address<<1, &subAddress, 1, true);
 	i2c.read(address<<1, &data, 1);
 	
-//	I2CreadBytes(address, subAddress, &data, 1);
 	return data;
 
-}
-
-//void LSM9DS0::I2CreadBytes(uint8_t address, uint8_t subAddress, uint8_t * dest,
-//							uint8_t count)
-//{	
-//	i2c_->readBytes(address, subAddress, count, dest);
-//}
-
-
+}
\ No newline at end of file