KX022 Accelerometer library
Fork of KX022 by
Revision 1:23bfc18affd9, committed 2016-03-23
- Comitter:
- MACRUM
- Date:
- Wed Mar 23 03:29:11 2016 +0000
- Parent:
- 0:e642dd732c4b
- Child:
- 2:5ac8e9e5f63e
- Commit message:
- Fixed default slave address definition
Changed in this revision
| BM1383GLV.lib | Show annotated file Show diff for this revision Revisions of this file |
| KX022.h | Show annotated file Show diff for this revision Revisions of this file |
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/BM1383GLV.lib Wed Mar 23 03:29:11 2016 +0000 @@ -0,0 +1,1 @@ +http://mbed.org/teams/Rohm/code/BM1383GLV/#6e1c9edabeee
--- a/KX022.h Wed Dec 30 16:16:32 2015 +0000
+++ b/KX022.h Wed Mar 23 03:29:11 2016 +0000
@@ -32,7 +32,7 @@
#include "mbed.h"
-#define DEFAULT_SLAVE_ADDRESS (0x1E << 1)
+#define KX022_DEFAULT_SLAVE_ADDRESS (0x1E << 1)
#define KX022_WAI_VAL (0x14)
#define KX022_XOUT_L (0x06)
@@ -87,7 +87,7 @@
* @param sdl SCL pin
* @param addr slave address of the I2C peripheral (default: 0x3C)
*/
- KX022(PinName sda, PinName scl, int addr = DEFAULT_SLAVE_ADDRESS);
+ KX022(PinName sda, PinName scl, int addr = KX022_DEFAULT_SLAVE_ADDRESS);
/**
* Create a KX022 instance which is connected to specified I2C pins
@@ -96,7 +96,7 @@
* @param i2c_obj I2C object (instance)
* @param addr slave address of the I2C-bus peripheral (default: 0x3C)
*/
- KX022(I2C &i2c_obj, int addr = DEFAULT_SLAVE_ADDRESS);
+ KX022(I2C &i2c_obj, int addr = KX022_DEFAULT_SLAVE_ADDRESS);
/**
* KX022 destructor
