Generic function for configuring the register

Dependencies:   MMA8451Q8 SLCD mbed

Fork of KL46z_single_tap_empty by Stanley Cohen

Files at this revision

API Documentation at this revision

Comitter:
vbharam
Date:
Mon Feb 09 04:44:19 2015 +0000
Parent:
3:53d47a5dbb2c
Commit message:
Generic function for configuring the register

Changed in this revision

MMA8451Q8.lib Show annotated file Show diff for this revision Revisions of this file
main.cpp Show annotated file Show diff for this revision Revisions of this file
--- a/MMA8451Q8.lib	Tue Feb 03 18:05:52 2015 +0000
+++ b/MMA8451Q8.lib	Mon Feb 09 04:44:19 2015 +0000
@@ -1,1 +1,1 @@
-http://developer.mbed.org/users/scohennm/code/MMA8451Q8b/#993bb9e96a4b
+http://developer.mbed.org/users/vbharam/code/MMA8451Q8/#acccb8faf90c
--- a/main.cpp	Tue Feb 03 18:05:52 2015 +0000
+++ b/main.cpp	Mon Feb 09 04:44:19 2015 +0000
@@ -106,7 +106,9 @@
         sprintf (lcdData,"%x",regData);
         LCDMess(lcdData,BLINKTIME); 
         
-        acc.setPulseConfiguration(latchData, axisData); // write the data
+        //acc.setPulseConfiguration(latchData, axisData); // write the data
+        regData = latchData | axisData;
+        acc.setRegisterInStandby(REG_PULSE_CFG, regData); //write the data
         acc.readRegs(REG_PULSE_CFG, &regData, 1);  // check it
         sprintf (lcdData,"%x",regData);
         LCDMess(lcdData,BLINKTIME);