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 KX022 by
Diff: KX022.h
- Revision:
- 1:23bfc18affd9
- Parent:
- 0:e642dd732c4b
- Child:
- 3:e2d1659fe67e
--- 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
