Use the register shadow variable in all places.

git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5539 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
Jens Arnold 2005-01-09 00:58:59 +00:00
parent faedcd4e70
commit e1a1926f46
2 changed files with 6 additions and 4 deletions

View file

@ -45,6 +45,7 @@ enum
#if (CONFIG_HWCODEC == MAS3587F) || (CONFIG_HWCODEC == MAS3539F)
extern unsigned long shadow_io_control_main;
extern unsigned shadow_codec_reg0;
#endif
/**** globals ****/
@ -539,7 +540,8 @@ static void init_playback(void)
} while(val);
/* Enable the D/A Converter */
mas_codec_writereg(0x0, 0x0001);
shadow_codec_reg0 = 0x0001;
mas_codec_writereg(0x0, shadow_codec_reg0);
/* ADC scale 0%, DSP scale 100% */
mas_codec_writereg(6, 0x0000);

View file

@ -53,7 +53,6 @@ static void stop_recording(void);
static int get_unsaved_space(void);
static void pause_recording(void);
static void resume_recording(void);
static int shadow_codec_reg0;
#endif /* #if CONFIG_HWCODEC == MAS3587F */
#ifndef SIMULATOR
@ -362,6 +361,7 @@ unsigned long shadow_encoder_control = 0;
unsigned long shadow_io_control_main = 0;
unsigned long shadow_app_select = 0;
unsigned long shadow_soft_mute = 0;
unsigned shadow_codec_reg0;
#endif
static int mpeg_file;
@ -648,7 +648,7 @@ void rec_tick(void)
num_bytes = mp3buf_write - mp3buf_read;
if(num_bytes < 0)
num_bytes += mp3buflen;
if(mp3buflen - num_bytes < MPEG_RECORDING_LOW_WATER && !saving)
{
saving = true;
@ -2393,7 +2393,7 @@ void mpeg_beep(int duration)
void mpeg_new_file(const char *filename)
{
mpeg_errno = 0;
strncpy(recording_filename, filename, MAX_PATH - 1);
recording_filename[MAX_PATH - 1] = 0;