Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Fork of Repo_Noeud_Mobile by
Diff: Accelerometer/MMA8452Q.h
- Revision:
- 26:5700cde2350b
- Parent:
- 22:cccb77300fd5
- Child:
- 27:0c0dfdf8d953
--- a/Accelerometer/MMA8452Q.h Thu Mar 26 17:08:26 2015 +0000
+++ b/Accelerometer/MMA8452Q.h Mon Apr 06 17:33:20 2015 +0000
@@ -1,11 +1,16 @@
#include "mbed.h"
-
#define SPEED 0.05
#define W_ADDR 0x3A
#define R_ADDR 0x3B
#define WHO_AM_I 0x0D
#define CTRL_REG1 0x2A
#define X_OUT_MSB 0x01
+#define TRANSIENT_CFG 0x1D
+#define THRESHOLD_REG 0x1F
+#define DEBOUNCE_CFG 0x20
+#define CTRL_REG4 0x2D
+#define CTRL_REG5 0x2E
+#define TRANSIENT_VALUE 0x1E
typedef struct {
uint16_t x;
@@ -27,5 +32,8 @@
uint8_t get_WHO_AM_I();
uint8_t set_CTRL_REG1();
accel_t get_axis_values();
+ uint8_t set_STANDBY_MODE();
+ uint8_t set_TRANSIENT_MODE(char axis, char count, char debounce);
+ uint8_t clear_TRANSIENT_INTERRUPT();
};
\ No newline at end of file
