diff options
author | Oliver Schinagl <oliver@schinagl.nl> | 2004-11-10 12:45:18 (GMT) |
---|---|---|
committer | Oliver Schinagl <oliver@schinagl.nl> | 2004-11-10 12:45:18 (GMT) |
commit | 9451e82004bb59a95d9589058759169c1c486c91 (patch) | |
tree | 991c9238e4290ed097f0d02494dc80c0f10c68f1 /Graphic_Equalizer/include | |
parent | b7b9f1ff4da4dae9d4c14ee5e03a7555b254c31c (diff) | |
download | TASS-9451e82004bb59a95d9589058759169c1c486c91.zip TASS-9451e82004bb59a95d9589058759169c1c486c91.tar.gz TASS-9451e82004bb59a95d9589058759169c1c486c91.tar.bz2 |
First Real Version
Diffstat (limited to 'Graphic_Equalizer/include')
-rw-r--r-- | Graphic_Equalizer/include/configuration.hch | 32 | ||||
-rw-r--r-- | Graphic_Equalizer/include/display.hch | 5 | ||||
-rw-r--r-- | Graphic_Equalizer/include/display_shared.hch | 29 | ||||
-rw-r--r-- | Graphic_Equalizer/include/eventhandler.hch | 34 | ||||
-rw-r--r-- | Graphic_Equalizer/include/eventhandler_shared.hch | 38 | ||||
-rw-r--r-- | Graphic_Equalizer/include/mouse.hch (renamed from Graphic_Equalizer/include/mousedriver.hch) | 5 | ||||
-rw-r--r-- | Graphic_Equalizer/include/mouse_shared.hch (renamed from Graphic_Equalizer/include/mousedriver_shared.hch) | 2 | ||||
-rw-r--r-- | Graphic_Equalizer/include/smartmedia.hch | 46 |
8 files changed, 182 insertions, 9 deletions
diff --git a/Graphic_Equalizer/include/configuration.hch b/Graphic_Equalizer/include/configuration.hch index f256886..6e9480a 100644 --- a/Graphic_Equalizer/include/configuration.hch +++ b/Graphic_Equalizer/include/configuration.hch @@ -20,6 +20,24 @@ #define _CONFIGURATION_HCH 1
/*
+ * To print debug information on the RS232 port set this define.
+ */
+#define HAVE_DEBUG 0
+
+
+
+/*
+ * If we don't want to use the SmartMedia (and therefor fill the memory
+ * with simple static data) set this to 0. Otherwise 1 will load the smartmedia
+ * routines. To only load the mask and not the entire data set USE_MASK_ONLY to
+ * 1. 0 will load all bitmaps.
+ */
+#define HAVE_SMART_MEDIA 0
+#define USE_MASK_ONLY 1
+
+
+
+/*
* Data can be arranged in two ways. Either as one large blok of continuous
* data, or each segment is stored seperatly at its own address. If set to 1
* we'll asume one large continuous blok.
@@ -42,13 +60,11 @@ /*
* Here we setup the start and end address for the various components.
- * NOTE: The Help image starts at the same address because we intend to use the
- * second rambank for this image.
*/
#define ADDR_SKIN_START 0x000000
#define ADDR_SKIN_END (ADDR_SKIN_START +SIZE_SKIN)
-#define ADDR_HELP_START 0x000000
+#define ADDR_HELP_START 0x04b001
#define ADDR_HELP_END (ADDR_HELP_START +SIZE_HELP)
#if LARGE_DATA_BLOCK
@@ -66,8 +82,8 @@ #else
#define SM_ADDR_SKIN_START 0x084000
#define SM_ADDR_SKIN_MASK_START 0x168000
- #define SM_ADDR_HELP_START 0x000000
- #define SM_ADDR_HELP_START 0x000000
+ #define SM_ADDR_HELP_START 0x1b4000
+ #define SM_ADDR_HELP_START 0x298000
#define SM_ADDR_SKIN_END (SM_ADDR_SKIN_START +(SIZE_SKIN *3))
#define SM_ADDR_SKIN_MASK_END (SM_ADDR_SKIN_END +(SIZE_MASK_SKIN *3))
@@ -76,6 +92,12 @@ #endif
+
+/*
+ * Set the color for various items that will be drawn on screen.
+ */
+#define PIXEL_VOLUME_YAXIS (0x00ff00)
+
#else
#error "ERROR file configuration.hch multiple times included"
#endif /* --- _CONFIGURATION_HCH --- */
diff --git a/Graphic_Equalizer/include/display.hch b/Graphic_Equalizer/include/display.hch index d10c8ed..d191149 100644 --- a/Graphic_Equalizer/include/display.hch +++ b/Graphic_Equalizer/include/display.hch @@ -31,8 +31,11 @@ /*
* Main display loop. This function never returns! It handles display output.
+ * It needs to respond to certain events set by the events pointer. Also it
+ * informs events what the current mask is. To optain the current mask we need
+ * the X and Y coordinates from our mousedata pointer.
*/
-extern macro proc display_main(RAM_BANK0, RAM_BANK1);
+void display_main(events_t *events, mousedata_t *mousedata);
#else
#error "ERROR file display.hch multiple times included"
diff --git a/Graphic_Equalizer/include/display_shared.hch b/Graphic_Equalizer/include/display_shared.hch index 3268473..66e8111 100644 --- a/Graphic_Equalizer/include/display_shared.hch +++ b/Graphic_Equalizer/include/display_shared.hch @@ -20,6 +20,35 @@ #define _DISPLAY_SHARED_HCH 1
+
+/*
+ * Volume Control lookuptable.
+ * TODO: This table is now hardcoded. To ensure full skinability this table
+ * should be dynamically loaded.
+ */
+rom unsigned 6 volumecontrol_table[46] = {31, 30, 29, 28, 27, 26, 25, 24, 23, 22, 21, 20, 19, 18, 17, 16, 15, 14, 13, 12, 12, 11, 11, 10, 10, 9, 9, 8, 8, 7, 7, 6, 6, 5, 5, 4, 4, 3, 3, 2, 2, 1, 1, 0, 0, 0};
+
+/*
+ * Equalizer lookuptabe.
+ * TODO: This table is now hardcoded. To ensure full skinability this table
+ * should be dynamically loaded.
+ */
+rom unsigned 4 equalizer_table[66] = {15, 15, 15, 15, 15, 14, 14, 14, 14, 13, 13, 13, 13, 12, 12, 12, 12, 11, 11, 11, 11, 10, 10, 10, 10, 9, 9, 9, 9, 8, 8, 8, 8, 7, 7, 7, 7, 6, 6, 6, 6, 5, 5, 5, 5, 4, 4, 4, 4, 3, 3, 3, 3, 2, 2, 2, 2, 1, 1, 1, 1, 0, 0, 0, 0, 0};
+
+
+
+/*
+ * Define all area's of the display.
+ */
+#define AREA_WAVEFORM 0x01
+#define AREA_VOLUME_YAXIS 0x02
+#define AREA_SPECTRUM_ANALYZER 0x03
+
+#define BUTTON_HELP 0x12
+
+#define AREA_EQUALIZER_MIN 0x80
+#define AREA_EQUALIZER_MAX 0xff
+
#else
#error "ERROR file display_shared.hch multiple times included"
#endif /* --- _DISPLAY_SHARED_HCH --- */
diff --git a/Graphic_Equalizer/include/eventhandler.hch b/Graphic_Equalizer/include/eventhandler.hch new file mode 100644 index 0000000..413e563 --- /dev/null +++ b/Graphic_Equalizer/include/eventhandler.hch @@ -0,0 +1,34 @@ +/*! \file eventhandler.hch
+ *
+ * \section generic SmartMedia API
+ *
+ * \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_HCH
+#define _EVENTHANDLER_HCH 1
+
+
+
+
+/*
+ * This is the main eventhandler loop. It never returns! It coordinates
+ * userinput and the actions requred to be taken.
+ */
+void eventhandler_main(events_t *events);
+
+#else
+#error "ERROR file eventhandler.hch multiple times included"
+#endif /* --- _EVENTHANDLER_HCH --- */
+
diff --git a/Graphic_Equalizer/include/eventhandler_shared.hch b/Graphic_Equalizer/include/eventhandler_shared.hch new file mode 100644 index 0000000..1ce7578 --- /dev/null +++ b/Graphic_Equalizer/include/eventhandler_shared.hch @@ -0,0 +1,38 @@ +/*! \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 {
+ unsigned 1 help;
+ unsigned 10 volume_position;
+ unsigned 8 mask;
+} events_t;
+
+#else
+#error "ERROR file eventhandler_shared.hch multiple times included"
+#endif /* --- _EVENTHANDLER_SHARED_HCH --- */
+
diff --git a/Graphic_Equalizer/include/mousedriver.hch b/Graphic_Equalizer/include/mouse.hch index 9c674cd..f6ae164 100644 --- a/Graphic_Equalizer/include/mousedriver.hch +++ b/Graphic_Equalizer/include/mouse.hch @@ -30,9 +30,10 @@ /*
* Main mousedriver loop. This procedure never returns! It handles mouse input,
- * updates the shared memory and notifies listeners.
+ * updates the shared memory and notifies listeners. It requires a pointer to
+ * a mousedata_t struct to store mouse information.
*/
-void mouse_main(void);
+void mouse_main(mousedata_t *mousedata);
#else
#error "ERROR file mousedriver.hch multiple times included"
diff --git a/Graphic_Equalizer/include/mousedriver_shared.hch b/Graphic_Equalizer/include/mouse_shared.hch index 01470fa..43887c4 100644 --- a/Graphic_Equalizer/include/mousedriver_shared.hch +++ b/Graphic_Equalizer/include/mouse_shared.hch @@ -28,7 +28,7 @@ typedef struct { unsigned 10 x;
unsigned 9 y;
unsigned 3 state;
-} mousedata_s;
+} mousedata_t;
diff --git a/Graphic_Equalizer/include/smartmedia.hch b/Graphic_Equalizer/include/smartmedia.hch new file mode 100644 index 0000000..e44e435 --- /dev/null +++ b/Graphic_Equalizer/include/smartmedia.hch @@ -0,0 +1,46 @@ +/*! \file smartmedia.hch
+ *
+ * \section generic SmartMedia API
+ *
+ * \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 _SMARTMEDIA_HCH
+#define _SMARTMEDIA_HCH 1
+
+
+
+/*
+ * Create a define to keep API generic
+ */
+#define CPLDRun(ClockRate) RC200CPLDRun(ClockRate)
+#define SmartMediaRun(ClockRate) RC200SmartMediaRun(ClockRate)
+
+
+
+/*
+ * Initializes the smartmedia device.
+ */
+void smartmedia_init(void);
+
+
+/*
+ * This function loads the memory with data from the smartmedia card.
+ */
+void smartmedia_loaddata(void);
+
+#else
+#error "ERROR file smartmedia.hch multiple times included"
+#endif /* --- _SMARTMEDIA_HCH --- */
+
|