enhancing Multitech's library for some accelerometer
Fork of MMA845x by
Diff: MMA845x.h
- Revision:
- 14:683234dfe179
- Parent:
- 13:77a8994b3bb2
- Child:
- 15:8544130b5def
--- a/MMA845x.h Tue Jul 03 00:11:57 2018 +0000 +++ b/MMA845x.h Wed Jul 04 23:07:03 2018 +0000 @@ -323,14 +323,20 @@ uint8_t enableMotionDetect(void) const; /** Enable Pulse Detect mode and interrupt handler + * @char x_threshold - tap/double tap detection threshold for x axis. resolution of 0.063 g/LSB, min value 1, max value 127, use 0 to disable + * @char y_threshold - tap/double tap detection threshold for y axis. resolution of 0.063 g/LSB, min value 1, max value 127, use 0 to disable + * @char z_threshold - tap/double tap detection threshold for z axis. resolution of 0.063 g/LSB, min value 1, max value 127, use 0 to disable + * @char window - pulse must fit within window (raise and fall below threshold) in order "to be considered a valid pulse." + * @char latency - period, that starts after a pulse has been detected, during all pulses are ignored. Kind of debouncing + * @pin - an interrupt has to be attached to some pin, even if this pin is NC * @return status of command - * TODO - need to implement function + * TODO - implement conversion from some arbitrary units to ms for window and latency */ - uint8_t enablePulseDetect(void) const; + uint8_t enablePulseDetect(char x_threshold, char y_threshold, char z_threshold, char window, char latency, INTERRUPT_PIN pin) const; /** Enable Orientation mode and interrupt handler * @debounce_steps - how long a state has to last to trigger orientation change. step varies from 1.25 to 160 ms. - * @pin - an interrupt has to be attached to some pin, even this pin is left floating + * @pin - an interrupt has to be attached to some pin, even if this pin is NC * @return status of command * TODO - add trip angles change (only when MMA8451) */