enhancing Multitech's library for some accelerometer
Fork of MMA845x by
Diff: MMA845x.cpp
- Revision:
- 16:eefd7fc1b19f
- Parent:
- 14:683234dfe179
- Child:
- 18:2316ca98e599
diff -r 8544130b5def -r eefd7fc1b19f MMA845x.cpp --- a/MMA845x.cpp Wed Jul 04 23:08:47 2018 +0000 +++ b/MMA845x.cpp Wed Jul 04 23:11:40 2018 +0000 @@ -147,7 +147,7 @@ MMA845x::writeRegister(MMA845x::PULSE_LTCY, latency); // set latency to 300..ms ?..? MMA845x::writeRegister(MMA845x::HP_FILTER_CUTOFF, 0b00110000); // by-pass High pass filter for pulse processing // for good meausure (??) - configInterrupt(INT_PULSE, pin); + result |= configInterrupt(INT_PULSE, pin); return result; } @@ -164,7 +164,7 @@ MMA845x::writeRegister(PL_COUNT, debounce_steps); MMA845x::writeRegister(PL_CFG, 0b11000000); // enable and set debounce counter to clear out of {clear, decrement} - configInterrupt(INT_LNDPRT, pin); + result |= configInterrupt(INT_LNDPRT, pin); return result; }