Adafruit TLC5947 Arduino Library
Adafruit_TLC5947.h
Go to the documentation of this file.
1 
21 #ifndef _ADAFRUIT_TLC5947_H
22 #define _ADAFRUIT_TLC5947_H
23 
24 #include <Arduino.h>
25 
31 public:
32  Adafruit_TLC5947(uint16_t n, uint8_t c, uint8_t d, uint8_t l);
34 
35  boolean begin(void);
36 
37  void setPWM(uint16_t chan, uint16_t pwm);
38  uint16_t getPWM(uint16_t chan);
39  void setLED(uint16_t lednum, uint16_t r, uint16_t g, uint16_t b);
40  void write();
41 
42 private:
43  uint16_t *pwmbuffer;
44 
45  uint16_t numdrivers;
46  uint8_t _clk, _dat, _lat;
47 };
48 
49 #endif
void setPWM(uint16_t chan, uint16_t pwm)
Set the PWM channel / value.
Definition: Adafruit_TLC5947.cpp:93
boolean begin(void)
Setups the HW.
Definition: Adafruit_TLC5947.cpp:139
Adafruit_TLC5947(uint16_t n, uint8_t c, uint8_t d, uint8_t l)
Instantiates a new TLC5947 class.
Definition: Adafruit_TLC5947.cpp:43
void write()
Writes PWM data to the all connected TLC5947 boards.
Definition: Adafruit_TLC5947.cpp:63
~Adafruit_TLC5947()
Releases allocated resources.
Definition: Adafruit_TLC5947.cpp:58
void setLED(uint16_t lednum, uint16_t r, uint16_t g, uint16_t b)
Set LED.
Definition: Adafruit_TLC5947.cpp:128
uint16_t getPWM(uint16_t chan)
Get the PWM value for channel.
Definition: Adafruit_TLC5947.cpp:109
Class that stores state and functions for interacting with TLC5947 24-channel PWM/LED driver...
Definition: Adafruit_TLC5947.h:30