45 lines
736 B
C
45 lines
736 B
C
|
|
#include "rgbyteclock.h"
|
|
|
|
|
|
void rgbyteclock(void)
|
|
{
|
|
uint8_t gain = 0;
|
|
|
|
//rgbyteclock_rounds_white();
|
|
|
|
for (int led=0;led<12;led++) {
|
|
led_set(led, 200*(12-led), 200*(led), 0);
|
|
}
|
|
led_flush();
|
|
|
|
while (1) {
|
|
|
|
PORTC |= (1<<PC5); // Test LED
|
|
for (int led=0;led<12;led++) {
|
|
led_set(led, 100*(12-led), 100*(led), 100);
|
|
}
|
|
led_flush();
|
|
|
|
led_set_current_mode(0);
|
|
for (gain=0;gain<=0x3f;gain+=8) {
|
|
led_set_gain(gain);
|
|
timer_wait(250);
|
|
}
|
|
|
|
PORTC &= ~(1<<PC5); // Test LED
|
|
for (int led=0;led<12;led++) {
|
|
led_set(led, 100*(12-led), 100*(led), 100);
|
|
}
|
|
led_flush();
|
|
|
|
led_set_current_mode(1);
|
|
for (gain=0;gain<=0x3f;gain+=8) {
|
|
led_set_gain(gain);
|
|
timer_wait(250);
|
|
}
|
|
}
|
|
|
|
}
|
|
|