summaryrefslogtreecommitdiffstats
path: root/Graphic_Equalizer/src/main.hcc
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/src/main.hcc
parentedf01e33d5680018a8c48224b8f7134587f3fcdf (diff)
downloadTASS-51085a870cc074c3eeef5a6ba1b45503ce0e0f4d.zip
TASS-51085a870cc074c3eeef5a6ba1b45503ce0e0f4d.tar.gz
TASS-51085a870cc074c3eeef5a6ba1b45503ce0e0f4d.tar.bz2
Diffstat (limited to 'Graphic_Equalizer/src/main.hcc')
-rw-r--r--Graphic_Equalizer/src/main.hcc52
1 files changed, 29 insertions, 23 deletions
diff --git a/Graphic_Equalizer/src/main.hcc b/Graphic_Equalizer/src/main.hcc
index 6e4f7ae..d7a8600 100644
--- a/Graphic_Equalizer/src/main.hcc
+++ b/Graphic_Equalizer/src/main.hcc
@@ -16,7 +16,6 @@
*
*****************************************************************************/
-
/*
* Set the Clock rate for this domain. 25.175 Mhz is required for the Video output.
*/
@@ -28,25 +27,19 @@
/******** Application Includes ********/
#include "configuration.hch"
-#include "display.hch"
-#include "mouse.hch"
#include "mouse_shared.hch"
-#include "audio.hch"
-#include "eventhandler.hch"
+#include "mouse.hch"
#include "eventhandler_shared.hch"
+#include "eventhandler.hch"
+#include "audio.hch"
+#include "display.hch"
+#include "smartmedia.hch"
#if HAVE_DEBUG
#include "debug.hch"
#endif
-/*
- * Request Clockrate. Approximated ClockRate is compiler assigned. As the
- * ClockRate is identical throughout the entire domain, this is a global
- * expression so that all process use the correct one.
- */
-macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;
-
/*! \fn void main(void);
* \brief Main User Input/Ouput loop.
@@ -58,15 +51,17 @@ macro expr ClockRate = PAL_ACTUAL_CLOCK_RATE;
*/
void main(void) {
/*
- * Set VideoOut, Audio I/O and Ram Handles
+ * 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 AudioOut = PalAudioOutCT(0);
macro expr RAM_BANK0 = PalPL2RAMCT(0);
- unsigned mousedata_t mousedata;
- unsigned events_t events;
+ mousedata_t mousedata;
+ events_t events;
+ unsigned 1 result;
/*
* Check library versions and Request various hardware functionality.
@@ -85,7 +80,7 @@ void main(void) {
*/
assert (PalVideoOutGetColorWidthCT(VideoOut) == 24, 0,
"We need a 24-bit color Display.");
- assert (PalPL2RAMGetDataWidthCT(PL2RAM_BANK0) >= 32, 0,
+ assert (PalPL2RAMGetDataWidthCT(RAM_BANK0) >= 32, 0,
"We can't work with anything less then 32 bits wide ram.");
/*
@@ -99,13 +94,17 @@ void main(void) {
MouseRun(ClockRate);
PalAudioInRun(AudioIn, ClockRate);
PalAudioOutRun(AudioOut, ClockRate);
-#if HAVE_SMART_MEDIA
+#if HAVE_SMARTMEDIA
/*
* The smartmedia device needs the CPLD to run.
*/
CPLDRun(ClockRate);
SmartMediaRun(ClockRate);
#endif
+#if HAVE_DEBUG
+ RC200RS232Run(RC200RS232_115200Baud, RC200RS232ParityNone,
+ RC200RS232FlowControlNone, ClockRate);
+#endif
/*
* Parallel to our Primary tasks we run the application.
@@ -116,22 +115,29 @@ void main(void) {
* We also load the data from the SmartMedia card
* into the ram.
*/
+#if HAVE_DEBUG
+ print_eol();
+ print_string("Graphic Equalizer 2");
+ print_eol();
+#endif
display_init(ClockRate);
PalAudioInEnable(AudioIn);
PalAudioOutEnable(AudioOut);
audio_init(6, LINE_IN, SR_44100);
-#if HAVE_SMART_MEDIA
+#if HAVE_SMARTMEDIA
/*
* Once we properly setup the SmartMedia we load our
* data folowed by our main program loop.
*/
- if (!smartmedia_init()) {
+ result = smartmedia_init();
+ if (!result) {
#endif
#if HAVE_DEBUG
print_string("Loading Skin ...");
#endif
- smartmedia_loaddata();
+ smartmedia_loaddata(RAM_BANK0);
#if HAVE_DEBUG
+ print_eol();
print_string("Done Loading Skin ...");
print_eol();
print_string("Running Main Application.");
@@ -147,11 +153,11 @@ void main(void) {
* should ever return.
*/
mouse_main(&mousedata);
- display_main(&events, &mousedata);
+ display_main(events, mousedata, ClockRate, RAM_BANK0);
eventhandler_main(&events, &mousedata);
audio_main();
}
-#if HAVE_SMART_MEDIA
+#if HAVE_SMARTMEDIA
} else {
#if HAVE_DEBUG
print_string("Error Initializing SmartMedia");