TLC59116 Library  v0.2
Classes | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | List of all members
TLC59116_Unmanaged Class Reference

#include <TLC59116_Unmanaged.h>

Inheritance diagram for TLC59116_Unmanaged:
Inheritance graph
[legend]
Collaboration diagram for TLC59116_Unmanaged:
Collaboration graph
[legend]

Classes

class  Broadcast
 
class  Scan
 

Public Member Functions

void _begin_trans (byte register_num)
 
void _begin_trans (byte auto_mode, byte register_num)
 
int _end_trans ()
 
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 ()
 
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)
 
TLC59116_Unmanagedoperator= (const TLC59116_Unmanaged &)
 
 TLC59116_Unmanaged (TwoWire &bus, byte address)
 
 TLC59116_Unmanaged (const TLC59116_Unmanaged &)
 
 ~TLC59116_Unmanaged ()
 
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
 
byte shadow_registers [Control_Register_Max+1]
 

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
 

Constructor & Destructor Documentation

TLC59116_Unmanaged::TLC59116_Unmanaged ( TwoWire &  bus,
byte  address 
)
inline
TLC59116_Unmanaged::TLC59116_Unmanaged ( const TLC59116_Unmanaged )
TLC59116_Unmanaged::~TLC59116_Unmanaged ( )
inline

Member Function Documentation

static bool TLC59116_Unmanaged::is_device_range_addr ( byte  address)
inlinestatic

Here is the caller graph for this function:

static bool TLC59116_Unmanaged::is_default_SUBADR ( byte  address)
inlinestatic

Here is the caller graph for this function:

static bool TLC59116_Unmanaged::is_default_single_addr ( byte  address)
inlinestatic

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)
inline

Here is the caller graph for this function:

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

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::PWMx_Register ( byte  led_num)
inlinestatic

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)
inlinestatic

Here is the caller graph for this function:

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

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)
inlinestatic

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 
)
inlinestatic

Here is the call graph for this function:

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

Here is the caller graph for this function:

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

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 
)
static

Here is the call graph for this function:

static byte TLC59116_Unmanaged::LEDx_pwm_bits ( byte  led_num)
inlinestatic

Here is the call graph for this function:

static byte TLC59116_Unmanaged::LEDx_gpwm_bits ( byte  led_num)
inlinestatic

Here is the call graph for this function:

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

Here is the call graph for this function:

static byte TLC59116_Unmanaged::SUBADRx_Register ( byte  i)
inlinestatic

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 
)
static

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 
)
static

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 
)
inlinestatic

Here is the call graph for this function:

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

Here is the caller graph for this function:

static bool TLC59116_Unmanaged::is_control_register ( byte  register_num)
inlinestatic

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::normalize_address ( byte  address)
inlinestatic

Here is the call graph for this function:

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

Here is the caller graph for this function:

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

Here is the call graph for this function:

Here is the caller graph for this function:

void TLC59116_Unmanaged::describe_registers ( byte *  registers)
static

Here is the call graph for this function:

Here is the caller graph for this function:

static byte TLC59116_Unmanaged::reverse_cc ( byte  CC)
inlinestatic

Here is the caller graph for this function:

TLC59116_Unmanaged& TLC59116_Unmanaged::operator= ( const TLC59116_Unmanaged )
byte TLC59116_Unmanaged::fetch_registers ( byte  start_r,
byte  count,
byte  registers[] 
)

Here is the call graph for this function:

Here is the caller graph for this function:

TLC59116_Unmanaged & TLC59116_Unmanaged::describe_actual ( )

Here is the call graph for this function:

void TLC59116_Unmanaged::describe_group_mode ( byte *  registers)
static

Here is the caller graph for this function:

byte TLC59116_Unmanaged::address ( )
inline

Here is the caller graph for this function:

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

Here is the call graph for this function:

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

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 
)
inline

Here is the call graph for this function:

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

Here is the call graph for this function:

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

Here is the call graph for this function:

int TLC59116_Unmanaged::_end_trans ( )
inline

Here is the caller graph for this function:

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

Here is the call graph for this function:

static Scan& TLC59116_Unmanaged::scan ( void  )
inlinestatic

Here is the call graph for this function:

Member Data Documentation

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

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