LEDDriver_NXP_Arduino 0.2.2
LED driver device operation sample code for Arduino
|
#include <LEDDriver.h>
Public Types | |
enum | reg_num { MODE1 , MODE2 , LEDOUT0 , LEDOUT1 , LEDOUT2 , LEDOUT3 , GRPPWM , GRPFREQ , PWM0 , PWM1 , PWM2 , PWM3 , PWM4 , PWM5 , PWM6 , PWM7 , PWM8 , PWM9 , PWM10 , PWM11 , PWM12 , PWM13 , PWM14 , PWM15 , IREF0 , IREF1 , IREF2 , IREF3 , IREF4 , IREF5 , IREF6 , IREF7 , IREF8 , IREF9 , IREF10 , IREF11 , IREF12 , IREF13 , IREF14 , IREF15 , RAMP_RATE_GRP0 , STEP_TIME_GRP0 , HOLD_CNTL_GRP0 , IREF_GRP0 , RAMP_RATE_GRP1 , STEP_TIME_GRP1 , HOLD_CNTL_GRP1 , IREF_GRP1 , RAMP_RATE_GRP2 , STEP_TIME_GRP2 , HOLD_CNTL_GRP2 , IREF_GRP2 , RAMP_RATE_GRP3 , STEP_TIME_GRP3 , HOLD_CNTL_GRP3 , IREF_GRP3 , GRAD_MODE_SEL0 , GRAD_MODE_SEL1 , GRAD_GRP_SEL0 , GRAD_GRP_SEL1 , GRAD_GRP_SEL2 , GRAD_GRP_SEL3 , GRAD_CNTL , OFFSET , SUBADR1 , SUBADR2 , SUBADR3 , ALLCALLADR , PWMALL , IREFALL , EFLAG0 , EFLAG1 , EFLAG2 , EFLAG3 } |
![]() | |
enum | board { NONE , ARDUINO_SHIELD } |
Public Member Functions | |
PCA9955B (uint8_t i2c_address=(0xBC > > 1)) | |
void | init (float current) |
![]() | |
PCA995x_I2C (uint8_t i2c_address, uint8_t n_ch, uint8_t PWM_r, uint8_t IREF_r, uint8_t IREFALL_r, uint8_t oe=8) | |
void | reg_access (uint8_t reg, uint8_t val) |
void | reg_access (uint8_t reg, uint8_t *vp, int len) |
![]() | |
PCA995x (uint8_t n_ch, uint8_t PWM_r, uint8_t IREF_r, uint8_t IREFALL_r, uint8_t oe=8) | |
virtual void | begin (float current=0.1, board env=NONE, bool buffered=false) |
virtual void | init (float current)=0 |
void | irefall (uint8_t iref) |
![]() | |
LEDDriver (uint8_t n_ch, uint8_t PWM_r, uint8_t oe) | |
virtual void | reg_access (uint8_t reg, uint8_t val)=0 |
virtual void | reg_access (uint8_t reg, uint8_t *vp, int len)=0 |
void | pwm (uint8_t ch, float value) |
void | pwm (float *values) |
void | buffer_enable (bool flag) |
void | flush (void) |
Static Public Attributes | |
static const uint8_t | n_channel = 16 |
Additional Inherited Members | |
![]() | |
const uint8_t | reg_IREF |
const uint8_t | reg_IREFALL |
![]() | |
const uint8_t | n_channel |
const uint8_t | reg_PWM |
const uint8_t | oe_pin |
PCA9955B class
About PCA9955B: https://www.nxp.com/products/power-management/lighting-driver-and-controller-ics/led-drivers/16-channel-fm-plus-ic-bus-57-ma-20-v-constant-current-led-driver:PCA9955BTW
Definition at line 153 of file LEDDriver.h.
enum PCA9955B::reg_num |
Name of the PCA9955B registers
Definition at line 160 of file LEDDriver.h.
PCA9955B::PCA9955B | ( | uint8_t | i2c_address = (0xBC >> 1) | ) |
Create a PCA9955B instance connected to specified I2C pins with specified address
i2c_address | I2C-bus address (default: (0xBC>>1)) |
Definition at line 225 of file LEDDriver.cpp.
|
virtual |
Definition at line 230 of file LEDDriver.cpp.
|
virtual |
Initializing device
value | current value in float (0.0 ~ 1.0) |
Implements PCA995x.
Definition at line 234 of file LEDDriver.cpp.
Referenced by init().
|
static |
Number of channels
Definition at line 157 of file LEDDriver.h.