TLC59116 Library  v0.2
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Friends | List of all members
TLC59116::Broadcast Class Reference

#include <TLC59116.h>

Inheritance diagram for TLC59116::Broadcast:
Inheritance graph
[legend]
Collaboration diagram for TLC59116::Broadcast:
Collaboration graph
[legend]

Public Member Functions

void _begin_trans (byte register_num)
 
void _begin_trans (byte auto_mode, byte register_num)
 
int _end_trans ()
 
 Broadcast (TwoWire &bus, TLC59116Manager &m)
 
byte control_register (byte register_num)
 
void control_register (byte register_num, byte data)
 
void control_register (byte count, const byte *register_num, const byte data[])
 
TLC59116_Unmanageddescribe_actual ()
 
Broadcastenable_outputs (bool yes=true, bool with_delay=true)
 Master power switch (the TLC59116Manager sets this on/true by default) More...
 
byte fetch_registers (byte start_r, byte count, byte registers[])
 
void get_control_registers (byte count, const byte *register_num, byte data[])
 
bool is_OSC_bit (byte mode1_value)
 
bool is_SUBADR_bit (byte mode1_value, byte which)
 
Global Functions

Controlling various global features of the device (see also, the "Software Current Control" section)

bool is_enable_outputs ()
 Is master power on? More...
 
bool is_enabled ()
 
Digital Functions

Analogous to DigitalWrite.

Arduino DigitalWrite uses HIGH and LOW, but the device is a "sink", so "on" is actually a LOW. Thus, this library uses "on" and "off" for terminology.

There are several aliases, and overloaded functions here (and for the pwm functions below). The intention was to provide natural overloads and aliases. I've shied away from using the Arduino DigitalWrite and AnalogWrite so far.

These functions only change the specified channels, they'll leave other outputs, like a PWM channel alone.

You can have some channels doing PWM, and some channels doing digital.

TLC59116set_outputs (word pattern, word which)
 Only change the channels (that are marked in bit_which) to on/off as marked in bit_pattern More...
 
TLC59116pattern (word bit_pattern, word bit_which=0xFFFF)
 Alias for set_outputs() More...
 
TLC59116on_pattern (word pattern)
 Turn on by bit pattern. More...
 
TLC59116off_pattern (word pattern)
 Turn off by bit pattern. More...
 
TLC59116set (int led_num, bool offon)
 Turn one on/off, much like DigitalWrite. More...
 
TLC59116on (int led_num)
 Turn one on. More...
 
TLC59116off (int led_num)
 Turn one off. More...
 
PWM Functions

Analogous to AnalogWrite

You can have some channels doing PWM, and some channels doing digital.

Remember, the device is a "sink", even for PWM. Minus side of LED goes to the output pin.

Bug:
Be careful with start/end arguments, if they are out of range (0..15) you will have mysterious problems.
Todo:
Put in range checking
TLC59116set_outputs (byte led_num_start, byte led_num_end, const byte brightness[])
 PWM, start..end, list-of-brightness. More...
 
TLC59116set_outputs (const byte brightness[16])
 Set all 16 PWM according to the brightness list. More...
 
TLC59116pwm (byte led_num_start, byte led_num_end, const byte brightness[])
 Alias of set_outputs() above. More...
 
TLC59116pwm (byte led_num_start, byte led_num_end, byte pwm_value)
 PWM, start..end same brightness. More...
 
TLC59116pwm (const byte(&brightness)[16])
 Set all 16 PWM according to the brightness list, same as above. More...
 
TLC59116pwm (byte led_num, byte brightness)
 PWM for one channel. More...
 
Group Functions
Warning
The TLC59116 has a hardware bug:

If you decrease the value (blink_time or brightness) in these functions, the chip may act like the value is max for one "cycle". This causes a full-brightness result for group_pwm, and a 10 second blink-length for group_blink. I think this is because:

  • There is a continously running timer, counting up.
  • The "value" is compared to the timer, and triggers the action and a reset of the timer.
  • If you move the "value" down, you may skip over the current timer value, so it runs to the maximum value before wrapping around again. "reset" is the only thing that I know of that will reset the timer. But, more experimentation is needed.

I recommend you only set group functions once (or only increase values).

Of course, you could TLC59116Manager::reset() everytime, too.

TLC59116group_pwm (word bit_pattern, byte brightness)
 
TLC59116group_blink (byte blink_period, byte on_ratio=128)
 Blink all the LEDs, at their current/last PWM setting. More...
 
TLC59116group_blink (word bit_pattern, int blink_delay, int on_ratio=128)
 
TLC59116group_blink (double blink_length_secs, double on_percent=50.0)
 
TLC59116group_blink (word bit_pattern, double blink_length_secs, double on_percent=50.0)
 
TLC59116group_blink (unsigned int bit_pattern, int blink_length_secs, double on_percent=50.0)
 
Group/Broadcast Addresses

Addresses for broadcast (allcall_address) and group-broadcase (SUBADR_x).

Addresses should be specified as 0x60..0x6F.

It is illegal to set any address to Reset_Addr (0x6B), it will be ignored with warning.

byte Reset_address ()
 The reset-address, unchangeable. More...
 
byte allcall_address ()
 Get broadcast address, see below to set/enable. More...
 
TLC59116allcall_address (byte address, bool enable=true)
 Set and enable/disable the broadcast address (allcall_addr). More...
 
TLC59116allcall_address_enable ()
 Enable broadcast. More...
 
TLC59116allcall_address_disable ()
 Disable broadcast. More...
 
bool is_allcall_address ()
 Is broadcast enabled? More...
 
byte SUBADR_address (byte which)
 Get the SUBADR_n address. More...
 
TLC59116SUBADR_address (byte which, byte address, bool enable=true)
 Set the SUBADR_n address. More...
 
bool is_SUBADR_address (byte which)
 Is SUBADR_n enabled? More...
 
TLC59116SUBADR_address_enable (byte which)
 Enable SUBADR_n. More...
 
TLC59116SUBADR_address_disable (byte which)
 
Software Current Control
TLC59116set_milliamps (byte ma, int Rext=Rext_Min)
 
int milliamps (int Rext=Rext_Min)
 
Convenience

Since we allow function-chaining, it seems like a few convenience functions might be nice.

Note all the functions (not just these convenience functions) that look like

TLC59116& xxx(...)

They return a reference to the device, so you can chain functions.

TLC59116delay (int msec)
 
Debugging

You can enable debug output by editing TLC59116.cpp, and TLC59116_Unmanaged.cpp. Add one or both:

#define TLC59116_LOWLEVEL 1
#define TLC59116_DEV 1
TLC59116describe_shadow ()
 Print the registers, as we've cached them. cf. describe_actual() More...
 
TLC59116resync_shadow_registers ()
 
Info Functions
byte address ()
 

Static Public Member Functions

static void _begin_trans (TwoWire &bus, byte addr, byte register_num)
 
static void _begin_trans (TwoWire &bus, byte addr, byte auto_mode, byte register_num)
 
static int _end_trans (TwoWire &bus)
 
static byte best_iref (byte ma, int Rext=Rext_Min)
 
static void describe_group_mode (byte *registers)
 
static void describe_registers (byte *registers)
 
static byte i_out (byte CM, byte HC, byte CC, int Rext=Rext_Min)
 
static byte i_out (byte iref_value, int Rext=Rext_Min)
 
static byte i_out_d (byte CM, byte HC, byte D, int Rext=Rext_Min)
 
static bool is_control_register (byte register_num)
 
static bool is_default_single_addr (byte address)
 
static bool is_default_SUBADR (byte address)
 
static bool is_device_range_addr (byte address)
 
static byte is_valid_led (byte v)
 
static void LEDOUTx_CHECK (int line, byte led_num)
 
static byte LEDOUTx_Register (byte led_num)
 
static byte LEDx_digital_off_bits (byte led_num)
 
static byte LEDx_digital_on_bits (byte led_num)
 
static byte LEDx_gpwm_bits (byte led_num)
 
static byte LEDx_pwm_bits (byte led_num)
 
static byte LEDx_Register_bits (byte led_num, byte register_value)
 
static byte LEDx_Register_mask (byte led_num)
 
static byte LEDx_set_mode (byte was, byte led_num, byte mode)
 
static void LEDx_set_mode (byte registers[], byte to_what, word which)
 
static byte LEDx_to_Register_bits (byte led_num, byte out_mode)
 
static byte normalize_address (byte address)
 
static byte PWMx_Register (byte led_num)
 
static byte reverse_cc (byte CC)
 
static Scanscan (void)
 
static byte set_with_mask (byte was, byte mask, byte new_bits)
 
static void set_with_mask (byte *was, byte mask, byte new_bits)
 
static byte SUBADRx_Register (byte i)
 

Public Attributes

TwoWire & i2cbus
 

Static Public Attributes

static const byte AllCall_Addr = Base_Addr + 0x08
 
static const byte AllCall_Addr_Register = 0x1B
 
static const byte Auto_All = 0b10000000
 
static const byte Auto_GRP = 0b11000000
 
static const byte Auto_PWM = 0b10100000
 
static const byte Auto_PWM_GRP = 0b11100000
 
static const byte Base_Addr = 0x60
 
static const byte Channels = 16
 
static const byte Control_Register_Max = 0x1E
 
static const byte Control_Register_Min = 0
 
static const char * Device = "TLC59116"
 
static const byte EFLAG1_Register = 0x1D
 
static const byte EFLAG2_Register = EFLAG1_Register + 1
 
static const byte GRPFREQ_Register = 0x13
 
static const byte GRPPWM_Register = 0x12
 
static const byte IREF_CC_mask = 0b111111
 
static const byte IREF_CM_mask = 1<<7
 
static const byte IREF_HC_mask = 1<<6
 
static const byte IREF_Register = 0x1C
 
static const byte LEDOUT0_Register = 0x14
 
static const byte LEDOUT_DigitalOff = 0b00
 
static const byte LEDOUT_DigitalOn = 0b01
 
static const byte LEDOUT_GRPPWM = 0b11
 
static const byte LEDOUT_Mask = 0b11
 
static const byte LEDOUT_PWM = 0b10
 
static const byte LEDOUTx_Max = Channels-1
 
static const byte Max_Addr = Base_Addr + 0xF
 
static const byte MODE1_ALLCALL_mask = 0b1
 
static const byte MODE1_OSC_mask = 0b10000
 
static const byte MODE1_Register = 0x00
 
static const byte MODE1_SUB1_mask = 0b1000
 
static const byte MODE1_SUB2_mask = 0b100
 
static const byte MODE1_SUB3_mask = 0b10
 
static const byte MODE2_DMBLNK = 1 << 5
 
static const byte MODE2_EFCLR = 1 << 7
 
static const byte MODE2_OCH = 1 << 3
 
static const byte MODE2_Register = 0x01
 
static const byte PWM0_Register = 0x02
 
static const byte Reset_Addr = Base_Addr + 0x0B
 
static const word Reset_Bytes = 0xA55A
 
static const int Rext_Min = 156
 
static const byte SUBADR1 = Base_Addr + 0x09
 
static const byte SUBADR1_Register = 0x18
 
static const byte SUBADR2 = Base_Addr + 0x0A
 
static const byte SUBADR3 = Base_Addr + 0x0C
 

Friends

class TLC59116Manager
 

Constructor & Destructor Documentation

TLC59116::Broadcast::Broadcast ( TwoWire &  bus,
TLC59116Manager m 
)
inline

Member Function Documentation

TLC59116::Broadcast & TLC59116::Broadcast::enable_outputs ( bool  yes = true,
bool  with_delay = true 
)
virtual

Master power switch (the TLC59116Manager sets this on/true by default)

It takes the device a moment to enable power, so typically leave with_delay true

Reimplemented from TLC59116.

Here is the call graph for this function:

Here is the caller graph for this function:

bool TLC59116::is_enable_outputs ( )
inlineinherited

Is master power on?

Here is the call graph for this function:

Here is the caller graph for this function:

bool TLC59116::is_enabled ( )
inlineinherited

Alias for is_enable_outputs()

Here is the call graph for this function:

TLC59116 & TLC59116::set_outputs ( word  pattern,
word  which 
)
inherited

Only change the channels (that are marked in bit_which) to on/off as marked in bit_pattern

(cf. on_pattern(word), on(), off() )

Examples:

// Bit patterns are conveniently written using hex or binary:
// Each "digit" of a hex number is 4 bits, so 0xF is binary "1111"
// e.g. 0xFFFF is 16 bits on
// Binary is written out like: 0b10111. High bits are 0.
// _change_ first channel to on
first_device.set_outputs(0xFFFF, 0b1); // bits 1..15 of _bit_which_ are 0, so "no change"
// _change_ first channel to off
first_device.set_outputs(0x0000, 0b1); // bits 1..15 of _bit_which_ are 0, so "no change"
// _change_ to ON, for all 16 channels
first_device.set_outputs(0xFFFF, 0xFFFF);
// change odd channels to on, leave even unaffected
first_device.set_outputs(0xFFFF, 0b0101010101010101);
// _bit_which_ can be a variable, expression, function, etc.
first_device.set_outputs(0xFFFF, random(0x10)); // randomly turn on the first 4 channels
first_device.set_outputs(0x0000, random(0x10)); // randomly turn off the first 4 channels
// _bit_pattern can be a variable, expression, function, etc.
first_device.set_outputs(random(0xF), 0x000F); // randomly _change_ the first 4 channels
// Leave "other" channels alone
first_device.pwm(1,128); // channel 1 set to half bright
first_device.set_outputs(0b101,0xb101); // Only change 0 & 2, 1 is still PWM=128
Parameters
patternon/off for each channel by bit
whichBut, only change these bits

Here is the call graph for this function:

Here is the caller graph for this function:

TLC59116 & TLC59116::set_outputs ( byte  led_num_start,
byte  led_num_end,
const byte  brightness[] 
)
inherited

PWM, start..end, list-of-brightness.

Examples:

// Simple list of brightness for 0,1,2
byte brightness[] = {10,20,30};
first_device.set_outputs(0,2,brightness); // set first 3 to very dim values
// The range gets "wrapped" back to 0..15
byte wrapbrightness[] = {100,110,120,130}; // 4 brightnesses
first_device.set_outputs(15,18, wrapbrightness); // 15=100, 0=110, 1=120, 2=130
Parameters
led_num_startfirst channel
led_num_endlast channel
brightnessA list of PWM values. Tolerates led_num_end>15 which wraps around

Here is the call graph for this function:

TLC59116& TLC59116::set_outputs ( const byte  brightness[16])
inlineinherited

Set all 16 PWM according to the brightness list.

Examples:

// Set all 16 PWM values. Probably you would have calculated all of these.
byte allbrightness[] = {101,102,103,104,105,106,107,108,109,110,111,112,113,114,115,116};
first_device.set_outputs(allbrightness);

Here is the call graph for this function:

Here is the caller graph for this function:

TLC59116& TLC59116::pattern ( word  bit_pattern,
word  bit_which = 0xFFFF 
)
inlineinherited

Alias for set_outputs()

Here is the call graph for this function:

TLC59116& TLC59116::on_pattern ( word  pattern)
inlineinherited

Turn on by bit pattern.

See set_outputs(word,word) examples for hex/binary notation hints

Examples:

// Only the on-bits have an effect:
first_device.on_pattern(0b101); // channel 0 and 2 on
first_device.on_pattern(random(0xF)); // randomly turn on the first 4 channels
first_device.on_pattern(0); // no effect: no bits set
first_device.on_pattern(0xFFFF); // All on

Here is the call graph for this function:

TLC59116& TLC59116::off_pattern ( word  pattern)
inlineinherited

Turn off by bit pattern.

See set_outputs(word,word) examples for hex/binary notation hints

Examples:

// Only the bits that are set have an effect:
first_device.off_pattern(0b101); // channel 0 and 2 off, all others left alone
first_device.off_pattern(random(0xF)); // randomly turn off the first 4 channels
first_device.off_pattern(0); // no effect: no bits set
first_device.off_pattern(0xFFFF); // All off

Here is the call graph for this function:

TLC59116& TLC59116::set ( int  led_num,
bool  offon 
)
inlineinherited

Turn one on/off, much like DigitalWrite.

Examples:

// Setting on/off for a pin
first_device.set(0,true); // turn channel 0 on
first_device.set(0,false); // turn channel 0 false
first_device.set(1,random(1)); // random setting of channel 1
first_device.set(1,random(2)); // On 2/3 of the time, randomly
first_device.set(15,true); // turn the last channel on
Parameters
offontrue for on

Here is the call graph for this function:

Here is the caller graph for this function:

TLC59116& TLC59116::on ( int  led_num)
inlineinherited

Turn one on.

Here is the call graph for this function:

TLC59116& TLC59116::off ( int  led_num)
inlineinherited

Turn one off.

Here is the call graph for this function:

TLC59116& TLC59116::pwm ( byte  led_num_start,
byte  led_num_end,
const byte  brightness[] 
)
inlineinherited

Alias of set_outputs() above.

Here is the call graph for this function:

TLC59116& TLC59116::pwm ( byte  led_num_start,
byte  led_num_end,
byte  pwm_value 
)
inlineinherited

PWM, start..end same brightness.

Examples:

first_device.pwm(4,15, 129); // 4..15 are just above half-bright

Here is the call graph for this function:

TLC59116& TLC59116::pwm ( const byte(&)  brightness[16])
inlineinherited

Set all 16 PWM according to the brightness list, same as above.

Here is the call graph for this function:

TLC59116& TLC59116::pwm ( byte  led_num,
byte  brightness 
)
inlineinherited

PWM for one channel.

Examples:

first_device.pwm(4, 240); // just channel 4 to pretty-bright

Here is the call graph for this function:

TLC59116 & TLC59116::group_pwm ( word  bit_pattern,
byte  brightness 
)
inherited

Superpose group-pwm on current pwm setting (but, current should be 255 for best results)

Warning
Hardware Bug, see Group Functions
Parameters
bit_patternchannels by bit
brightnesssuperposed PWM

Here is the call graph for this function:

TLC59116& TLC59116::group_blink ( byte  blink_period,
byte  on_ratio = 128 
)
inlineinherited

Blink all the LEDs, at their current/last PWM setting.

Set PWM values first. To turn off blink, set channels to PWM or digital-on/off

See TLC59116& group_blink(double, double) for a version in seconds/percent.

Warning
Hardware Bug, see Group Functions
Parameters
blink_periodblink-length secs = (blink_period + 1)/24
on_ratioratio that the blink is on: on_ratio/256

Here is the caller graph for this function:

TLC59116 & TLC59116::group_blink ( word  bit_pattern,
int  blink_delay,
int  on_ratio = 128 
)
inherited

As TLC59116& group_blink(byte,byte), but you can specify the channels by bit-pattern

Warning
Hardware Bug, see Group Functions

Here is the call graph for this function:

TLC59116& TLC59116::group_blink ( double  blink_length_secs,
double  on_percent = 50.0 
)
inlineinherited

Blink all the LEDs, at their current/last PWM setting by len/%.

Warning
Hardware Bug, see Group Functions
Parameters
blink_length_secs0.041secs (24.00384hz) to 10.54secs (.09375hz) in steps of .04166secs
on_percent% of blink-cycle that is on

Here is the call graph for this function:

TLC59116& TLC59116::group_blink ( word  bit_pattern,
double  blink_length_secs,
double  on_percent = 50.0 
)
inlineinherited

As TLC59116& group_blink(double,double), but you can specify the channels by bit-pattern

Warning
Hardware Bug, see Group Functions

Here is the call graph for this function:

TLC59116& TLC59116::group_blink ( unsigned int  bit_pattern,
int  blink_length_secs,
double  on_percent = 50.0 
)
inlineinherited

Same as TLC59116& group_blink(word, double, double), but blink_length is an integer (1..10 secs)

Warning
Hardware Bug, see Group Functions

Here is the call graph for this function:

byte TLC59116::Reset_address ( )
inlineinherited

The reset-address, unchangeable.

Not much you should do with this. See TLC59116Manager::reset()

byte TLC59116::allcall_address ( )
inlineinherited

Get broadcast address, see below to set/enable.

TLC59116 & TLC59116::allcall_address ( byte  address,
bool  enable = true 
)
inherited

Set and enable/disable the broadcast address (allcall_addr).

Each device can have a different allcall_address, and have it disabled/enabled.

By default, the TLC59116Manager arranges for the broadcast address to be enabled.

Bug:
However, the TLC59116Manager.broadcast() object only assumes the default allcall_address 0x68. So, it won't work if you change the allcall_address.

Examples:

// Everybody change broadcast to I2C address 0x13
tlcmanager.broadcast().allcall_address(0x13);
// Put first 2 devices on I2C address 0x14 for broadcast
tlcmanager[0].allcall_address(0x14);
tlcmanager[1].allcall_address(0x14);
TLC59116 & TLC59116::allcall_address_enable ( )
inherited

Enable broadcast.

Here is the call graph for this function:

TLC59116 & TLC59116::allcall_address_disable ( )
inherited

Disable broadcast.

Here is the call graph for this function:

bool TLC59116::is_allcall_address ( )
inlineinherited

Is broadcast enabled?

byte TLC59116::SUBADR_address ( byte  which)
inlineinherited

Get the SUBADR_n address.

Each device can have a 3 more broadcast addresses. Thus you can form various groups of the devices.

By default, the SUBADR's are disabled. You must enable them if you want to use them (see SUBADR_address(byte, byte, bool), SUBADR_address_enable(byte), SUBADR_address_disable(byte) ).

The default addresses are: are 0x69, 0x6a, 0x6b

Here is the call graph for this function:

TLC59116 & TLC59116::SUBADR_address ( byte  which,
byte  address,
bool  enable = true 
)
inherited

Set the SUBADR_n address.

Examples:

// Each device is red, green, or blue. Put them in groups
for (int i=0; i<tlcmanager.device_count(); i++) {
// device[0,3,6,9,12,15] has SUBADR_0=0x10,
// device[1,4,7,10,13] has SUBADR_0=0x11,
// device[2,5,8,11,14] has SUBADR_0=0x12,
tlcmanager[i].SUBADR_address(0, 0x10 + (i%3)); // modulus wraps i to 0..2
}
// Now, if we knew how, we could tell the 3 different groups to do things
Bug:
We don't track commands on SUBADR_n's, so this library will get very confused about the state of the devices and do confusing things if you mix broadcasts to SUBADR_n devices, and individual devices in that SUBADR_n group.
Bug:
Also, this library provides no easy access to broadcast to a SUBADR_n group.
Todo:
Provide SUBADR_n broadcast functionality.
bool TLC59116::is_SUBADR_address ( byte  which)
inlineinherited

Is SUBADR_n enabled?

Here is the call graph for this function:

TLC59116& TLC59116::SUBADR_address_enable ( byte  which)
inherited

Enable SUBADR_n.

TLC59116& TLC59116::SUBADR_address_disable ( byte  which)
inherited

Disable SUBADR_n

TLC59116 & TLC59116::set_milliamps ( byte  ma,
int  Rext = Rext_Min 
)
inherited

We need a Rext value (the resistor attached to the Rext pin) to calculate this, e.g. 156ohms gives 120mA at reset (default), 937ohms gives 20mA. This function can use a default value of 156ohms to do the calculation.

By default, this is set to maximum current (e.g. 120mA for 156ohm). Remember that common LEDs are usually 20mA, though 10mA is becoming common (the tiny surface-mount LEDs are usually 5mA).

You probably want to set the current before you turn on any LEDs!

Note that this will tend to set the output 1milliamp low (due to rounding).

This will also clip the calculated mA to the minimum..120mA range (for Rext).

Check the extant/calculated value with milliamps().

See the section "The TLC59116 Device" for some short notes on "constant current".

Examples:

void setup() {
// Assume we put a 100ohm resistor on the Rext pin
// set it to 5mA before we play with any outputs
tlcmanager[0].set_milliamps(5,100);
Serial.print("Device 0 is actually ");
Serial.print(tlcmanager[0].milliamps(100)); // might be slightly off due to rounding
Serial.println("mA");
void loop() {
// Assume we put a 100ohm resistor on the Rext pin
// Mess with the current
tlcmanager[0].set_milliamps(random(100)+20,100); // probably cook our led!

Here is the call graph for this function:

int TLC59116::milliamps ( int  Rext = Rext_Min)
inlineinherited

The calculated current setting

Here is the call graph for this function:

TLC59116& TLC59116::delay ( int  msec)
inlineinherited

Just like the Arduino delay() function

TLC59116 & TLC59116::describe_shadow ( )
inherited

Print the registers, as we've cached them. cf. describe_actual()

Here is the call graph for this function:

TLC59116 & TLC59116::resync_shadow_registers ( )
inherited

Fetch the actual into our cached registers

Here is the call graph for this function:

static bool TLC59116_Unmanaged::is_device_range_addr ( byte  address)
inlinestaticinherited

Here is the caller graph for this function:

static bool TLC59116_Unmanaged::is_default_SUBADR ( byte  address)
inlinestaticinherited

Here is the caller graph for this function:

static bool TLC59116_Unmanaged::is_default_single_addr ( byte  address)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

bool TLC59116_Unmanaged::is_OSC_bit ( byte  mode1_value)
inlineinherited

Here is the caller graph for this function:

bool TLC59116_Unmanaged::is_SUBADR_bit ( byte  mode1_value,
byte  which 
)
inlineinherited

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::PWMx_Register ( byte  led_num)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::LEDOUTx_Register ( byte  led_num)
inlinestaticinherited

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::is_valid_led ( byte  v)
inlinestaticinherited
static void TLC59116_Unmanaged::LEDOUTx_CHECK ( int  line,
byte  led_num 
)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::LEDx_Register_mask ( byte  led_num)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::LEDx_Register_bits ( byte  led_num,
byte  register_value 
)
inlinestaticinherited

Here is the call graph for this function:

static byte TLC59116_Unmanaged::LEDx_to_Register_bits ( byte  led_num,
byte  out_mode 
)
inlinestaticinherited

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::LEDx_set_mode ( byte  was,
byte  led_num,
byte  mode 
)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

void TLC59116_Unmanaged::LEDx_set_mode ( byte  registers[],
byte  to_what,
word  which 
)
staticinherited

Here is the call graph for this function:

static byte TLC59116_Unmanaged::LEDx_pwm_bits ( byte  led_num)
inlinestaticinherited

Here is the call graph for this function:

static byte TLC59116_Unmanaged::LEDx_gpwm_bits ( byte  led_num)
inlinestaticinherited

Here is the call graph for this function:

static byte TLC59116_Unmanaged::LEDx_digital_off_bits ( byte  led_num)
inlinestaticinherited
static byte TLC59116_Unmanaged::LEDx_digital_on_bits ( byte  led_num)
inlinestaticinherited

Here is the call graph for this function:

static byte TLC59116_Unmanaged::SUBADRx_Register ( byte  i)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

byte TLC59116_Unmanaged::best_iref ( byte  ma,
int  Rext = Rext_Min 
)
staticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

byte TLC59116_Unmanaged::i_out ( byte  CM,
byte  HC,
byte  CC,
int  Rext = Rext_Min 
)
staticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::i_out ( byte  iref_value,
int  Rext = Rext_Min 
)
inlinestaticinherited

Here is the call graph for this function:

byte TLC59116_Unmanaged::i_out_d ( byte  CM,
byte  HC,
byte  D,
int  Rext = Rext_Min 
)
staticinherited

Here is the caller graph for this function:

static bool TLC59116_Unmanaged::is_control_register ( byte  register_num)
inlinestaticinherited

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::normalize_address ( byte  address)
inlinestaticinherited

Here is the call graph for this function:

static byte TLC59116_Unmanaged::set_with_mask ( byte  was,
byte  mask,
byte  new_bits 
)
inlinestaticinherited

Here is the caller graph for this function:

static void TLC59116_Unmanaged::set_with_mask ( byte *  was,
byte  mask,
byte  new_bits 
)
inlinestaticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

void TLC59116_Unmanaged::describe_registers ( byte *  registers)
staticinherited

Here is the call graph for this function:

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::reverse_cc ( byte  CC)
inlinestaticinherited

Here is the caller graph for this function:

byte TLC59116_Unmanaged::fetch_registers ( byte  start_r,
byte  count,
byte  registers[] 
)
inherited

Here is the call graph for this function:

Here is the caller graph for this function:

TLC59116_Unmanaged & TLC59116_Unmanaged::describe_actual ( )
inherited

Here is the call graph for this function:

void TLC59116_Unmanaged::describe_group_mode ( byte *  registers)
staticinherited

Here is the caller graph for this function:

byte TLC59116_Unmanaged::address ( )
inlineinherited

Here is the caller graph for this function:

byte TLC59116_Unmanaged::control_register ( byte  register_num)
inherited
void TLC59116_Unmanaged::control_register ( byte  register_num,
byte  data 
)
inherited

Here is the call graph for this function:

void TLC59116_Unmanaged::control_register ( byte  count,
const byte *  register_num,
const byte  data[] 
)
inherited
void TLC59116_Unmanaged::get_control_registers ( byte  count,
const byte *  register_num,
byte  data[] 
)
inherited
void TLC59116_Unmanaged::_begin_trans ( byte  register_num)
inlineinherited

Here is the call graph for this function:

Here is the caller graph for this function:

void TLC59116_Unmanaged::_begin_trans ( byte  auto_mode,
byte  register_num 
)
inlineinherited

Here is the call graph for this function:

static void TLC59116_Unmanaged::_begin_trans ( TwoWire &  bus,
byte  addr,
byte  register_num 
)
inlinestaticinherited

Here is the call graph for this function:

static void TLC59116_Unmanaged::_begin_trans ( TwoWire &  bus,
byte  addr,
byte  auto_mode,
byte  register_num 
)
inlinestaticinherited

Here is the call graph for this function:

int TLC59116_Unmanaged::_end_trans ( )
inlineinherited

Here is the caller graph for this function:

static int TLC59116_Unmanaged::_end_trans ( TwoWire &  bus)
inlinestaticinherited

Here is the call graph for this function:

static Scan& TLC59116_Unmanaged::scan ( void  )
inlinestaticinherited

Here is the call graph for this function:

Friends And Related Function Documentation

friend class TLC59116Manager
friend

Member Data Documentation

const byte TLC59116_Unmanaged::Channels = 16
staticinherited
const byte TLC59116_Unmanaged::Base_Addr = 0x60
staticinherited
const byte TLC59116_Unmanaged::AllCall_Addr = Base_Addr + 0x08
staticinherited
const byte TLC59116_Unmanaged::SUBADR1 = Base_Addr + 0x09
staticinherited
const byte TLC59116_Unmanaged::SUBADR2 = Base_Addr + 0x0A
staticinherited
const byte TLC59116_Unmanaged::Reset_Addr = Base_Addr + 0x0B
staticinherited
const word TLC59116_Unmanaged::Reset_Bytes = 0xA55A
staticinherited
const byte TLC59116_Unmanaged::SUBADR3 = Base_Addr + 0x0C
staticinherited
const byte TLC59116_Unmanaged::Max_Addr = Base_Addr + 0xF
staticinherited
const byte TLC59116_Unmanaged::Auto_All = 0b10000000
staticinherited
const byte TLC59116_Unmanaged::Auto_PWM = 0b10100000
staticinherited
const byte TLC59116_Unmanaged::Auto_GRP = 0b11000000
staticinherited
const byte TLC59116_Unmanaged::Auto_PWM_GRP = 0b11100000
staticinherited
const byte TLC59116_Unmanaged::Control_Register_Min = 0
staticinherited
const byte TLC59116_Unmanaged::MODE1_Register = 0x00
staticinherited
const byte TLC59116_Unmanaged::MODE1_OSC_mask = 0b10000
staticinherited
const byte TLC59116_Unmanaged::MODE1_SUB1_mask = 0b1000
staticinherited
const byte TLC59116_Unmanaged::MODE1_SUB2_mask = 0b100
staticinherited
const byte TLC59116_Unmanaged::MODE1_SUB3_mask = 0b10
staticinherited
const byte TLC59116_Unmanaged::MODE1_ALLCALL_mask = 0b1
staticinherited
const byte TLC59116_Unmanaged::MODE2_Register = 0x01
staticinherited
const byte TLC59116_Unmanaged::MODE2_DMBLNK = 1 << 5
staticinherited
const byte TLC59116_Unmanaged::MODE2_EFCLR = 1 << 7
staticinherited
const byte TLC59116_Unmanaged::MODE2_OCH = 1 << 3
staticinherited
const byte TLC59116_Unmanaged::PWM0_Register = 0x02
staticinherited
const byte TLC59116_Unmanaged::GRPPWM_Register = 0x12
staticinherited
const byte TLC59116_Unmanaged::GRPFREQ_Register = 0x13
staticinherited
const byte TLC59116_Unmanaged::LEDOUT0_Register = 0x14
staticinherited
const byte TLC59116_Unmanaged::LEDOUTx_Max = Channels-1
staticinherited
const byte TLC59116_Unmanaged::LEDOUT_Mask = 0b11
staticinherited
const byte TLC59116_Unmanaged::LEDOUT_PWM = 0b10
staticinherited
const byte TLC59116_Unmanaged::LEDOUT_GRPPWM = 0b11
staticinherited
const byte TLC59116_Unmanaged::LEDOUT_DigitalOn = 0b01
staticinherited
const byte TLC59116_Unmanaged::LEDOUT_DigitalOff = 0b00
staticinherited
const byte TLC59116_Unmanaged::SUBADR1_Register = 0x18
staticinherited
const byte TLC59116_Unmanaged::AllCall_Addr_Register = 0x1B
staticinherited
const byte TLC59116_Unmanaged::IREF_Register = 0x1C
staticinherited
const byte TLC59116_Unmanaged::IREF_CM_mask = 1<<7
staticinherited
const byte TLC59116_Unmanaged::IREF_HC_mask = 1<<6
staticinherited
const byte TLC59116_Unmanaged::IREF_CC_mask = 0b111111
staticinherited
const int TLC59116_Unmanaged::Rext_Min = 156
staticinherited
const byte TLC59116_Unmanaged::EFLAG1_Register = 0x1D
staticinherited
const byte TLC59116_Unmanaged::EFLAG2_Register = EFLAG1_Register + 1
staticinherited
const byte TLC59116_Unmanaged::Control_Register_Max = 0x1E
staticinherited
const char * TLC59116_Unmanaged::Device = "TLC59116"
staticinherited
TwoWire& TLC59116_Unmanaged::i2cbus
inherited

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