blob: 33a5aeac4be490b1ab4bb9715ebc26236383a96a [file] [log] [blame]
gpz60e116b2003-05-19 09:30:01 +00001/*
2 * Copyright (c) 2002, Adam Dunkels.
3 * All rights reserved.
4 *
5 * Redistribution and use in source and binary forms, with or without
6 * modification, are permitted provided that the following conditions
7 * are met:
8 * 1. Redistributions of source code must retain the above copyright
9 * notice, this list of conditions and the following disclaimer.
10 * 2. Redistributions in binary form must reproduce the above
11 * copyright notice, this list of conditions and the following
12 * disclaimer in the documentation and/or other materials provided
13 * with the distribution.
14 * 3. All advertising materials mentioning features or use of this
15 * software must display the following acknowledgement:
16 * This product includes software developed by Adam Dunkels.
17 * 4. The name of the author may not be used to endorse or promote
18 * products derived from this software without specific prior
19 * written permission.
20 *
21 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
22 * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
23 * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
24 * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
25 * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
26 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
27 * GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
28 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
29 * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
30 * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
31 * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
32 *
33 * This file is part of the Contiki desktop environment
34 *
35 * $Id: contiki-main.c,v 1.1 2003/05/19 09:30:03 gpz Exp $
36 *
37 */
38
39#include "ctk.h"
40#include "ctk-draw.h"
41#include "dispatcher.h"
42
43#include "simpletelnet.h"
44#include "programs.h"
45#include "email.h"
46#include "www.h"
47#include "contiki.h"
48
49#include "uip_main.h"
50#include "uip.h"
51#include "uip_arp.h"
52#if WITH_TFE
53#include "cs8900a.h"
54#endif /* WITH_TFE */
55#include "resolv.h"
56
57#include <time.h>
58#include <stdio.h>
59#include <conio.h>
60//#include <rs232.h>
61#include <time.h>
62#include <string.h>
63
64
65/*-----------------------------------------------------------------------------------*/
66int
67main(int argc, char **argv)
68{
69 /* irqload_init();*/
70
71#ifdef WITH_UIP
72 uip_init();
73 uip_main_init();
74 resolv_init();
75
76#ifdef WITH_TFE
77 cs8900a_init();
78#endif /* WITH_TFE */
79
80
81#ifdef WITH_RS232
82 rs232dev_init();
83#endif /* WITH_RS232 */
84
85#ifdef WITH_TAPDEV
86 tapdev_init();
87#endif /* WITH_TAPDEV */
88
89#endif /* WITH_UIP */
90
91 conio_init();
92 joy_load_driver(joy_stddrv);
93#if 0
94{
95 int i,j;
96 clrscr();
97 textcolor(0);bgcolor(1);
98 while(1)
99 {
100 gotoxy(0,0);
101 cprintf("%d\n",i++);
102 conio_update();
103 if(kbhit())
104 {
105 cprintf("pressed: %02x\n",cgetc());
106 }
107 else
108 {
109 cprintf("pressed: ---------\n");
110 }
111 j=joy_read(0);
112 cprintf("%08x\n",j);
113 }
114}
115#endif
116 ek_init();
117 dispatcher_init();
118 ctk_init();
119
120 contiki_init();
121
122 programs_init();
123
124 ctk_redraw();
125 ek_run();
126
127 clrscr();
128
129 return 0;
130
131 argv = argv;
132 argc = argc;
133}
134/*-----------------------------------------------------------------------------------*/