enhancing Multitech's library for some accelerometer

Fork of MMA845x by Multi-Hackers

Revision:
13:77a8994b3bb2
Parent:
12:92294b5ca1c1
Child:
14:683234dfe179
--- a/MMA845x.h	Mon Jul 02 23:55:31 2018 +0000
+++ b/MMA845x.h	Tue Jul 03 00:11:57 2018 +0000
@@ -369,7 +369,18 @@
          */
     uint8_t getStatus(void) const;
 
+    /** Write to a register (exposed for debugging reasons)
+     *  Note: most writes are only valid in stop mode
+     *  @param reg - The register to be written
+     *  @param data - The data to be written
+     */
+    uint8_t writeRegister(uint8_t const reg, uint8_t const data) const;
 
+    /** Read from a register (exposed for debugging reasons)
+     *  @param reg - The register to read from
+     *  @return The register contents
+     */
+    uint8_t readRegister(uint8_t const reg, uint8_t count, char* data) const;
 private:
 
     I2C         *_i2c;
@@ -382,19 +393,12 @@
 
     uint8_t init(void);
 
-    /** Write to a register (exposed for debugging reasons)
-     *  Note: most writes are only valid in stop mode
-     *  @param reg - The register to be written
-     *  @param data - The data to be written
+    /** Enable disable interrupt triggering for a given function.
+     *	@function - a internal funcion capable to trigger an interrupt
+     *	@pin - which phy pin assign to interrupt condition. If no pin is specified, interrupt is disabled
+     *	@return
      */
-    uint8_t writeRegister(uint8_t const reg, uint8_t const data) const;
-
-    /** Read from a register (exposed for debugging reasons)
-     *  @param reg - The register to read from
-     *  @return The register contents
-     */
-    uint8_t readRegister(uint8_t const reg, uint8_t count, char* data) const;
-
+    uint8_t configInterrupt(INTERRUPT_CFG_EN_SOURCE function, INTERRUPT_PIN pin) const;
 
 };