i2c RGBW led driver push/pull or opendrain output
Fork of PCA9633 by
Diff: PCA9633.h
- Revision:
- 1:f95d80e0f84a
- Parent:
- 0:39b243509a43
--- a/PCA9633.h Wed Jun 20 12:56:31 2018 +0000 +++ b/PCA9633.h Thu Jun 21 07:28:23 2018 +0000 @@ -7,7 +7,29 @@ * This driver ignore !OE pin functionality. * This driver disable i2c LED All Call address. * This driver disable i2c SUB addresing. - */ + * + * Example: + * @code + * #include "mbed.h" + * #include "PCA9633.h" + * I2C smbus(PB_7,PB_6); + * + * PCA9633 leds(&smbus); + * + * int main() { + * leds.config(true, true); //The output config was openDrain and inverted + * leds.pwm(32,0); //LED0 12.5% + * leds.pwm(64,1); //LED1 25% + * leds.pwm(128,2); //LED2 50% + * leds.pwm(255,3); //LED3 100% + * leds.ledout(PCA9633::GROUP) //All led was dim/blink and single configurable + * led.blink(64,1.5) //Leds blink each 1.5s with 25% duty cycle + * + * while(1) { + * } + * } + * @endcode + */ class PCA9633{ public: @@ -69,7 +91,6 @@ private: I2C *_i2c; char _addr; - char _buf[5]; }; #endif