I think there was a bug with debug mode
Dependents: Generic_Platformer
Revision 22:62055aa5fd8a, committed 2019-03-16
- Comitter:
- Yehowshua
- Date:
- Sat Mar 16 05:24:59 2019 +0000
- Parent:
- 21:a92a632a0cc7
- Commit message:
- added inputs and associated libraries
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 |
diff -r a92a632a0cc7 -r 62055aa5fd8a MMA8452.cpp --- a/MMA8452.cpp Fri Mar 07 14:53:40 2014 +0000 +++ b/MMA8452.cpp Sat Mar 16 05:24:59 2019 +0000 @@ -20,13 +20,13 @@ #include "MMA8452.h" #include "mbed.h" -#ifdef MMA8452_DEBUG +//#ifdef MMA8452_DEBUG // you need to define Serial pc(USBTX,USBRX) somewhere for the below line to make sense -extern Serial pc; -#define MMA8452_DBG(...) pc.printf(__VA_ARGS__); pc.printf("\r\n"); -#else +//extern Serial pc; +//#define MMA8452_DBG(...) pc.printf(__VA_ARGS__); pc.printf("\r\n"); +//#else #define MMA8452_DBG(...) -#endif +//#endif // 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) {
diff -r a92a632a0cc7 -r 62055aa5fd8a MMA8452.h --- a/MMA8452.h Fri Mar 07 14:53:40 2014 +0000 +++ b/MMA8452.h Sat Mar 16 05:24:59 2019 +0000 @@ -24,7 +24,7 @@ #include "mbed.h" -#define MMA8452_DEBUG 1 +#define MMA8452_DEBUG 0 // 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