Subversion Repositories shark

Rev

Rev 1655 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
1655 giacomo 1
/*
2
* Filename: Initosc.c
3
* Author: Ghiro Andrea, Franchino Gianluca
4
* Date: 09/03
5
* Description: this file is for osc
6
*/
7
 
8
/* This file is part of the S.Ha.R.K. Project - http://shark.sssup.it
9
 *
10
 * Copyright (C) 2003 Ghiro Andrea Franchino Gianluca
11
 *
12
 * This program is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation; either version 2 of the License, or
15
 * (at your option) any later version.
16
 *
17
 * This program is distributed in the hope that it will be useful,
18
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
19
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
20
 * GNU General Public License for more details.
21
 *
22
 * You should have received a copy of the GNU General Public License
23
 * along with this program; if not, write to the Free Software
24
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
25
 *
26
 */
27
 
28
#include <kernel/kern.h>
29
#include <modules/edf.h>
30
#include <modules/cbs.h>
31
#include <modules/rr.h>
32
#include <modules/hartport.h>
33
#include <modules/dummy.h>
34
#include <modules/sem.h>
35
#include <modules/srp.h>
36
 
37
#include <drivers/keyb.h>
38
 
39
#define TICK 1000
40
#define RRTICK 5000
41
 
42
TIME __kernel_register_levels__(void *arg)
43
{
44
   struct multiboot_info *mb = (struct multiboot_info *)arg;
45
 
46
   EDF_register_level(EDF_ENABLE_ALL);
47
   CBS_register_level(CBS_ENABLE_ALL, 0);
48
   RR_register_level(RRTICK, RR_MAIN_YES, mb);
49
 
50
   dummy_register_level();
51
 
52
   SEM_register_module();
53
 
54
   SRP_register_module();
55
 
56
   return TICK;
57
}
58
 
59
TASK __init__(void *arg)
60
{
61
   struct multiboot_info *mb = (struct multiboot_info *)arg;
62
 
63
   HARTPORT_init();
64
   KEYB_init(NULL);
65
 
66
   __call_main__(mb);
67
 
68
   return (void *)0;
69
}