enhancing Multitech's library for some accelerometer
Fork of MMA845x by
Revision 17:ff9a9933d123, committed 2018-07-05
- Comitter:
- amateusz
- Date:
- Thu Jul 05 01:24:33 2018 +0000
- Parent:
- 16:eefd7fc1b19f
- Child:
- 18:2316ca98e599
- Commit message:
- fixed INT_DRDY bitmask; exposed configInterrupt to public //
Changed in this revision
| MMA845x.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/MMA845x.h Wed Jul 04 23:11:40 2018 +0000
+++ b/MMA845x.h Thu Jul 05 01:24:33 2018 +0000
@@ -224,7 +224,7 @@
* (INT_FIFO used only in MMA8451)
*/
enum INTERRUPT_CFG_EN_SOURCE {
- INT_DRDY = 0x00,
+ INT_DRDY = 0x01,
// 0x20 missing,
INT_FF_MT = 0x04,
INT_PULSE = 0x08,
@@ -387,6 +387,14 @@
* @return The register contents
*/
uint8_t readRegister(uint8_t const reg, uint8_t count, char* data) const;
+
+ /** 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 configInterrupt(INTERRUPT_CFG_EN_SOURCE function, INTERRUPT_PIN pin) const;
+
private:
I2C *_i2c;
@@ -399,13 +407,6 @@
uint8_t init(void);
- /** 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 configInterrupt(INTERRUPT_CFG_EN_SOURCE function, INTERRUPT_PIN pin) const;
-
};
#endif
