KX022 Accelerometer library
Dependents: LazuriteGraph_Hello KX022_Hello GR-PEACH_IoT_Platform_HTTP_sample
Diff: KX022.h
- Revision:
- 1:23bfc18affd9
- Parent:
- 0:e642dd732c4b
- Child:
- 3:e2d1659fe67e
diff -r e642dd732c4b -r 23bfc18affd9 KX022.h
--- 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
Rohm/Kionix KX022-1020 | Accelerometer