summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/events.hcc
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2004-11-22 14:55:25 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2004-11-22 14:55:25 (GMT)
commiteffa9eff4ed1096c4d3d78f07dafef5dae8ff3c0 (patch)
treeab5408e71dc5f83af7c423910cd34ed748e7fe16 /Graphic_Equalizer/src/events.hcc
parentdc6b5674f0dd5a772d6052240eb8b3e89c427d62 (diff)
downloadTASS-effa9eff4ed1096c4d3d78f07dafef5dae8ff3c0.zip
TASS-effa9eff4ed1096c4d3d78f07dafef5dae8ff3c0.tar.gz
TASS-effa9eff4ed1096c4d3d78f07dafef5dae8ff3c0.tar.bz2
Initial version.
Diffstat (limited to 'Graphic_Equalizer/src/events.hcc')
-rw-r--r--Graphic_Equalizer/src/events.hcc74
1 files changed, 74 insertions, 0 deletions
diff --git a/Graphic_Equalizer/src/events.hcc b/Graphic_Equalizer/src/events.hcc
new file mode 100644
index 0000000..89f9eaa
--- /dev/null
+++ b/Graphic_Equalizer/src/events.hcc
@@ -0,0 +1,74 @@
+/*! \file events.hcc
+ *
+ * \section generic This module contains the various actions and events
+ * that need to be performed.
+ *
+ * \section project Project information.
+ * Project Graphic Equalizer\n
+ * \author O.M. Schinagl
+ * \date 20041710
+ * \version 0.1
+ *
+ * \section copyright Copyright
+ * Copyright ©2004 Koninklijke Philips Electronics N.V. All rights reserved
+ *
+ * \section history Change history
+ * 20041710: O.M. Schinagl\n Initial version
+ *
+ *****************************************************************************/
+
+
+
+/******** System Includes *************/
+#include <stdlib.hch>
+
+#include "pal_master.hch"
+
+/******** Application Includes ********/
+#include "configuration.hch"
+#include "events.hch"
+
+#if HAVE_DEBUG
+ #include "debug.hch"
+#endif
+
+
+/*! \fn void load_preset(unsigned 20 preset_address,
+ * unsigned 4 *equalizer_levels);
+ * \brief This function loads 768 4bits presets into the equalizer_levels
+ * array pointed to by equalizer_levels.
+ *
+ * \param unsigned 20 PL2Ram address where preset to be loaded is.
+ * \param unsigned 4 * Pointer to preset location.
+ *
+ * \return void
+ * \retval void
+ */
+void load_preset(unsigned 20 preset_address, unsigned 4 *equalizer_levels) {
+ macro expr RAM_BANK0 = PalPL2RAMCT(0);
+ macro expr AW = PalPL2RAMGetMaxAddressWidthCT();
+ macro expr DW = PalPL2RAMGetMaxDataWidthCT();
+
+ unsigned DW data;
+ unsigned 10 equalizer_index;
+
+ /*
+ * PL2Ram needs a clockclycle between the set of an address and read.
+ * Therefore we set it once here.
+ */
+ PalPL2RAMSetReadAddress(RAM_BANK0, preset_address);
+
+ /*
+ *
+ */
+ for (equalizer_index = 0; equalizer_index != 768; equalizer_index++) {
+ /*
+ * We've allready set the address hence we can allready
+ * increase it for next use.
+ */
+ preset_address++;
+
+ PalPL2RAMRead(RAM_BANK0, &data);
+ equalizer_levels[equalizer_index] = data <- 4;
+ }
+} /* --- load_preset() --- */ \ No newline at end of file