BlinkenArea - GitList
Repositories
Blog
Wiki
flaneth
Code
Commits
Branches
Tags
Search
Tree:
d48e86e
Branches
Tags
master
flaneth
firmware
main.c
header fix
Stefan Schuermans
commited
d48e86e
at 2012-05-02 18:39:39
main.c
Blame
History
Raw
/* flaneth - flash and ethernet Copyright (C) 2007-2012 Stefan Schuermans <stefan@schuermans.info> Copyleft: GNU public license V2 - http://www.gnu.org/copyleft/gpl.html a BlinkenArea project - http://www.blinkenarea.org/ */ #include <avr/interrupt.h> #include <avr/wdt.h> #include "arp.h" #include "bus.h" #include "cf.h" #include "debug.h" #include "eeprom.h" #include "http.h" #include "random.h" #include "rtl8019.h" #include "status.h" #include "tcp.h" #include "timing.h" #include "uart.h" // main code entry point int main(void) { wdt_reset(); #ifdef DEBUG wdt_disable(); #else wdt_enable(WDTO_60MS); #endif wdt_reset(); // initialize uart to be able to use stdio UartInit(); debug_printf(""); debug_printf("flaneth"); debug_init_printf("init"); // initialize low level modules BusInit(); // initialize middle level modules CfInit(); RtlInit(); StatusInit(); TimingInit(); // initialize high level modules ArpInit(); HttpInit(); TcpInit(); // use entropy collected during initialization RandomTask(); debug_init_printf("config"); // get configuration from EEPROM EepromGetConfig(); // enable interrupts sei(); debug_init_printf("start"); // main loop while (1) { wdt_reset(); CfTask(); wdt_reset(); EepromTask(); wdt_reset(); RandomTask(); wdt_reset(); //RtlTask(); wdt_reset(); TimingTask(); } return 0; }