LP50XX Driver  V1.0
Library for interaction with the LP5009 and LP5012 LED driver
LP50XX.h File Reference
#include <Arduino.h>
#include <Wire.h>
Include dependency graph for LP50XX.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  LP50XX
 Class to communicate with the LP5009 or LP5012. More...
 

Macros

#define DEFAULT_ADDRESS   0x14
 
#define BROADCAST_ADDRESS   0x0C
 
#define DEVICE_CONFIG0   0x00
 
#define DEVICE_CONFIG1   0x01
 
#define LED_CONFIG0   0x02
 
#define BANK_BRIGHTNESS   0x03
 
#define BANK_A_COLOR   0x04
 
#define BANK_B_COLOR   0x05
 
#define BANK_C_COLOR   0x06
 
#define LED0_BRIGHTNESS   0x07
 
#define LED1_BRIGHTNESS   0x08
 
#define LED2_BRIGHTNESS   0x09
 
#define LED3_BRIGHTNESS   0x0A
 
#define OUT0_COLOR   0x0B
 
#define OUT1_COLOR   0x0C
 
#define OUT2_COLOR   0x0D
 
#define OUT3_COLOR   0x0E
 
#define OUT4_COLOR   0x0F
 
#define OUT5_COLOR   0x10
 
#define OUT6_COLOR   0x11
 
#define OUT7_COLOR   0x12
 
#define OUT8_COLOR   0x13
 
#define OUT9_COLOR   0x14
 
#define OUT10_COLOR   0x15
 
#define OUT11_COLOR   0x16
 
#define RESET_REGISTERS   0x17
 

Enumerations

enum  LED_Configuration {
  RGB, GRB, BGR, RBG,
  GBR, BRG
}
 
enum  LP50XX_LEDS { LED_0 = 1, LED_1 = 2, LED_2 = 4, LED_3 = 8 }
 
enum  LP50XX_Configuration {
  LED_GLOBAL_ON = 0 << 0, LED_GLOBAL_OFF = 1 << 0, MAX_CURRENT_25mA = 0 << 1, MAX_CURRENT_35mA = 1 << 1,
  PWM_DITHERING_OFF = 0 << 2, PWM_DITHERING_ON = 1 << 2, AUTO_INC_OFF = 0 << 3, AUTO_INC_ON = 1 << 3,
  POWER_SAVE_OFF = 0 << 4, POWER_SAVE_ON = 1 << 4, LOG_SCALE_OFF = 0 << 5, LOG_SCALE_ON = 1 << 5
}
 
enum  EAddressType { Normal, Broadcast }
 

Detailed Description

Author
rneurink (ruben.nosp@m..neu.nosp@m.rink@.nosp@m.gmai.nosp@m.l.com)
Version
1.0
Date
2021-07-04

Macro Definition Documentation

◆ BANK_A_COLOR

#define BANK_A_COLOR   0x04

◆ BANK_B_COLOR

#define BANK_B_COLOR   0x05

◆ BANK_BRIGHTNESS

#define BANK_BRIGHTNESS   0x03

◆ BANK_C_COLOR

#define BANK_C_COLOR   0x06

◆ BROADCAST_ADDRESS

#define BROADCAST_ADDRESS   0x0C

◆ DEFAULT_ADDRESS

#define DEFAULT_ADDRESS   0x14

◆ DEVICE_CONFIG0

#define DEVICE_CONFIG0   0x00

◆ DEVICE_CONFIG1

#define DEVICE_CONFIG1   0x01

◆ LED0_BRIGHTNESS

#define LED0_BRIGHTNESS   0x07

◆ LED1_BRIGHTNESS

#define LED1_BRIGHTNESS   0x08

◆ LED2_BRIGHTNESS

#define LED2_BRIGHTNESS   0x09

◆ LED3_BRIGHTNESS

#define LED3_BRIGHTNESS   0x0A

◆ LED_CONFIG0

#define LED_CONFIG0   0x02

◆ OUT0_COLOR

#define OUT0_COLOR   0x0B

◆ OUT10_COLOR

#define OUT10_COLOR   0x15

◆ OUT11_COLOR

#define OUT11_COLOR   0x16

◆ OUT1_COLOR

#define OUT1_COLOR   0x0C

◆ OUT2_COLOR

#define OUT2_COLOR   0x0D

◆ OUT3_COLOR

#define OUT3_COLOR   0x0E

◆ OUT4_COLOR

#define OUT4_COLOR   0x0F

◆ OUT5_COLOR

#define OUT5_COLOR   0x10

◆ OUT6_COLOR

#define OUT6_COLOR   0x11

◆ OUT7_COLOR

#define OUT7_COLOR   0x12

◆ OUT8_COLOR

#define OUT8_COLOR   0x13

◆ OUT9_COLOR

#define OUT9_COLOR   0x14

◆ RESET_REGISTERS

#define RESET_REGISTERS   0x17

Enumeration Type Documentation

◆ EAddressType

Enumerator
Normal 
Broadcast 

◆ LED_Configuration

Enumerator
RGB 
GRB 
BGR 
RBG 
GBR 
BRG 

◆ LP50XX_Configuration

Enumerator
LED_GLOBAL_ON 
LED_GLOBAL_OFF 
MAX_CURRENT_25mA 
MAX_CURRENT_35mA 
PWM_DITHERING_OFF 
PWM_DITHERING_ON 
AUTO_INC_OFF 
AUTO_INC_ON 
POWER_SAVE_OFF 
POWER_SAVE_ON 
LOG_SCALE_OFF 
LOG_SCALE_ON 

◆ LP50XX_LEDS

Enumerator
LED_0 
LED_1 
LED_2 
LED_3