LEDDriver_NXP_Arduino 1.0.2
LED driver device operation sample code for Arduino
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Public Attributes | Protected Attributes | List of all members
LEDDriver Class Referenceabstract

#include <LEDDriver.h>

Inheritance diagram for LEDDriver:
PCA995x PCA995x_I2C PCA995x_SPI PCA9955B PCA9956B PCA9957

Public Types

enum  board { NONE , ARDUINO_SHIELD }
 

Public Member Functions

 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
 
virtual uint8_t reg_access (uint8_t reg)=0
 
virtual void reg_access_r (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)
 

Public Attributes

const uint8_t n_channel
 

Protected Attributes

const uint8_t reg_PWM
 
const uint8_t oe_pin
 

Detailed Description

LEDDriver class

LEDDriver class is a base class for all LED drivers All actual device class will be derived from this class

Definition at line 35 of file LEDDriver.h.

Member Enumeration Documentation

◆ board

enum LEDDriver::board

Definition at line 38 of file LEDDriver.h.

Constructor & Destructor Documentation

◆ LEDDriver()

LEDDriver::LEDDriver ( uint8_t n_ch,
uint8_t PWM_r,
uint8_t oe )

Definition at line 5 of file LEDDriver.cpp.

◆ ~LEDDriver()

LEDDriver::~LEDDriver ( )
virtual

Definition at line 10 of file LEDDriver.cpp.

Member Function Documentation

◆ buffer_enable()

void LEDDriver::buffer_enable ( bool flag)

Buffer mode enable/Disble

Parameters
flag'true' for enabling

Definition at line 47 of file LEDDriver.cpp.

◆ flush()

void LEDDriver::flush ( void )

Flushing data

Send buffered PWM data to the LED driver

Definition at line 41 of file LEDDriver.cpp.

◆ pwm() [1/2]

void LEDDriver::pwm ( float * values)

Set PWM value for all channels

Parameters
regregister number
*valuepointer to PWM value in float (0.0 ~ 1.0)

Definition at line 26 of file LEDDriver.cpp.

◆ pwm() [2/2]

void LEDDriver::pwm ( uint8_t ch,
float value )

Set PWM value for a channel

Parameters
regregister number
valuePWM value in float (0.0 ~ 1.0)

Definition at line 16 of file LEDDriver.cpp.

Member Data Documentation

◆ n_channel

const uint8_t LEDDriver::n_channel

Definition at line 76 of file LEDDriver.h.

◆ oe_pin

const uint8_t LEDDriver::oe_pin
protected

Definition at line 80 of file LEDDriver.h.

◆ reg_PWM

const uint8_t LEDDriver::reg_PWM
protected

Definition at line 79 of file LEDDriver.h.


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