Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1655 | giacomo | 1 | /* |
2 | * Project: S.Ha.R.K. |
||
3 | * |
||
4 | * Coordinators: |
||
5 | * Giorgio Buttazzo <giorgio@sssup.it> |
||
6 | * Paolo Gai <pj@gandalf.sssup.it> |
||
7 | * |
||
8 | * Authors : |
||
9 | * Paolo Gai <pj@gandalf.sssup.it> |
||
10 | * (see the web pages for full authors list) |
||
11 | * |
||
12 | * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy) |
||
13 | * |
||
14 | * http://www.sssup.it |
||
15 | * http://retis.sssup.it |
||
16 | * http://shark.sssup.it |
||
17 | */ |
||
18 | |||
19 | /** |
||
20 | ------------ |
||
21 | CVS : $Id: initfil2.c,v 1.1.1.1 2004-05-24 18:03:39 giacomo Exp $ |
||
22 | |||
23 | File: $File$ |
||
24 | Revision: $Revision: 1.1.1.1 $ |
||
25 | Last update: $Date: 2004-05-24 18:03:39 $ |
||
26 | ------------ |
||
27 | **/ |
||
28 | |||
29 | /* |
||
30 | * Copyright (C) 2000 Paolo Gai |
||
31 | * |
||
32 | * This program is free software; you can redistribute it and/or modify |
||
33 | * it under the terms of the GNU General Public License as published by |
||
34 | * the Free Software Foundation; either version 2 of the License, or |
||
35 | * (at your option) any later version. |
||
36 | * |
||
37 | * This program is distributed in the hope that it will be useful, |
||
38 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
||
39 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||
40 | * GNU General Public License for more details. |
||
41 | * |
||
42 | * You should have received a copy of the GNU General Public License |
||
43 | * along with this program; if not, write to the Free Software |
||
44 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA |
||
45 | * |
||
46 | */ |
||
47 | |||
48 | #include "kernel/kern.h" |
||
49 | #include "modules/rr.h" |
||
50 | #include "modules/rrsoft.h" |
||
51 | #include "modules/dummy.h" |
||
52 | #include "modules/sem.h" |
||
53 | #include "modules/hartport.h" |
||
54 | #include "modules/cabs.h" |
||
55 | #include "drivers/keyb.h" |
||
56 | |||
57 | /*+ sysyem tick in us +*/ |
||
58 | #define TICK 1000 |
||
59 | |||
60 | /*+ RR tick in us +*/ |
||
61 | #define RRTICK 2000 |
||
62 | |||
63 | void read_track(int); |
||
64 | void read_sprites(); |
||
65 | |||
66 | int argc; |
||
67 | char *argv[100]; |
||
68 | int main(int argc, char **argv); |
||
69 | |||
70 | TIME __kernel_register_levels__(void *arg) |
||
71 | { |
||
72 | struct multiboot_info *mb = (struct multiboot_info *)arg; |
||
73 | |||
74 | RRSOFT_register_level(RRTICK, RR_MAIN_NO, mb, RRSOFT_ONLY_HARD|RRSOFT_ONLY_SOFT); |
||
75 | RR_register_level(RRTICK, RR_MAIN_YES, mb); |
||
76 | dummy_register_level(); |
||
77 | |||
78 | SEM_register_module(); |
||
79 | |||
80 | CABS_register_module(); |
||
81 | |||
82 | __compute_args__(mb, &argc, argv); |
||
83 | |||
84 | if (argc == 2) |
||
85 | read_track(strtoi(argv[1], 10, NULL)); |
||
86 | else |
||
87 | read_track(0); |
||
88 | |||
89 | read_sprites(); |
||
90 | |||
91 | return TICK; |
||
92 | } |
||
93 | |||
94 | TASK __init__(void *arg) |
||
95 | { |
||
96 | KEYB_PARMS kparms = BASE_KEYB; |
||
97 | |||
98 | HARTPORT_init(); |
||
99 | |||
100 | keyb_def_ctrlC(kparms, NULL); |
||
101 | KEYB_init(&kparms); |
||
102 | |||
103 | return (void *)main(argc,argv); |
||
104 | } |
||
105 | |||
106 | |||
107 | |||
108 |