Driver for an NXP PCA9532 16-bit port expander / LED driver.
The PCA9532 is an 8-bit port expander where each of the bits can function as either an input or an output.
All correct at time of writing, but as always, manufacturers love to move things around on their website.
http://www.nxp.com/documents/data_sheet/PCA9532.pdf
This code has been tested using an Embedded Artists base board with LPC1788-OEM module.
Setup | |
PCA9532_I2C_ADDR | 8-bit I2C address for PCA9532 |
pca9532_initialize_i2c | Initialize bus expander on I2C bus |
LEDs | |
pca9532_led_mode | Get LED mode |
pca9532_set_duty_cycle | Set channel duty cycle |
pca9532_set_led_mode | Set LED mode |
pca9532_set_pwm_frequency | Set PWM frequency |