Mateusz Grzywacz / MMA845x

Fork of MMA845x by Multi-Hackers

Files at this revision

API Documentation at this revision

Comitter:
amateusz
Date:
Wed Jul 04 23:11:40 2018 +0000
Parent:
15:8544130b5def
Child:
17:ff9a9933d123
Commit message:
fix: result (of configInterrupt) was never a used

Changed in this revision

MMA845x.cpp Show annotated file Show diff for this revision Revisions of this file
--- 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;
 }