Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
1659 | giacomo | 1 | #include "demo.h" |
2 | #include <kernel/func.h> |
||
3 | #include <string.h> |
||
4 | #include <stdlib.h> |
||
5 | #include <drivers/keyb.h> |
||
6 | #include <drivers/glib.h> |
||
7 | |||
8 | |||
9 | |||
10 | |||
11 | |||
12 | |||
13 | /* graphic mutex... */ |
||
14 | mutex_t mutex; |
||
15 | |||
16 | |||
17 | void app_mutex_init(mutex_t *m); |
||
18 | |||
19 | void my_close(void *arg) |
||
20 | { |
||
21 | grx_close(); |
||
22 | } |
||
23 | /* |
||
24 | void endfun(KEY_EVT *k) |
||
25 | { |
||
26 | grx_close(); |
||
27 | cprintf("Ctrl-Brk pressed! Ending...\n"); |
||
28 | sys_end(); |
||
29 | } |
||
30 | |||
31 | void zerofun(KEY_EVT *k) |
||
32 | { |
||
33 | int i; |
||
34 | for (i=0; i<MAX_PROC; i++) jet_delstat(i); |
||
35 | } |
||
36 | */ |
||
37 | int main(int argc, char **argv) |
||
38 | { |
||
39 | int modenum; |
||
40 | |||
41 | KEY_EVT k; |
||
42 | |||
43 | struct sigaction action; |
||
44 | |||
45 | srand(4); |
||
46 | |||
47 | |||
48 | sys_atrunlevel(my_close, NULL, RUNLEVEL_BEFORE_EXIT); |
||
49 | |||
50 | |||
51 | modenum = grx_getmode(800, 600, 16); //(640, 480, 16); |
||
52 | grx_setmode(modenum); |
||
53 | /* init the graphic mutex */ |
||
54 | app_mutex_init(&mutex); |
||
55 | |||
56 | grx_text("HARTIK 4.0 " , 0,0, rgb16(0,255,0),BLACK); |
||
57 | grx_text("Thesis Demo", 0,8, rgb16(0,255,0), BLACK); |
||
58 | |||
59 | |||
60 | |||
61 | init_framegrabber(); /* fra le altre cose attiva i task della camera */ |
||
62 | PXC_Start(); |
||
63 | |||
64 | group_activate(1); |
||
65 | |||
66 | return 0; |
||
67 | } |
||
68 | |||
69 |