summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/include
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-10 16:11:03 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-10 16:11:03 (GMT)
commit51085a870cc074c3eeef5a6ba1b45503ce0e0f4d (patch)
tree2232a881b7a90f475da5640161f32cf900102369 /Graphic_Equalizer/include
parentedf01e33d5680018a8c48224b8f7134587f3fcdf (diff)
downloadTASS-51085a870cc074c3eeef5a6ba1b45503ce0e0f4d.zip
TASS-51085a870cc074c3eeef5a6ba1b45503ce0e0f4d.tar.gz
TASS-51085a870cc074c3eeef5a6ba1b45503ce0e0f4d.tar.bz2
Diffstat (limited to 'Graphic_Equalizer/include')
-rw-r--r--Graphic_Equalizer/include/audio.hch18
-rw-r--r--Graphic_Equalizer/include/configuration.hch54
-rw-r--r--Graphic_Equalizer/include/display.hch2
-rw-r--r--Graphic_Equalizer/include/display_shared.hch16
-rw-r--r--Graphic_Equalizer/include/eventhandler.hch7
-rw-r--r--Graphic_Equalizer/include/eventhandler_shared.hch18
-rw-r--r--Graphic_Equalizer/include/smartmedia.hch11
7 files changed, 66 insertions, 60 deletions
diff --git a/Graphic_Equalizer/include/audio.hch b/Graphic_Equalizer/include/audio.hch
index 0b11168..ff4a4fc 100644
--- a/Graphic_Equalizer/include/audio.hch
+++ b/Graphic_Equalizer/include/audio.hch
@@ -1,4 +1,4 @@
-/*! \file audiodriver.hch
+/*! \file audio.hch
*
* \section generic Audiodriver API
*
@@ -16,16 +16,14 @@
*
********************************************************************/
-#ifndef _AUDIODRIVER_HCH
-#define _AUDIODRIVER_HCH 1
+#ifndef _AUDIO_HCH
+#define _AUDIO_HCH 1
/*
* Type definition of the shared memory to be used in various processes
*/
-typedef struct {
-} audiodata_s;
@@ -41,7 +39,7 @@ typedef struct {
* Line in or Mic in aliases for audio_init.
*/
#define LINE_IN RC200AudioInLineIn
-#define MIC_IN RC200AudioInMicIn
+#define MIC_IN RC200AudioInMicrophone
@@ -62,9 +60,7 @@ typedef struct {
* passed level, input_source chooses between line in or mic in. The
* sample_rate is set to supplied rate. Defines for these are mentioned above.
*/
-void audio_init(unsigned 4 gain_level,
- unsigned 1 input_source,
- unsigned 3 sample_rate);
+macro proc audio_init(gain_level, input_source, sample_rate);
@@ -75,6 +71,6 @@ void audio_init(unsigned 4 gain_level,
void audio_main(void);
#else
-#error "ERROR file audiodriver.hch multiple times included"
-#endif /* --- _AUDIODRIVER_HCH --- */
+#error "ERROR file audio.hch multiple times included"
+#endif /* --- _AUDIO_HCH --- */
diff --git a/Graphic_Equalizer/include/configuration.hch b/Graphic_Equalizer/include/configuration.hch
index 6e9480a..c02a7e2 100644
--- a/Graphic_Equalizer/include/configuration.hch
+++ b/Graphic_Equalizer/include/configuration.hch
@@ -22,7 +22,7 @@
/*
* To print debug information on the RS232 port set this define.
*/
-#define HAVE_DEBUG 0
+#define HAVE_DEBUG 1
@@ -32,7 +32,7 @@
* 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 HAVE_SMARTMEDIA 0
#define USE_MASK_ONLY 1
@@ -42,7 +42,7 @@
* data, or each segment is stored seperatly at its own address. If set to 1
* we'll asume one large continuous blok.
*/
-#define LARGE_DATA_BLOCK 1
+#define LARGE_DATA_BLOCK 0
@@ -53,42 +53,42 @@
*/
#define SIZE_SKIN 0x04b000
#define SIZE_HELP 0x04b000
-#define SIZE_MASK_SKIN 0x019000
-#define SIZE_MASK_HELP 0x019000
+#define SIZE_SKINMASK 0x019000
+#define SIZE_HELPMASK 0x019000
/*
* Here we setup the start and end address for the various components.
*/
-#define ADDR_SKIN_START 0x000000
-#define ADDR_SKIN_END (ADDR_SKIN_START +SIZE_SKIN)
+#define ADDRESS_SKIN_START 0x000000
+#define ADDRESS_SKIN_END (ADDRESS_SKIN_START +SIZE_SKIN)
-#define ADDR_HELP_START 0x04b001
-#define ADDR_HELP_END (ADDR_HELP_START +SIZE_HELP)
+#define ADDRESS_HELP_START 0x04b001
+#define ADDRESS_HELP_END (ADDRESS_HELP_START +SIZE_HELP)
#if LARGE_DATA_BLOCK
- #define SM_ADDR_OFFSET 0x084000
+ #define SMARTMEDIA_ADDRESS_OFFSET 0x084000
- #define SM_ADDR_SKIN_START SM_ADDR_OFFSET
- #define SM_ADDR_SKIN_END (SM_ADDR_SKIN_START +(SIZE_SKIN *3))
- #define SM_ADDR_SKIN_MASK_START (SM_ADDR_SKIN_END +1)
- #define SM_ADDR_SKIN_MASK_END (SM_ADDR_OFFSET +SIZE_MASK_SKIN)
+ #define SMARTMEDIA_ADDRESS_SKIN_START SMARTMEDIA_ADDRESS_OFFSET
+ #define SMARTMEDIA_ADDRESS_SKIN_END (SMARTMEDIA_ADDRESS_SKIN_START +(SIZE_SKIN *3))
+ #define SMARTMEDIA_ADDRESS_SKINMASK_START (SMARTMEDIA_ADDRESS_SKIN_END +1)
+ #define SMARTMEDIA_ADDRESS_SKINMASK_END (SMARTMEDIA_ADDRESS_SKINMASK_START +SIZE_SKINMASK)
- #define SM_ADDR_HELP_START (SM_ADDR_SKIN_MASK_END +1)
- #define SM_ADDR_HELP_END (SM_ADDR_HELP_START +(SIZE_HELP *3))
- #define SM_ADDR_HELP_MASK_START (SM_ADDR_HELP_END +1)
- #define SM_ADDR_HELP_MASK_END (SM_ADDR_OFFSET +SIZE_MASK_HELP)
+ #define SMARTMEDIA_ADDRESS_HELP_START (SMARTMEDIA_ADDRESS_SKINMASK_END +1)
+ #define SMARTMEDIA_ADDRESS_HELP_END (SMARTMEDIA_ADDRESS_HELP_START +(SIZE_HELP *3))
+ #define SMARTMEDIA_ADDRESS_HELPMASK_START (SMARTMEDIA_ADDRESS_HELP_END +1)
+ #define SMARTMEDIA_ADDRESS_HELPMASK_END (SMARTMEDIA_ADDRESS_HELPMASK_START +SIZE_HELPMASK)
#else
- #define SM_ADDR_SKIN_START 0x084000
- #define SM_ADDR_SKIN_MASK_START 0x168000
- #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))
- #define SM_ADDR_HELP_END (SM_ADDR_HELP_START +(SIZE_HELP *3))
- #define SM_ADDR_HELP_MASK_END (SM_ADDR_SKIN_MASK_END +(SIZE_MASK_HELP *3))
+ #define SMARTMEDIA_ADDRESS_SKIN_START 0x084000
+ #define SMARTMEDIA_ADDRESS_SKINMASK_START 0x168000
+ #define SMARTMEDIA_ADDRESS_HELP_START 0x1b4000
+ #define SMARTMEDIA_ADDRESS_HELPMASK_START 0x298000
+
+ #define SMARTMEDIA_ADDRESS_SKIN_END (SMARTMEDIA_ADDRESS_SKIN_START +(SIZE_SKIN *3))
+ #define SMARTMEDIA_ADDRESS_SKINMASK_END (SMARTMEDIA_ADDRESS_SKINMASK_START +(SIZE_SKINMASK *3))
+ #define SMARTMEDIA_ADDRESS_HELP_END (SMARTMEDIA_ADDRESS_HELP_START +(SIZE_HELP *3))
+ #define SMARTMEDIA_ADDRESS_HELPMASK_END (SMARTMEDIA_ADDRESS_HELPMASK_END +(SIZE_HELPMASK *3))
#endif
diff --git a/Graphic_Equalizer/include/display.hch b/Graphic_Equalizer/include/display.hch
index d191149..f8a4d0a 100644
--- a/Graphic_Equalizer/include/display.hch
+++ b/Graphic_Equalizer/include/display.hch
@@ -35,7 +35,7 @@
* informs events what the current mask is. To optain the current mask we need
* the X and Y coordinates from our mousedata pointer.
*/
-void display_main(events_t *events, mousedata_t *mousedata);
+macro proc display_main(events, mousedata, ClockRate, RAM_BANK0);
#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 66e8111..a3f2cb1 100644
--- a/Graphic_Equalizer/include/display_shared.hch
+++ b/Graphic_Equalizer/include/display_shared.hch
@@ -22,22 +22,6 @@
/*
- * 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
diff --git a/Graphic_Equalizer/include/eventhandler.hch b/Graphic_Equalizer/include/eventhandler.hch
index 413e563..a1dab26 100644
--- a/Graphic_Equalizer/include/eventhandler.hch
+++ b/Graphic_Equalizer/include/eventhandler.hch
@@ -23,10 +23,11 @@
/*
- * This is the main eventhandler loop. It never returns! It coordinates
- * userinput and the actions requred to be taken.
+ * This is the main eventhandler loop. We require pointers to the event struct
+ * to store actions to be performed and a mousedata pointer so that we know on
+ * what mousestate to respond. We never returns!
*/
-void eventhandler_main(events_t *events);
+void eventhandler_main(events_t *events, mousedata_t *mousedata);
#else
#error "ERROR file eventhandler.hch multiple times included"
diff --git a/Graphic_Equalizer/include/eventhandler_shared.hch b/Graphic_Equalizer/include/eventhandler_shared.hch
index 1ce7578..342bb0b 100644
--- a/Graphic_Equalizer/include/eventhandler_shared.hch
+++ b/Graphic_Equalizer/include/eventhandler_shared.hch
@@ -32,6 +32,24 @@ typedef struct {
unsigned 8 mask;
} events_t;
+
+
+/*
+ * 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];
+
+/*
+ * Equalizer lookuptabe.
+ * TODO: This table is now hardcoded. To ensure full skinability this table
+ * should be dynamically loaded.
+ */
+extern unsigned 4 equalizer_table[66];
+
+
+
#else
#error "ERROR file eventhandler_shared.hch multiple times included"
#endif /* --- _EVENTHANDLER_SHARED_HCH --- */
diff --git a/Graphic_Equalizer/include/smartmedia.hch b/Graphic_Equalizer/include/smartmedia.hch
index e44e435..774518f 100644
--- a/Graphic_Equalizer/include/smartmedia.hch
+++ b/Graphic_Equalizer/include/smartmedia.hch
@@ -19,6 +19,12 @@
#ifndef _SMARTMEDIA_HCH
#define _SMARTMEDIA_HCH 1
+/*
+ * SmartMedia functioncalls a bit to be set to either Read or Write. This
+ * define should make life easier identifying which one is what.
+ */
+#define READ 0
+#define WRITE 1
/*
@@ -32,13 +38,14 @@
/*
* Initializes the smartmedia device.
*/
-void smartmedia_init(void);
+unsigned 1 smartmedia_init(void);
+
/*
* This function loads the memory with data from the smartmedia card.
*/
-void smartmedia_loaddata(void);
+macro proc smartmedia_loaddata(RAM_BANK0);
#else
#error "ERROR file smartmedia.hch multiple times included"