LEDDriver_NXP_Arduino 0.2.0
LED driver device operation sample code for Arduino
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Attributes | List of all members
PCA9956B Class Reference

#include <LEDDriver.h>

Inheritance diagram for PCA9956B:
PCA995x_I2C PCA995x LEDDriver

Public Types

enum  reg_num {
  MODE1 , MODE2 , LEDOUT0 , LEDOUT1 ,
  LEDOUT2 , LEDOUT3 , LEDOUT4 , LEDOUT5 ,
  GRPPWM , GRPFREQ , PWM0 , PWM1 ,
  PWM2 , PWM3 , PWM4 , PWM5 ,
  PWM6 , PWM7 , PWM8 , PWM9 ,
  PWM10 , PWM11 , PWM12 , PWM13 ,
  PWM14 , PWM15 , PWM16 , PWM17 ,
  PWM18 , PWM19 , PWM20 , PWM21 ,
  PWM22 , PWM23 , IREF0 , IREF1 ,
  IREF2 , IREF3 , IREF4 , IREF5 ,
  IREF6 , IREF7 , IREF8 , IREF9 ,
  IREF10 , IREF11 , IREF12 , IREF13 ,
  IREF14 , IREF15 , IREF16 , IREF17 ,
  IREF18 , IREF19 , IREF20 , IREF21 ,
  IREF22 , IREF23 , OFFSET , SUBADR1 ,
  SUBADR2 , SUBADR3 , ALLCALLADR , PWMALL ,
  IREFALL , EFLAG0 , EFLAG1 , EFLAG2 ,
  EFLAG3 , EFLAG4 , EFLAG5
}
 
- Public Types inherited from LEDDriver
enum  board { NONE , ARDUINO_SHIELD }
 

Public Member Functions

 PCA9956B (uint8_t i2c_address=(0x02 > > 1))
 
virtual ~PCA9956B ()
 
void init (float current)
 
- Public Member Functions inherited from PCA995x_I2C
 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)
 
virtual ~PCA995x_I2C ()
 
void reg_access (uint8_t reg, uint8_t val)
 
void reg_access (uint8_t reg, uint8_t *vp, int len)
 
- Public Member Functions inherited from PCA995x
 PCA995x (uint8_t n_ch, uint8_t PWM_r, uint8_t IREF_r, uint8_t IREFALL_r, uint8_t oe=8)
 
virtual ~PCA995x ()
 
virtual void begin (float current=0.1, board env=NONE, bool buffered=false)
 
virtual void init (float current)=0
 
void irefall (uint8_t iref)
 
- Public Member Functions inherited from LEDDriver
 LEDDriver (uint8_t n_ch, uint8_t PWM_r, uint8_t oe)
 
virtual ~LEDDriver ()
 
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 flush (void)
 
void buffer_enable (bool flag)
 

Static Public Attributes

static const uint8_t n_channel = 24
 

Additional Inherited Members

- Protected Attributes inherited from PCA995x
const uint8_t reg_IREF
 
const uint8_t reg_IREFALL
 
- Protected Attributes inherited from LEDDriver
const uint8_t n_channel
 
const uint8_t reg_PWM
 
const uint8_t oe_pin
 
uint8_t * bp
 

Detailed Description

Definition at line 194 of file LEDDriver.h.

Member Enumeration Documentation

◆ reg_num

Name of the PCA9955B registers

Enumerator
MODE1 
MODE2 
LEDOUT0 
LEDOUT1 
LEDOUT2 
LEDOUT3 
LEDOUT4 
LEDOUT5 
GRPPWM 
GRPFREQ 
PWM0 
PWM1 
PWM2 
PWM3 
PWM4 
PWM5 
PWM6 
PWM7 
PWM8 
PWM9 
PWM10 
PWM11 
PWM12 
PWM13 
PWM14 
PWM15 
PWM16 
PWM17 
PWM18 
PWM19 
PWM20 
PWM21 
PWM22 
PWM23 
IREF0 
IREF1 
IREF2 
IREF3 
IREF4 
IREF5 
IREF6 
IREF7 
IREF8 
IREF9 
IREF10 
IREF11 
IREF12 
IREF13 
IREF14 
IREF15 
IREF16 
IREF17 
IREF18 
IREF19 
IREF20 
IREF21 
IREF22 
IREF23 
OFFSET 
SUBADR1 
SUBADR2 
SUBADR3 
ALLCALLADR 
PWMALL 
IREFALL 
EFLAG0 
EFLAG1 
EFLAG2 
EFLAG3 
EFLAG4 
EFLAG5 

Definition at line 201 of file LEDDriver.h.

Constructor & Destructor Documentation

◆ PCA9956B()

PCA9956B::PCA9956B ( uint8_t  i2c_address = (0x02 >> 1))

Create a PCA9955B instance connected to specified I2C pins with specified address

Parameters
i2c_addressI2C-bus address (default: (0x02>>1))

Definition at line 246 of file LEDDriver.cpp.

◆ ~PCA9956B()

PCA9956B::~PCA9956B ( )
virtual

Definition at line 251 of file LEDDriver.cpp.

Member Function Documentation

◆ init()

void PCA9956B::init ( float  current)
virtual

Initializing device

Parameters
valuecurrent value in float (0.0 ~ 1.0)

Implements PCA995x.

Definition at line 255 of file LEDDriver.cpp.

Referenced by init().

Member Data Documentation

◆ n_channel

const uint8_t PCA9956B::n_channel = 24
static

Number of channels

Definition at line 198 of file LEDDriver.h.


The documentation for this class was generated from the following files: