SWCODEC/IRAM: Save voice IRAM when a plugin initializes its IRAM. Defines two macros for declaring and initializing IRAM. Plugins should use these instead. See mp3_encoder, doom, etc. for details. Further tweaks in buffer restoration after other use. Hiding of some interfaces that should only be used by buffer management.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@11544 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Michael Sevakis 2006-11-18 02:18:29 +00:00
parent e2a262ee25
commit acc29d95be
15 changed files with 204 additions and 125 deletions

View file

@ -31,14 +31,7 @@
#include "video_out.h"
PLUGIN_HEADER
#ifdef USE_IRAM
extern char iramcopy[];
extern char iramstart[];
extern char iramend[];
extern char iedata[];
extern char iend[];
#endif
PLUGIN_IRAM_DECLARE
struct plugin_api* rb;
@ -319,10 +312,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter)
if (buffer == NULL)
return PLUGIN_ERROR;
#ifdef USE_IRAM
rb->memcpy(iramstart, iramcopy, iramend-iramstart);
rb->memset(iedata, 0, iend - iedata);
#endif
PLUGIN_IRAM_INIT(rb)
rb->lcd_set_backdrop(NULL);