2014-03-01 03:50:09 +01:00
|
|
|
|
|
|
|
#include "rgbyteclock.h"
|
|
|
|
|
|
|
|
|
2014-03-15 15:34:37 +01:00
|
|
|
void rgbyteclock(void)
|
2014-03-14 03:21:39 +01:00
|
|
|
{
|
2014-04-17 04:15:15 +02:00
|
|
|
uint8_t gain = 0;
|
2014-03-15 15:34:37 +01:00
|
|
|
while (1) {
|
|
|
|
|
|
|
|
led_set(0, 4000, 0, 0);
|
|
|
|
led_flush();
|
|
|
|
timer_wait(500);
|
2014-03-01 03:50:09 +01:00
|
|
|
|
2014-03-15 15:34:37 +01:00
|
|
|
led_set(1, 0, 10000, 0);
|
|
|
|
led_flush();
|
2014-04-17 04:15:15 +02:00
|
|
|
timer_wait(500);
|
|
|
|
led_set_gain(gain);
|
|
|
|
gain += 5;
|
|
|
|
if (gain > 0x3f) {
|
|
|
|
gain = 0;
|
|
|
|
}
|
|
|
|
PORTC ^= (1<<PC5); // Test LED
|
2014-03-15 15:34:37 +01:00
|
|
|
}
|
2014-03-14 03:21:39 +01:00
|
|
|
|
|
|
|
}
|
2014-03-01 03:50:09 +01:00
|
|
|
|