#include <avr/io.h>
#include <avr/interrupt.h>
#include "tlc_config.h"
#include "Tlc5940.h"
Defines | |
#define | pulse_pin(port, pin) port |= _BV(pin); port &= ~_BV(pin) |
Pulses a pin - high then low. | |
Functions | |
ISR (TIMER1_OVF_vect) | |
Interrupt called after an XLAT pulse to prevent more XLAT pulses. | |
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. |
#define pulse_pin | ( | port, | |||
pin | ) | port |= _BV(pin); port &= ~_BV(pin) |
Pulses a pin - high then low.
ISR | ( | TIMER1_OVF_vect | ) |
Interrupt called after an XLAT pulse to prevent more XLAT pulses.
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.