diff --git a/ledcontroller.c b/ledcontroller.c index c606da5..1a5c689 100644 --- a/ledcontroller.c +++ b/ledcontroller.c @@ -18,13 +18,14 @@ #include "ledcontroller.h" #include +#include #define NUM_LED1642GW_ICs (3) #define NUM_LED1642GW_CHANNELS (16) -#define NUM_CHANNELS (NUM_LED1642GW_CHANNELS*NUM_LED1642GW_ICs) +#define NUM_LED_CHANNELS (NUM_LED1642GW_CHANNELS*NUM_LED1642GW_ICs) -static uint16_t ledbuffer[NUM_CHANNELS]; +static uint16_t ledbuffer[NUM_LED_CHANNELS]; static int8_t map_lednum_to_channels(uint8_t lednum, uint8_t *channel_r, uint8_t *channel_g, uint8_t *channel_b) { @@ -53,6 +54,7 @@ static int8_t map_lednum_to_channels(uint8_t lednum, uint8_t *channel_r, uint8_t return ret; } +#if 0 static void write_data(uint16_t data, uint8_t le_clocks) { PORTC &= ~(1<=le_clocks; bit--) { if(data&mask) { PORTC |= (1<>= 1; + PORTC &= ~(1<=0; bit--) { if(data&mask) { PORTC |= (1<>= 1; PORTC &= ~(1<=le_clocks; bit--) { + PORTC &= ~(1<>= 1; } + + PORTC |= (1<=0; bit--) { + PORTC &= ~(1<>= 1; + } + + PORTC &= ~(1<