From 437f8da46eeb4cded5ec26d6fbe2b7f309bbb309 Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Tue, 11 Jan 2005 14:27:09 +0000 Subject: Removed obsolete defines, added timer to ensure the audio chip will function after a powercycle --- Graphic_Equalizer/src/main.hcc | 16 +++++++++------- 1 file 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 } } -- cgit v0.12