summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/include/eventhandler_shared.hch
blob: cc04a91ff1a6a9e6b51593b781f28c3feda07faf (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
88
89
90
91
92
93
94
95
96
97
98
99
/*! \file eventhandler_shared.hch
 *
 * \section generic Shared definitions etc. for eveents.
 *
 * \section project Project information.
 * Project Graphic Equalizer\n
 * \author O.M. Schinagl
 * \date 20041110
 * \version 0.1
 *
 * \section copyright Copyright
 * Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
 *
 * \section history Change history
 * 20041110: O.M. Schinagl\n	Initial version
 *
 *****************************************************************************/
 
#ifndef _EVENTHANDLER_SHARED_HCH
#define _EVENTHANDLER_SHARED_HCH 1



/*** Data Types **********************/

/*
 * Type definition of the shared memory to be used in various processes
 */
typedef struct {
	ram unsigned 11 equalizer_display[128];

	unsigned 11 volume_position;
	unsigned 11 inputgain_position;
	unsigned 10 active_preset;
	unsigned 8 mask;
	unsigned 5 image, image_about;
	unsigned 5 mode;
	unsigned 4 equalizer_mode;
	unsigned 1 button_demo_state;
	unsigned 1 button_reset_state;
	unsigned 1 next_track_state;
	unsigned 1 prev_track_state;
	unsigned 1 locked_gain;
	unsigned 1 locked_display;
	unsigned 1 saturated;
} events_t;



#define IMAGE_ABOUT_TOP_FONTYS		0x00
#define IMAGE_ABOUT_TOP_TASS		0x01
#define IMAGE_ABOUT_TOP_TRANSFER	0x02
#define IMAGE_ABOUT_TOP_CELOXICA	0x03
#define IMAGE_ABOUT_TOP_DETAILS		0x04
#define IMAGE_ABOUT_BOTTOM		0x05
#define IMAGE_SKIN			0x06
#define IMAGE_HELP			0x07
#define IMAGE_ABOUT			0x08
#define IMAGE_GRAPH			0x09
#define IMAGE_AUDIO_PLAYER  		0x0a
#define IMAGE_INPUT_SELECT_TEXT		0x0b
#define IMAGE_INPUT_SELECT_TEXT_HELP	0x0c


#define EQUALIZERMODE_FULL	0x05
#define EQUALIZERMODE_HALF	0x03
#define EQUALIZERMODE_PRECISE	0x00

#define EVENTS_MODE_SKIN 		0x01
#define EVENTS_MODE_HELP 		0x02
#define EVENTS_MODE_ABOUT 		0x04
#define EVENTS_MODE_GRAPH 		0x08
#define EVENTS_MODE_AUDIO_PLAYER	0x10

/*
 * Volume Control lookuptable.
 * TODO: This table is now hardcoded. To ensure full skinability this table
 * should be dynamically loaded.
 */
extern unsigned 5 volumecontrol_table[46];
extern unsigned 11 volumecontrol_table_inv[32];

extern unsigned 4 inputgain_table[46]; 
extern unsigned 11 inputgain_table_inv[16];

/*
 * Equalizer lookup tables.
 * TODO: This table is now hardcoded. To ensure full skinability this table
 * should be dynamically loaded.
 */
extern unsigned 4 equalizer_table[640];
extern unsigned 11 equalizer_table_inv[16];



#else
#error "ERROR file eventhandler_shared.hch multiple times included"
#endif /* --- _EVENTHANDLER_SHARED_HCH --- */