Library to communicate with a ST LIS331DLH
Revision 3:147d95b7a525, committed 2010-11-17
- Comitter:
- atommota
- Date:
- Wed Nov 17 18:34:25 2010 +0000
- Parent:
- 2:d4b810a888b5
- Child:
- 4:c3df518a938e
- Commit message:
- Changed WHO_AM_I reg name to play nicer with itg3200 library
Changed in this revision
LIS331.cpp | Show annotated file Show diff for this revision Revisions of this file |
LIS331.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/LIS331.cpp Wed Nov 17 18:29:47 2010 +0000 +++ b/LIS331.cpp Wed Nov 17 18:34:25 2010 +0000 @@ -47,7 +47,7 @@ char LIS331::getWhoAmI(void){ //WhoAmI Register address. - char tx = WHO_AM_I_REG; + char tx = WHO_AM_I_REG_LIS331; char rx; i2c_.write((LIS331_I2C_ADDRESS << 1) & 0xFE, &tx, 1);
--- a/LIS331.h Wed Nov 17 18:29:47 2010 +0000 +++ b/LIS331.h Wed Nov 17 18:34:25 2010 +0000 @@ -28,7 +28,7 @@ //----------- // Registers //----------- -#define WHO_AM_I_REG 0x0F +#define WHO_AM_I_REG_LIS331 0x0F #define ACCEL_XOUT_H_REG 0x29 #define ACCEL_XOUT_L_REG 0x28 #define ACCEL_YOUT_H_REG 0x2B