X-Git-Url: http://git.rrze.uni-erlangen.de/gitweb/?p=moodlight.git;a=blobdiff_plain;f=main.c;h=3b8e373b81f641ceeb7f28873ddbfc123aa22fcd;hp=3073f335f192567a5c314c2a4005c15d78409203;hb=17aea8ef6cd47a0469e248a4e7325bcde394ea51;hpb=e369b7e475378c59c2ab25c3b6073a1c0bbb3162 diff --git a/main.c b/main.c index 3073f33..3b8e373 100644 --- a/main.c +++ b/main.c @@ -1,4 +1,4 @@ -/* $Id: main.c,v 1.1 2010/06/26 12:28:08 simimeie Exp $ +/* $Id: main.c,v 1.2 2010/06/26 19:08:18 simimeie Exp $ * Main file for the HaWo moodlight. * This is the main file that glues it all together. It also contains all * functionality that is too small to require an extra file. @@ -16,6 +16,8 @@ #include #include "console.h" +#include "ledpwm.h" +#include "ircontrol.h" /* #include "eepromdata.h" */ uint8_t mcusr_mirror __attribute__ ((section (".noinit"))); @@ -33,7 +35,7 @@ void get_mcusr(void) { int main(void) { - uint8_t i; + uint8_t i = 0; /* Load settings from EEPROM */ #if 0 @@ -42,6 +44,8 @@ int main(void) /* Initialize stuff */ console_init(); + ledpwm_init(); + ircontrol_init(); wdt_enable(WDTO_2S); @@ -61,5 +65,11 @@ int main(void) while (1) { /* We should never exit */ wdt_reset(); + /* i++; + console_printhex8(i); + ledpwm_setled(LEDPWM_REDLED, i); + ledpwm_setled(LEDPWM_GREENLED, i+128); + ledpwm_setled(LEDPWM_BLUELED, 255-i); + _delay_ms(500); */ } }