Peter Swanson / ADXL345_I2C参考 http://mbed.org/users/peterswanson87/code/ADXL345_I2C/
Fork of ADXL345_I2C by
Diff: ADXL345_I2C.cpp
- Revision:
- 2:84e6d627c619
- Parent:
- 1:d9412b56f98a
--- a/ADXL345_I2C.cpp Thu May 12 01:19:36 2011 +0000 +++ b/ADXL345_I2C.cpp Thu Aug 01 08:13:05 2013 +0000 @@ -68,7 +68,7 @@ char rx[2]; rx[0] = ADXL345_DATA_FORMAT_REG; rx[1] = 0x0B; - // full res and +_16g + // full res and +_16g i2c_.write( ADXL345_I2C_WRITE , rx, 2); // Set Offset - programmed into the OFSX, OFSY, and OFXZ registers, respectively, as 0xFD, 0x03 and 0xFE.