MMA8451Q driver
Fork of lib_mma8451q by
Revision 8:442c7e6e35ce, committed 2017-04-24
- Comitter:
- mluis
- Date:
- Mon Apr 24 13:44:18 2017 +0000
- Parent:
- 7:aa9544d581ba
- Commit message:
- Removed extra spaces
Changed in this revision
mma8451q.cpp | Show annotated file Show diff for this revision Revisions of this file |
mma8451q.h | Show annotated file Show diff for this revision Revisions of this file |
diff -r aa9544d581ba -r 442c7e6e35ce mma8451q.cpp --- a/mma8451q.cpp Mon Apr 24 12:36:06 2017 +0000 +++ b/mma8451q.cpp Mon Apr 24 13:44:18 2017 +0000 @@ -211,10 +211,10 @@ uint8_t MMA8451Q::service() { mma_int_source_t int_src; - + if (m_int_pin) return 0; // no interrupt - + int_src.octet = read_single(MMA8451_INT_SOURCE); if (int_src.bits.SRC_DRDY) { @@ -299,7 +299,7 @@ if (t_src.bits.ZTRANSE) printf("Z_Pol:%d ", t_src.bits.Z_Trans_Pol); printf("\r\n"); - } + } } // ...int_src.bits.SRC_TRANS if (int_src.bits.SRC_ASLP) {
diff -r aa9544d581ba -r 442c7e6e35ce mma8451q.h --- a/mma8451q.h Mon Apr 24 12:36:06 2017 +0000 +++ b/mma8451q.h Mon Apr 24 13:44:18 2017 +0000 @@ -27,7 +27,6 @@ #define MMA8451_CTRL_REG4 0x2d // interrupt enable #define MMA8451_CTRL_REG5 0x2e // interrupt pin selection - typedef union { struct { int16_t x;