Subversion Repositories shark

Rev

Rev 1513 | Go to most recent revision | Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
1498 mauro 1
 
2
/*
3
 * Project: S.Ha.R.K.
4
 *
5
 * Coordinators: Giorgio Buttazzo <giorgio@sssup.it>
6
 *
7
 * Authors     : Paolo Gai <pj@hartik.sssup.it>
8
 * (see authors.txt for full list of hartik's authors)
9
 *
10
 * ReTiS Lab (Scuola Superiore S.Anna - Pisa - Italy)
11
 *
12
 * http://www.sssup.it
13
 * http://retis.sssup.it
14
 * http://shark.sssup.it
15
 */
16
 
17
/*
18
 * Copyright (C) 2000 Paolo Gai
19
 *
20
 * This program is free software; you can redistribute it and/or modify
21
 * it under the terms of the GNU General Public License as published by
22
 * the Free Software Foundation; either version 2 of the License, or
23
 * (at your option) any later version.
24
 *
25
 * This program is distributed in the hope that it will be useful,
26
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
27
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
28
 * GNU General Public License for more details.
29
 *
30
 * You should have received a copy of the GNU General Public License
31
 * along with this program; if not, write to the Free Software
32
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
33
 *
34
 */
35
 
36
#include <kernel/kern.h>
37
 
38
#include <drivers/shark_keyb26.h>
39
#include <drivers/shark_cpu26.h>
40
 
41
void endfunc(KEY_EVT *e)
42
{
43
        sys_end();
44
}
45
 
46
int main(int argc, char **argv)
47
{
48
        int val, num;
49
        char *buf;
50
 
51
        CPU26_showinfo();
52
 
53
        val = CPU26_get_min_frequency();
54
        cprintf("Min freq: %d\n", val);
55
 
56
        val = CPU26_get_max_frequency();
57
        cprintf("Max freq: %d\n", val);
58
 
59
        val = CPU26_get_cur_frequency();
60
        cprintf("Current freq: %d\n", val);
61
 
62
        num = CPU26_show_frequencys(buf);
63
        if (num>0)
64
                cprintf("Allowed frequencys: %s\n", buf);
65
        num = CPU26_get_frequencys(cpu26_freqs);
66
 
67
        if (num>0) {
68
                CPU26_set_frequency(cpu26_freqs[0], DVS_RELATION_L);
69
                val = CPU26_get_cur_frequency();
70
                cprintf("Actual freq: %d\n", val);
71
        }
72
 
73
        endfunc(NULL);
74
 
75
        return 0;
76
}