Start of a microbit mpr121 library

Dependents:   microbitmpr121-example

Revision:
5:4a8384331ca7
Parent:
4:f63476855239
Child:
6:103a5a2ca571
diff -r f63476855239 -r 4a8384331ca7 MicroBitMpr121.cpp
--- a/MicroBitMpr121.cpp	Mon Jan 16 19:19:50 2017 +0000
+++ b/MicroBitMpr121.cpp	Mon Jan 16 19:43:18 2017 +0000
@@ -67,8 +67,8 @@
   * MicroBitMpr121 mpr121(i2c);
   * @endcode
   */
-MicroBitMpr121::MicroBitMpr121(MicroBitI2C& _i2c, uint16_t address, uint16_t id) :
-    int1(MICROBIT_PIN_P16),
+MicroBitMpr121::MicroBitMpr121(MicroBitI2C& _i2c, uint16_t address, DigitalIn interrupt, uint16_t id) :
+    int1(interrupt),
     i2c(_i2c)
  
 {
@@ -194,7 +194,7 @@
   * @return the 8 bit ID returned by the mpr121, or MICROBIT_I2C_ERROR if the request fails.
   *
   * @code
-  * compass.whoAmI();
+  * mpr121.whoAmI();
   * @endcode
   */
 int MicroBitMpr121::whoAmI()
@@ -202,7 +202,7 @@
     uint8_t data;
     int result;
 
- //   result = readCommand(MAG_WHOAMI, &data, 1);
+ //   result = readCommand(MPR121_WHOAMI, &data, 1);
     if (result != MICROBIT_OK)
         return MICROBIT_I2C_ERROR;