Start of a microbit mpr121 library

Dependents:   microbitmpr121-example

Revision:
5:4a8384331ca7
Parent:
4:f63476855239
Child:
6:103a5a2ca571
--- a/MicroBitMpr121.h	Mon Jan 16 19:19:50 2017 +0000
+++ b/MicroBitMpr121.h	Mon Jan 16 19:43:18 2017 +0000
@@ -40,7 +40,7 @@
 /**
   * I2C constants
   */
-#define MPR121_DEFAULT_ADDR    0x1D
+#define MPR121_DEFAULT_ADDR    0x5A
 
 
 /**
@@ -52,7 +52,7 @@
   * MPR121 MAGIC ID value
   * Returned from the MPR121_WHO_AM_I register for ID purposes.
   */
-//#define MPR121_WHOAMI_VAL 0X9A 
+#define MPR121_WHOAMI_VAL 0X9A //TODO
 
 /**
   * Class definition for MicroBit Mpr121.
@@ -85,7 +85,7 @@
     * MicroBitMpr121 mpr121(i2c);
     * @endcode
     */
-    MicroBitMpr121(MicroBitI2C& _i2c, uint16_t address = MPR121_DEFAULT_ADDR, uint16_t id = MICROBIT_ID_COMPASS);
+    MicroBitMpr121(MicroBitI2C& _i2c, uint16_t address = MPR121_DEFAULT_ADDR, DigitalIn interupt = MICROBIT_PIN_P16, uint16_t id = MPR121_DEFAULT_ADDR);
 
     /**
       * Configures the compass for the sample rate defined in this object.