summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/main.hcc
diff options
context:
space:
mode:
Diffstat (limited to 'Graphic_Equalizer/src/main.hcc')
-rw-r--r--Graphic_Equalizer/src/main.hcc162
1 files changed, 0 insertions, 162 deletions
diff --git a/Graphic_Equalizer/src/main.hcc b/Graphic_Equalizer/src/main.hcc
deleted file mode 100644
index 78918b8..0000000
--- a/Graphic_Equalizer/src/main.hcc
+++ /dev/null
@@ -1,162 +0,0 @@
-/*! \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"
-
-/******** Application Includes ********/
-#include "configuration.hch"
-#include "audio.hch"
-#include "mouse_shared.hch"
-#include "mouse.hch"
-#include "eventhandler_shared.hch"
-#include "eventhandler.hch"
-#include "display_shared.hch"
-#include "display.hch"
-#include "smartmedia.hch"
-
-#include "fft.hch"
-#include "runfft.hch"
-
-#if HAVE_DEBUG
- #include "debug.hch"
-#endif
-
-/*! \fn void main(void);
- * \brief Main Application Loop.
- *
- * \return void
- * \retval void
- */
-void main(void) {
- /*
- * Set VideoOut, Audio I/O and Ram Handles and set clockrate.
- */
- macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;
- macro expr VideoOut = PalVideoOutOptimalCT(ClockRate);
- macro expr AudioIn = PalAudioInCT(0);
- macro expr AudioOut = PalAudioOutCT(0);
- macro expr RAM_BANK0 = PalPL2RAMCT(0);
-
- mousedata_t mousedata;
- events_t events;
- audiodata_t audiodata;
- skindata_t skindata;
- unsigned 1 result;
-
- /*
- * Check library versions and Request various hardware functionality.
- * We need at least Major Version 1. For Audio purposes we need atleast
- * minor version 2.
- */
- PalVersionRequire(1, 2);
- PalVideoOutRequire(1);
- PalAudioInRequire(1);
- PalAudioOutRequire(1);
-
- /*
- * We verify some datawidths here at compile time. This to ensure
- * successfull operation.
- */
- assert (PalVideoOutGetColorWidthCT(VideoOut) == 24, 0,
- "We need a 24-bit color Display.");
- assert (PalPL2RAMGetDataWidthCT(RAM_BANK0) >= 32, 0,
- "We can't work with anything less then 32 bits wide ram.");
-
- /*
- * Run The Following main tasks in parallel.
- */
- par {
- /*
- * Primary task is to 'Run' several hardware simultaniously.
- */
- PalVideoOutRun(VideoOut, ClockRate);
- MouseRun(ClockRate);
- PalAudioInRun(AudioIn, ClockRate);
- PalAudioOutRun(AudioOut, ClockRate);
- PalPL2RAMRun(RAM_BANK0, ClockRate);
-#if HAVE_SMARTMEDIA
- /*
- * The smartmedia device needs the CPLD to run also.
- */
- CPLDRun(ClockRate);
- SmartMediaRun(ClockRate);
-#endif
-#if HAVE_DEBUG
- RC200RS232Run(RC200RS232_115200Baud, RC200RS232ParityNone,
- RC200RS232FlowControlNone, ClockRate);
-#endif
-
- /*
- * Parallel to our Primary tasks we run the application.
- */
- seq {
- /*
- * But first we need to initialize Video and Audio.
- * We also load the data from the SmartMedia card
- * into the ram.
- */
-#if HAVE_DEBUG
- print_cls();
- print_string("Graphic Equalizer 2");
- print_eol();
-#endif
- PalVideoOutEnable(VideoOut);
- PalAudioInEnable(AudioIn);
- PalAudioOutEnable(AudioOut);
- audio_init(6, LINE_IN, SR_44100, AudioIn, AudioOut);
-#if HAVE_SMARTMEDIA
- /*
- * Once we properly setup the SmartMedia we load our
- * data folowed by our main program loop.
- */
- result = smartmedia_init();
- if (!result) {
-#endif
- smartmedia_loaddata(&skindata);
-
- /*
- * Main application starts here!
- */
- par {
- /*
- * From here we run the mouse driver, audio
- * and display in parallel. None of these
- * should ever return.
- */
- mouse_main(&mousedata);
- display_main(&skindata, &audiodata, &events, &mousedata);
- eventhandler_main(&audiodata, &events, &mousedata);
- audio_main(audiodata, AudioIn, AudioOut);
- }
-#if HAVE_SMARTMEDIA
- } else {
-#if HAVE_DEBUG
- print_string("Error Initializing SmartMedia");
-#endif
- }
-#endif
- }
- }
-
-} /* --- main() --- */