A feature complete driver for the PCA9952/55 LED driver from NXP.

Dependents:   PCA9955_HelloWorld

Revision:
4:6ca7ab31c5fb
Parent:
3:84571acc16a1
Child:
5:7ad949955db8
--- a/PCA9955.h	Fri Nov 08 16:19:36 2013 +0000
+++ b/PCA9955.h	Fri Nov 08 16:33:36 2013 +0000
@@ -27,8 +27,8 @@
  * #include "mbed.h"
  * #include "PCA9955.h"
  *
- * //Create an PCA9955 object at the default address (ADDRESS_0)
- * PCA9955 driver(p28, p27);
+ * //Create a PCA9955 object using the LED All Call address
+ * PCA9955 driver(p28, p27, PCA9955::ADDRESS_ALL);
  *
  * int main()
  * {
@@ -40,10 +40,10 @@
  *         //NOTE: This might reset other I2C devices as well!
  *         driver.reset();
  *
- *         //Set all the output states to PWM mode
+ *         //Set all of the output states to PWM mode
  *         driver.allOutputStates(PCA9955::OUTPUT_PWM);
  *
- *         //Set the all of the output currents to maximum
+ *         //Set all of the output currents to maximum
  *         driver.allOutputCurrents(1.0);
  *
  *         while (1) {
@@ -164,6 +164,14 @@
      */
     PCA9955(PinName sda, PinName scl, Address addr = ADDRESS_0);
 
+    /** Create a PCA9952/55 object connected to the specified I2C pins with a custom I2C slave address
+     *
+     * @param sda The I2C data pin.
+     * @param scl The I2C clock pin.
+     * @param addr The custom I2C slave address (a modified subaddress or LED All Call address).
+     */
+    PCA9955(PinName sda, PinName scl, int addr);
+
     /** Probe for the PCA9952/55 and configure Auto-Increment if present
      *
      * @returns