Library for NXP MCU I2C RGB LED DEMO board (6 x PCA9635)
Warning
When the original NXP demo board is connected to another mcu board : Disable the on-board 8051 mcu.
Revision 1:b89b54759940, committed 2014-04-01
- Comitter:
- frankvnk
- Date:
- Tue Apr 01 20:03:30 2014 +0000
- Parent:
- 0:1258ad754d9c
- Commit message:
- Added global intensity function
Changed in this revision
PCA9635_6.cpp | Show annotated file Show diff for this revision Revisions of this file |
PCA9635_6.h | Show annotated file Show diff for this revision Revisions of this file |
--- a/PCA9635_6.cpp Mon Mar 31 18:38:01 2014 +0000 +++ b/PCA9635_6.cpp Tue Apr 01 20:03:30 2014 +0000 @@ -241,4 +241,9 @@ *B = RGB_LED[LEDn].BLUE.buf[RGB_LED[LEDn].BLUE.n]; } +void PCA9635_6::set_global_intensity(uint8_t globi) +{ + GLOBAL_INTENSITY[2] = globi; +} +
--- a/PCA9635_6.h Mon Mar 31 18:38:01 2014 +0000 +++ b/PCA9635_6.h Tue Apr 01 20:03:30 2014 +0000 @@ -109,10 +109,23 @@ */ void read_LED( int LEDn, uint8_t *R, uint8_t *G, uint8_t *B); + /** Send GLOBAL_INTENSITY to LED board. + * + * @param none. + * @return none. + */ + void LED_INTENSITY(void); + + /** Change GLOBAL_INTENSITY. + * + * @param intensity value. + * @return none. + */ + void set_global_intensity(uint8_t globi); + private: void i2cfail(void); void I2C_Write(I2C_MESSAGE *mp); - void LED_INTENSITY(void); I2C _i2c; DigitalOut _en; };