#include <stdint.h>
#include "tlc_config.h"
Go to the source code of this file.
Classes | |
class | Tlc5940 |
The main Tlc5940 class for the entire library. More... | |
Defines | |
#define | set_XLAT_interrupt() TIFR1 |= _BV(TOV1); TIMSK1 = _BV(TOIE1) |
Enables the Timer1 Overflow interrupt, which will fire after an XLAT pulse. | |
#define | clear_XLAT_interrupt() TIMSK1 = 0 |
Disables any Timer1 interrupts. | |
#define | enable_XLAT_pulses() TCCR1A = _BV(COM1A1) | _BV(COM1B1) |
Enables the output of XLAT pulses. | |
#define | disable_XLAT_pulses() TCCR1A = _BV(COM1B1) |
Disables the output of XLAT pulses. | |
Functions | |
void | tlc_shift8_init (void) |
Initializes the SPI module to double speed (f_osc / 2). | |
void | tlc_shift8 (uint8_t byte) |
Shifts out a byte, MSB first. | |
void | tlc_dcModeStart (void) |
Switches to dot correction mode and clears any waiting grayscale latches. | |
void | tlc_dcModeStop (void) |
Switches back to grayscale mode. | |
Variables | |
volatile uint8_t | tlc_needXLAT |
This will be true (!= 0) if update was just called and the data has not been latched in yet. | |
volatile void(* | tlc_onUpdateFinished )(void) |
Some of the extened library will need to be called after a successful update. | |
uint8_t | tlc_GSData [NUM_TLCS *24] |
Packed grayscale data, 24 bytes (16 * 12 bits) per TLC. | |
Tlc5940 | Tlc |
Preinstantiated Tlc variable. |
void tlc_dcModeStart | ( | void | ) |
Switches to dot correction mode and clears any waiting grayscale latches.
void tlc_dcModeStop | ( | void | ) |
Switches back to grayscale mode.
uint8_t tlc_GSData[NUM_TLCS *24] |
Packed grayscale data, 24 bytes (16 * 12 bits) per TLC.
Format: Lets assume we have 2 TLCs, A and B, daisy-chained with the SOUT of A going into the SIN of B.
volatile uint8_t tlc_needXLAT |
This will be true (!= 0) if update was just called and the data has not been latched in yet.
volatile void(* tlc_onUpdateFinished)(void) |
Some of the extened library will need to be called after a successful update.