From 149677eca198a58c2a8f5c94eedc0d294f2ed82c Mon Sep 17 00:00:00 2001 From: Oliver Schinagl Date: Thu, 9 Dec 2004 14:02:52 +0000 Subject: Added splitting defines. --- Graphic_Equalizer_Split/src/display.hcc | 10 ++++++++++ Graphic_Equalizer_Split/src/eventhandler.hcc | 15 +++++++++++++-- Graphic_Equalizer_Split/src/main.hcc | 16 +++++++++++++++- 3 files changed, 38 insertions(+), 3 deletions(-) diff --git a/Graphic_Equalizer_Split/src/display.hcc b/Graphic_Equalizer_Split/src/display.hcc index 1aeb9d9..dea60eb 100644 --- a/Graphic_Equalizer_Split/src/display.hcc +++ b/Graphic_Equalizer_Split/src/display.hcc @@ -129,12 +129,19 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events break; } +#if BUILD_ALL if (MODE_GRAPH == events->mode) { +#endif +#if (HAVE_GRAPHIC_VISUALIZATION_ONLY || BUILD_ALL) par { visual_graph_color = ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[31:24]]) << 1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[31:24]]) << -1) @ ((unsigned 8)(0 @ audiodata->fft_info.read[pixeldata[31:24]]) << 0); PalVideoOutWrite(VIDEOOUT, 0 @ visual_graph_color); } +#endif +#if BUILD_ALL } else { +#endif +#if (HAVE_GRAPHIC_EQUALIZER_ONLY || BUILD_ALL) /* * Determin what to draw where here. Every case has an * if else statement comparing wether to draw something @@ -248,7 +255,10 @@ void display_main(skindata_t *skindata, audiodata_t *audiodata, events_t *events } break; } +#endif +#if BUILD_ALL } +#endif /* * We compare our current X and Y scan positions of the diff --git a/Graphic_Equalizer_Split/src/eventhandler.hcc b/Graphic_Equalizer_Split/src/eventhandler.hcc index e1f90ae..0be1f5a 100644 --- a/Graphic_Equalizer_Split/src/eventhandler.hcc +++ b/Graphic_Equalizer_Split/src/eventhandler.hcc @@ -69,8 +69,10 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo unsigned 4 equalizer_mode_local; unsigned 1 newmaskupdate; +#if (!HAVE_VISUALIZATION_ONLY || BUILD_ALL) load_preset(LOAD_PRESET_RESET, equalizer_levels.write); reload_equalizer(events, &equalizer_levels.write[preset_offset]); +#endif while (TRUE) { maskupdate_notification ? newmaskupdate; @@ -86,8 +88,12 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo * any press returns to the application. */ if (MODE_GRAPH == events->mode) { +#if (HAVE_GRAPHIC_VISUALIZATION_ONLY) + //RC200Reconfigure(SMARTMEDIA_ADDRESS_APP_GE); +#else events->mode = MODE_SKIN; events->mask = 0; +#endif } else { delay; } @@ -98,12 +104,16 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo if (MODE_GRAPH == events->mode) { events->mode = MODE_SKIN; } else { +#if (HAVE_GRAPHIC_VISUALIZATION_ONLY) + //RC200Reconfigure(SMARTMEDIA_ADDRESS_APP_GRAPH); +#else events->mode = MODE_GRAPH; +#endif } } else { delay; } - +#if (!HAVE_GRAPHIC_VISUALIZATION_ONLY || BUILD_ALL) /* * If the current mask equals the help button * we set display mode to help. @@ -229,6 +239,7 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo delay; } + if ((AREA_EQUALIZER_MIN <= events->mask) && (events->mask <= AREA_EQUALIZER_MAX)) { if (EQUALIZERMODE_PRECISE == events->equalizer_mode) { @@ -296,7 +307,7 @@ void eventhandler_main(audiodata_t *audiodata, events_t *events, mousedata_t *mo } else { delay; } - +#endif break; default: diff --git a/Graphic_Equalizer_Split/src/main.hcc b/Graphic_Equalizer_Split/src/main.hcc index 78918b8..2c7b30a 100644 --- a/Graphic_Equalizer_Split/src/main.hcc +++ b/Graphic_Equalizer_Split/src/main.hcc @@ -90,10 +90,12 @@ void main(void) { /* * Primary task is to 'Run' several hardware simultaniously. */ +#if (!HAVE_LOADER_ONLY || BUILD_ALL) PalVideoOutRun(VideoOut, ClockRate); MouseRun(ClockRate); PalAudioInRun(AudioIn, ClockRate); PalAudioOutRun(AudioOut, ClockRate); +#endif PalPL2RAMRun(RAM_BANK0, ClockRate); #if HAVE_SMARTMEDIA /* @@ -121,10 +123,12 @@ void main(void) { print_string("Graphic Equalizer 2"); print_eol(); #endif +#if (!HAVE_LOADER_ONLY || BUILD_ALL) PalVideoOutEnable(VideoOut); PalAudioInEnable(AudioIn); PalAudioOutEnable(AudioOut); audio_init(6, LINE_IN, SR_44100, AudioIn, AudioOut); +#endif #if HAVE_SMARTMEDIA /* * Once we properly setup the SmartMedia we load our @@ -133,8 +137,17 @@ void main(void) { result = smartmedia_init(); if (!result) { #endif +#if (HAVE_LOADER_ONLY || BUILD_ALL) smartmedia_loaddata(&skindata); - +#endif + /* + * If we only load the 'loader' we need to reconfigure the FPGA to load the + * main application once this is done. + */ +#if (HAVE_LOADER_ONLY) + //RC200Reconfigure(SMARTMEDIA_ADDRESS_GE); +#endif +#if (!HAVE_LOADER_ONLY || HAVE_GRAPHIC_VISUALIZATION_ONLY || HAVE_GRAPHIC_EQUALIZER_ONLY || BUILD_ALL) /* * Main application starts here! */ @@ -149,6 +162,7 @@ void main(void) { eventhandler_main(&audiodata, &events, &mousedata); audio_main(audiodata, AudioIn, AudioOut); } +#endif #if HAVE_SMARTMEDIA } else { #if HAVE_DEBUG -- cgit v0.12