Implement FS#8947 - Add a stub in the simulator for ata_disk_is_active. This make it possible to clean up some #ifdef SIMULATOR macros.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@17927 a1c6a512-1295-4272-9138-f99709370657
This commit is contained in:
parent
6fd40a57b8
commit
f4d4a6ab60
6 changed files with 11 additions and 11 deletions
|
@ -263,9 +263,7 @@ static const struct plugin_api rockbox_api = {
|
|||
read_line,
|
||||
settings_parseline,
|
||||
ata_sleep,
|
||||
#ifndef SIMULATOR
|
||||
ata_disk_is_active,
|
||||
#endif
|
||||
ata_spin,
|
||||
ata_spindown,
|
||||
reload_directory,
|
||||
|
|
|
@ -364,9 +364,7 @@ struct plugin_api {
|
|||
int (*read_line)(int fd, char* buffer, int buffer_size);
|
||||
bool (*settings_parseline)(char* line, char** name, char** value);
|
||||
void (*ata_sleep)(void);
|
||||
#ifndef SIMULATOR
|
||||
bool (*ata_disk_is_active)(void);
|
||||
#endif
|
||||
void (*ata_spin)(void);
|
||||
void (*ata_spindown)(int seconds);
|
||||
void (*reload_directory)(void);
|
||||
|
|
|
@ -1335,7 +1335,7 @@ int peak_meter_draw_get_btn(int action_context, int x, int y[],
|
|||
long next_refresh = current_tick;
|
||||
long next_big_refresh = current_tick + HZ / 10;
|
||||
int i;
|
||||
#if (CONFIG_CODEC == SWCODEC) || defined(SIMULATOR)
|
||||
#if (CONFIG_CODEC == SWCODEC)
|
||||
bool highperf = false;
|
||||
#else
|
||||
/* On MAS targets, we need to poll as often as possible in order to not
|
||||
|
|
|
@ -292,11 +292,7 @@ static bool read_peak_levels(int *peak_l, int *peak_r, int *balance)
|
|||
peak_valid_mem[peak_time % 3] = *peak_l;
|
||||
if (((peak_valid_mem[0] == peak_valid_mem[1]) &&
|
||||
(peak_valid_mem[1] == peak_valid_mem[2])) &&
|
||||
((*peak_l < 32767)
|
||||
#ifndef SIMULATOR
|
||||
|| ata_disk_is_active()
|
||||
#endif
|
||||
))
|
||||
((*peak_l < 32767) || ata_disk_is_active()))
|
||||
return false;
|
||||
|
||||
if (*peak_r > *peak_l)
|
||||
|
|
|
@ -1057,7 +1057,7 @@ static int retrieve_entries(struct tree_context *c, struct tagcache_search *tcs,
|
|||
/* Show search progress straight away if the disk needs to spin up,
|
||||
otherwise show it after the normal 1/2 second delay */
|
||||
show_search_progress(
|
||||
#if !defined(HAVE_FLASH_STORAGE) && !defined(SIMULATOR)
|
||||
#if !defined(HAVE_FLASH_STORAGE)
|
||||
ata_disk_is_active()
|
||||
#else
|
||||
true
|
||||
|
|
|
@ -33,6 +33,7 @@
|
|||
#include "ata.h" /* for volume definitions */
|
||||
|
||||
extern char having_new_lcd;
|
||||
static bool ata_spinning = false;
|
||||
|
||||
#if CONFIG_CODEC != SWCODEC
|
||||
void audio_set_buffer_margin(int seconds)
|
||||
|
@ -108,6 +109,7 @@ void ata_flush(void)
|
|||
|
||||
void ata_spin(void)
|
||||
{
|
||||
ata_spinning = true;
|
||||
}
|
||||
|
||||
void ata_sleep(void)
|
||||
|
@ -115,9 +117,15 @@ void ata_sleep(void)
|
|||
DEBUGF("ata_sleep()\n");
|
||||
}
|
||||
|
||||
bool ata_disk_is_active(void)
|
||||
{
|
||||
return ata_spinning;
|
||||
}
|
||||
|
||||
void ata_spindown(int s)
|
||||
{
|
||||
(void)s;
|
||||
ata_spinning = false;
|
||||
}
|
||||
|
||||
void rtc_init(void)
|
||||
|
|
Loading…
Reference in a new issue