blob: 1c528565b2fb55f8f6adfdf010cd7804f7b7b9bf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
|
/*! \file main.hcc
*
* \section generic Message build up information and more
*
* \section project Project information.
* Project Graphic Equalizer\n
* \author O.M. Schinagl
* \date 20041011
* \version 0.1
*
* \section copyright Copyright
* Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
*
* \section history Change history
* 20041011: O.M. Schinagl\n Initial version
*
*****************************************************************************/
/*
* Set the Clock rate for this domain. 25.175 Mhz is required for the Video output.
*/
#define PAL_TARGET_CLOCK_RATE 25175000
/******** System Includes *************/
#include "pal_master.hch"
#include "pal_mouse.hch"
/******** Application Includes ********/
#include "display.hch"
#include "mousedriver.hch"
/*
* Request Clockrate. Approximated ClockRate is compiler assigned.
*/
static macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;
/*! \fn void main(void);
* \brief Main User Input/Ouput loop.
*
* \param void
*
* \return void
* \retval void
*/
void main(void) {
/* Set VideoOut Pointer */
macro expr VideoOut = PalVideoOutOptimalCT(ClockRate);
/*
* Check library versions and Request VideoOutput.
* We need at least Major Version 1. Minor version 0 suffices.
*/
PalVersionRequire(1, 0);
PalVideoOutRequire(1);
/*
* Run The Following main tasks in parallel.
*/
par {
/*
* Primary task is to 'Run' several hardware simultaniously.
* VideoOutput needs to be in sync with the touchscreen and
* need to run in sync.
*/
PalVideoOutRun(VideoOut, ClockRate);
MouseRun(ClockRate);
/* Parallel to our Primary tasks we run the application. */
seq {
/* But first we need to initialize the display */
display_init(ClockRate);
par {
/*
* From here we run the mouse driver and
* display parallel.
*/
mouse_main();
display_main();
}
}
}
} /* --- main() --- */
|