projects
/
moodlight.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
- add LED control with PWM
[moodlight.git]
/
main.c
diff --git
a/main.c
b/main.c
index 3073f335f192567a5c314c2a4005c15d78409203..3b8e373b81f641ceeb7f28873ddbfc123aa22fcd 100644
(file)
--- a/
main.c
+++ b/
main.c
@@
-1,4
+1,4
@@
-/* $Id: main.c,v 1.
1 2010/06/26 12:28:0
8 simimeie Exp $
+/* $Id: main.c,v 1.
2 2010/06/26 19:08:1
8 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.
* 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 <util/delay.h>
#include "console.h"
#include <util/delay.h>
#include "console.h"
+#include "ledpwm.h"
+#include "ircontrol.h"
/* #include "eepromdata.h" */
uint8_t mcusr_mirror __attribute__ ((section (".noinit")));
/* #include "eepromdata.h" */
uint8_t mcusr_mirror __attribute__ ((section (".noinit")));
@@
-33,7
+35,7
@@
void get_mcusr(void) {
int main(void)
{
int main(void)
{
- uint8_t i;
+ uint8_t i
= 0
;
/* Load settings from EEPROM */
#if 0
/* Load settings from EEPROM */
#if 0
@@
-42,6
+44,8
@@
int main(void)
/* Initialize stuff */
console_init();
/* Initialize stuff */
console_init();
+ ledpwm_init();
+ ircontrol_init();
wdt_enable(WDTO_2S);
wdt_enable(WDTO_2S);
@@
-61,5
+65,11
@@
int main(void)
while (1) { /* We should never exit */
wdt_reset();
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); */
}
}
}
}
This page took
0.043569 seconds
and
4
git commands to generate.