00001
00002 #include <avr/io.h>
00003 #include <avr/interrupt.h>
00004
00005 #include <dispatcher.h>
00006
00007 #include "init.h"
00008 #include "arch/avr/rtl8019.h"
00009 #include "net/net_if.h"
00010
00011 #include "net/tcp.h"
00012 #include "app/ports.h"
00013 #include "app/dns_sd.h"
00014
00015 #include "telnet.h"
00016 #include "httpd.h"
00017
00018 int main( void )
00019 {
00020 char x = 0;
00021 #if (NIP_DNSSD_ENABLE == 1)
00022
00023
00024
00025
00026
00027
00028
00029
00030 #endif
00031
00032 sei();
00033
00034 init_networking();
00035 init_time();
00036
00037 #if TELNET_ENABLE == 1
00038 telnet_start();
00039 #endif
00040 #if HTTPD_ENABLE == 1
00041 httpd_start();
00042 #endif
00043
00044
00045
00046 DDRD =_BV( PD7 );
00047
00048
00049 while (1)
00050 {
00051 #if TELNET_ENABLE == 1
00052 telnet_check();
00053 #endif
00054 #if HTTPD_ENABLE == 1
00055 httpd_check();
00056 #endif
00057
00058 if ( x++ % 2 == 0 )
00059 PORTD |= _BV( PD7 );
00060 else
00061 PORTD &= ~_BV( PD7 );
00062
00063
00064
00065 #if (NIP_DNSSD_ENABLE == 1)
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085 #endif
00086
00087 #if (NIP_DISP_ENABLE == 1)
00088 nip_disp_notify( NIP_DISP_TIMER );
00089 nip_disp_notify_if( 0, NIP_DISP_IF_TIMER );
00090 nip_dispatcher();
00091
00092 #endif
00093 }
00094
00095 return 0;
00096 }