| 260 |
Kevin |
1 |
#ifndef TLC59116_H
|
|
|
2 |
#define TLC59116_H
|
|
|
3 |
|
|
|
4 |
#define TLC59116_ADDR 0x60
|
|
|
5 |
#define TLC59116_ALLCALL 0x68
|
|
|
6 |
|
|
|
7 |
// Write to this register to reset chip
|
|
|
8 |
#define TLC59116_RESET 0x6B
|
|
|
9 |
|
|
|
10 |
// Increment all registers, rollover from 00000 to 11011
|
|
|
11 |
#define TLC59116_AUTO_INCR_ALL 0x80
|
|
|
12 |
// Increment brightness registers, rollover from 00010 to 10001
|
|
|
13 |
#define TLC59116_AUTO_INCR_BRIGHTNESS 0xA0
|
|
|
14 |
// Increment global control registers, rollover from 10010 to 10011
|
|
|
15 |
#define TLC59116_AUTO_INCR_GLBL_CTRL 0xC0
|
|
|
16 |
// Increment individual and global registers, rollover from 00010 to 10011
|
|
|
17 |
#define TLC59116_AUTO_INCR_INDV_CTRL 0xE0
|
|
|
18 |
|
|
|
19 |
#define TLC59116_REG_MODE1 0x00
|
|
|
20 |
#define TLC59116_REG_MODE2 0x01
|
|
|
21 |
#define TLC59116_REG_PWM0 0x02
|
|
|
22 |
#define TLC59116_REG_PWM1 0x03
|
|
|
23 |
#define TLC59116_REG_PWM2 0x04
|
|
|
24 |
#define TLC59116_REG_PWM3 0x05
|
|
|
25 |
#define TLC59116_REG_PWM4 0x06
|
|
|
26 |
#define TLC59116_REG_PWM5 0x07
|
|
|
27 |
#define TLC59116_REG_PWM6 0x08
|
|
|
28 |
#define TLC59116_REG_PWM7 0x09
|
|
|
29 |
#define TLC59116_REG_PWM8 0x0A
|
|
|
30 |
#define TLC59116_REG_PWM9 0x0B
|
|
|
31 |
#define TLC59116_REG_PWM10 0x0C
|
|
|
32 |
#define TLC59116_REG_PWM11 0x0D
|
|
|
33 |
#define TLC59116_REG_PWM12 0x0E
|
|
|
34 |
#define TLC59116_REG_PWM13 0x0F
|
|
|
35 |
#define TLC59116_REG_PWM14 0x10
|
|
|
36 |
#define TLC59116_REG_PWM15 0x11
|
|
|
37 |
#define TLC59116_REG_GRPPWM 0x12
|
|
|
38 |
#define TLC59116_REG_GRPFREQ 0x13
|
|
|
39 |
#define TLC59116_REG_LEDOUT0 0x14
|
|
|
40 |
#define TLC59116_REG_LEDOUT1 0x15
|
|
|
41 |
#define TLC59116_REG_LEDOUT2 0x16
|
|
|
42 |
#define TLC59116_REG_LEDOUT3 0x17
|
|
|
43 |
#define TLC59116_REG_SUBADR1 0x18
|
|
|
44 |
#define TLC59116_REG_SUBADR2 0x19
|
|
|
45 |
#define TLC59116_REG_SUBADR3 0x1A
|
|
|
46 |
#define TLC59116_REG_ALLCALLADR 0x1B
|
|
|
47 |
#define TLC59116_REG_IREF 0x1C
|
|
|
48 |
#define TLC59116_REG_EFLAG1 0x1D
|
|
|
49 |
#define TLC59116_REG_EFLAG2 0x1E
|
|
|
50 |
|
|
|
51 |
void TLC59116_Init(void);
|
| 270 |
Kevin |
52 |
void TLC59116_Write_All(LED_VALUES *values);
|
| 260 |
Kevin |
53 |
void TLC59116_Write_BC(uint8_t brightness);
|
|
|
54 |
|
|
|
55 |
#endif /* TLC59116_H */
|
|
|
56 |
|