there *is* light at the end of the tunnel

This commit is contained in:
Stefan Rupp 2014-03-12 21:12:16 +01:00
parent fe3055f15a
commit 285732c1a0
3 changed files with 24 additions and 1 deletions

View File

@ -87,6 +87,26 @@ static void write_global_latch(uint16_t data)
}
void ledcontroller_turn_all_on(void)
{
write_data(0xffff, 2);
write_data(0xffff, 2);
write_data(0xffff, 2);
}
void ledcontroller_turn_all_off(void)
{
write_data(0xffff, 2);
write_data(0xffff, 2);
write_data(0xffff, 2);
}
void ledcontroller_init(void)
{

View File

@ -21,7 +21,8 @@
void ledcontroller_init(void);
void led_set(uint8_t lednum, uint16_t red, uint16_t green, uint16_t blue);
void led_flush(void);
void ledcontroller_turn_all_on(void);
void ledcontroller_turn_all_off(void);
#endif // LEDCONTROLLER_H

View File

@ -20,6 +20,8 @@
void rgbyteclock(void)
{
ledcontroller_turn_all_on();
while(1) {
PORTC ^= (1<<PC5);
for (int i=0; i<15; i++) {