Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1664 | pj | 1 | #ifndef _myjetctrl_h |
2 | #define _myjetctrl_h |
||
3 | #include <ll/ll.h> |
||
4 | #include <kernel/types.h> |
||
5 | #include <kernel/descr.h> |
||
6 | #include <math.h> |
||
7 | #include <drivers/glib.h> |
||
8 | #include <drivers/keyb.h> |
||
9 | #include <stdlib.h> |
||
10 | #include <math.h> |
||
11 | #include <string.h> |
||
12 | /*------------------------------- |
||
13 | |||
14 | this header file has be modified from the |
||
15 | jumping ball jet control example. |
||
16 | |||
17 | ---------------------------------*/ |
||
18 | /* Subparts */ |
||
19 | |||
20 | #define JET_ON |
||
21 | |||
22 | /* CPU Speed Selection |
||
23 | -------------------------------------------------------------------- |
||
24 | 1700 - Pentium 4 1.7 GHz |
||
25 | 400 - Pentium 2 400 MHz |
||
26 | 133 - Pentium 1 133 MHz |
||
27 | */ |
||
28 | #define CPU 1700 |
||
29 | /* |
||
30 | * |
||
31 | * WCET, Periods and Models |
||
32 | * |
||
33 | */ |
||
34 | #if CPU==133 |
||
35 | #define WCET_JETCTRL 10000 |
||
36 | #define WCET_JETDUMMY 300 |
||
37 | #define WCET_JETSLIDE 2000 |
||
38 | #endif |
||
39 | |||
40 | #if CPU==400 |
||
41 | #define WCET_JETCTRL 7500 |
||
42 | #define WCET_JETDUMMY 200 |
||
43 | #define WCET_JETSLIDE 2100 |
||
44 | #endif |
||
45 | |||
46 | #if CPU==1700 |
||
47 | #define WCET_JETCTRL 4500 |
||
48 | #define WCET_JETDUMMY 100 |
||
49 | #define WCET_JETSLIDE 1300 |
||
50 | #endif |
||
51 | |||
52 | #define PERIOD_JETCTRL 100000 |
||
53 | #define PERIOD_JETDUMMY 100000 |
||
54 | #define PERIOD_JETSLIDE 100000 |
||
55 | /* |
||
56 | * |
||
57 | * Global Stuffs |
||
58 | * |
||
59 | */ |
||
60 | |||
61 | void init_jetcontrol(); |
||
62 | void scenario_jetcontrol(); |
||
63 | |||
64 | /* |
||
65 | * |
||
66 | * JETCONTROL stuffs |
||
67 | * |
||
68 | */ |
||
69 | |||
70 | #define JET_NTASK 35 |
||
71 | #define JET_Y_NAME 170 |
||
72 | |||
73 | #define DUMMY_PID 1 |
||
74 | |||
75 | #define JET_DUMMY_WIDTH 210 |
||
76 | #define JET_DUMMY_HEIGHT 80 |
||
77 | |||
78 | /* the point (x, y) is the top left corner */ |
||
79 | #define JET_DUMMY_X 428 |
||
80 | #define JET_DUMMY_Y 65 |
||
81 | |||
82 | #define JET_SLIDE_WIDTH 50 |
||
83 | #define JET_SLIDE_X 576 |
||
84 | |||
85 | extern mutex_t mutex1; |
||
86 | |||
87 | /* useful colors... */ |
||
88 | extern int white; |
||
89 | extern int black; |
||
90 | extern int red; |
||
91 | extern int gray; |
||
92 | extern int blue; |
||
93 | extern int yellow; |
||
94 | extern int green; |
||
95 | |||
96 | #endif |
||
97 |