summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOliver Schinagl <oliver@schinagl.nl>2005-01-11 14:27:09 (GMT)
committerOliver Schinagl <oliver@schinagl.nl>2005-01-11 14:27:09 (GMT)
commit437f8da46eeb4cded5ec26d6fbe2b7f309bbb309 (patch)
tree56f56b9da713fce1b1b3e871e4404a1d19a14e81
parentfacdaed3a068acfb98c75dddd564610a9bd8aa75 (diff)
downloadTASS-437f8da46eeb4cded5ec26d6fbe2b7f309bbb309.zip
TASS-437f8da46eeb4cded5ec26d6fbe2b7f309bbb309.tar.gz
TASS-437f8da46eeb4cded5ec26d6fbe2b7f309bbb309.tar.bz2
Removed obsolete defines, added timer to ensure the audio chip will function after a powercycle
-rw-r--r--Graphic_Equalizer/src/main.hcc16
1 files changed, 9 insertions, 7 deletions
diff --git a/Graphic_Equalizer/src/main.hcc b/Graphic_Equalizer/src/main.hcc
index ba3d22c..48ef036 100644
--- a/Graphic_Equalizer/src/main.hcc
+++ b/Graphic_Equalizer/src/main.hcc
@@ -36,7 +36,6 @@
#include "smartmedia.hch"
#include "fft.hch"
-#include "runfft.hch"
#if HAVE_DEBUG
#include "debug.hch"
@@ -62,8 +61,15 @@ void main(void) {
events_t events;
audiodata_t audiodata;
skindata_t skindata;
+ unsigned AUDIOINITWIDTH audioinitdelay;
unsigned 1 result;
+ audioinitdelay = AUDIOINITDELAY;
+
+ while (audioinitdelay) {
+ audioinitdelay--;
+ }
+
/*
* Check library versions and Request various hardware functionality.
* We need at least Major Version 1. For Audio purposes we need atleast
@@ -96,13 +102,12 @@ void main(void) {
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);
@@ -126,14 +131,13 @@ void main(void) {
PalAudioInEnable(AudioIn);
PalAudioOutEnable(AudioOut);
audio_init(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);
/*
@@ -150,13 +154,11 @@ void main(void) {
eventhandler_main(&audiodata, &events, &mousedata, &skindata);
audio_main(audiodata, AudioIn, AudioOut);
}
-#if HAVE_SMARTMEDIA
} else {
#if HAVE_DEBUG
print_string("Error Initializing SmartMedia");
#endif
}
-#endif
}
}