ECE 2035
Fork of MMA8452 by
Revision 1:f92fe1e48ab7, committed 2016-02-09
- Comitter:
- luisbc92
- Date:
- Tue Feb 09 19:45:03 2016 +0000
- Parent:
- 0:53030e47347a
- Commit message:
- Tag Mod
Changed in this revision
MMA8452.cpp | Show annotated file Show diff for this revision Revisions of this file |
MMA8452.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MMA8452.cpp Sun Jul 05 16:35:08 2015 +0000 +++ b/MMA8452.cpp Tue Feb 09 19:45:03 2016 +0000 @@ -20,6 +20,7 @@ #include "MMA8452.h" #include "mbed.h" +/* #ifdef MMA8452_DEBUG // you need to define Serial pc(USBTX,USBRX) somewhere for the below line to make sense extern Serial pc; @@ -27,6 +28,8 @@ #else #define MMA8452_DBG(...) #endif +*/ +#define MMA8452_DBG(...) // Connect module at I2C address using I2C port pins sda and scl MMA8452::MMA8452(PinName sda, PinName scl, int frequency) : _i2c(sda, scl) , _frequency(frequency) {
--- a/MMA8452.h Sun Jul 05 16:35:08 2015 +0000 +++ b/MMA8452.h Tue Feb 09 19:45:03 2016 +0000 @@ -27,7 +27,7 @@ #define MMA8452_DEBUG 1 // More info on MCU Master address can be found on section 5.10.1 of http://www.freescale.com/webapp/sps/site/prod_summary.jsp?code=MMA8452Q -#define SA0 1 +#define SA0 0 #if SA0 #define MMA8452_ADDRESS 0x3A // 0x1D<<1 // SA0 is high, 0x1C if low - #else