rgbyteclock-code/main.c

50 lines
1.0 KiB
C
Raw Normal View History

2014-03-01 03:50:09 +01:00
2014-03-01 03:54:52 +01:00
/*
* ----------------------------------------------------------------------------
* "THE BEER-WARE LICENSE" (Revision 42):
* <struppi@struppi.name> wrote this file. As long as you retain this notice you
* can do whatever you want with this stuff. If we meet some day, and you think
* this stuff is worth it, you can buy me a beer in return.
* (c) 2014 Stefan Rupp
* ----------------------------------------------------------------------------
*/
2014-03-01 03:50:09 +01:00
#include <avr/io.h>
2014-03-03 05:01:36 +01:00
#include <avr/interrupt.h>
2014-03-01 03:50:09 +01:00
#include "timer.h"
#include "lcd.h"
#include "rgbyteclock.h"
#include "spi.h"
2014-03-02 07:18:48 +01:00
#include "ledcontroller.h"
2014-03-03 05:01:36 +01:00
#include "rtc.h"
2014-03-12 17:07:18 +01:00
#include <util/delay.h>
2014-03-01 03:50:09 +01:00
int main(void)
{
timer_init();
rtc_init(0);
2014-03-12 17:07:18 +01:00
//spi_slave_init();
2014-03-02 07:18:48 +01:00
ledcontroller_init();
2014-03-03 05:01:36 +01:00
sei();
2014-03-12 17:07:18 +01:00
//lcd_init();
2014-03-01 03:50:09 +01:00
DDRC |= (1<<PC5); // Test LED
//DDRD |= (1<<PD4); // Backlight
//PORTD |= (1<<PD4);
2014-03-12 17:07:18 +01:00
/*
while (1) {
PORTC ^= (1<<PC5);
timer_wait(5000);
//_delay_ms(100);
}
*/
2014-03-01 03:50:09 +01:00
rgbyteclock();
// rgbyteclock() should never end, but who knows...
while (1) { ; }
}