summaryrefslogtreecommitdiff
path: root/apps/plugin.h
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2010-06-21 16:53:00 +0000
committerThomas Martitz <kugel@rockbox.org>2010-06-21 16:53:00 +0000
commit35e8b1429a2cdcf6580f6d25890fed9865165d0b (patch)
tree084be19a29bffa879eee8e3cad92d8f3b342a337 /apps/plugin.h
parent02e04585bdf1fbd00cf84d2000f59ec198440cb3 (diff)
downloadrockbox-35e8b1429a2cdcf6580f6d25890fed9865165d0b.zip
rockbox-35e8b1429a2cdcf6580f6d25890fed9865165d0b.tar.gz
rockbox-35e8b1429a2cdcf6580f6d25890fed9865165d0b.tar.bz2
rockbox-35e8b1429a2cdcf6580f6d25890fed9865165d0b.tar.xz
Rockbox as an application: Replace many occurences of #ifdef SIMULATOR with #if (CONFIG_PLATFORM & PLATFORM_HOSTED) (or equivalently).
The simulator defines PLATFORM_HOSTED, as RaaA will do (RaaA will not define SIMULATOR). The new define is to (de-)select code to compile on hosted platforms generally. Should be no functional change to targets or the simulator. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@27019 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'apps/plugin.h')
-rw-r--r--apps/plugin.h24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugin.h b/apps/plugin.h
index a6b864b..b0f4e05 100644
--- a/apps/plugin.h
+++ b/apps/plugin.h
@@ -233,7 +233,7 @@ struct plugin_api {
void (*lcd_yuv_set_options)(unsigned options);
#endif
#endif /* MEMORYSIZE > 2 */
-#elif (LCD_DEPTH < 4) && !defined(SIMULATOR)
+#elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width,
int bheight, int stride);
void (*lcd_blit_grey_phase)(unsigned char *values, unsigned char *phases,
@@ -474,7 +474,7 @@ struct plugin_api {
#endif
void (*reset_poweroff_timer)(void);
-#ifndef SIMULATOR
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
int (*system_memory_guard)(int newmode);
long *cpu_frequency;
#ifdef HAVE_ADJUSTABLE_CPU_FREQ
@@ -484,7 +484,7 @@ struct plugin_api {
void (*cpu_boost)(bool on_off);
#endif
#endif /* HAVE_ADJUSTABLE_CPU_FREQ */
-#endif /* !SIMULATOR */
+#endif /* PLATFORM_NATIVE */
#ifdef HAVE_SCHEDULER_BOOSTCTRL
void (*trigger_cpu_boost)(void);
void (*cancel_cpu_boost)(void);
@@ -530,7 +530,7 @@ struct plugin_api {
void (*remove_event)(unsigned short id, void (*handler)(void *data));
void (*send_event)(unsigned short id, void *data);
-#ifdef SIMULATOR
+#if (CONFIG_PLATFORM & PLATFORM_HOSTED)
/* special simulator hooks */
#if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8
void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int));
@@ -553,7 +553,7 @@ struct plugin_api {
void* (*memset)(void *dst, int c, size_t length);
void* (*memcpy)(void *out, const void *in, size_t n);
void* (*memmove)(void *out, const void *in, size_t n);
-#ifndef SIMULATOR
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
const unsigned char *_rbctype_;
#endif
int (*atoi)(const char *str);
@@ -584,7 +584,7 @@ struct plugin_api {
int (*sound_enum_hw_eq_band_setting)(unsigned int band,
unsigned int band_setting);
#endif /* AUDIOHW_HAVE_EQ */
-#ifndef SIMULATOR
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
void (*mp3_play_data)(const unsigned char* start, int size,
void (*get_more)(unsigned char** start, size_t* size));
void (*mp3_play_pause)(bool play);
@@ -593,7 +593,7 @@ struct plugin_api {
#if CONFIG_CODEC != SWCODEC
void (*bitswap)(unsigned char *data, int length);
#endif
-#endif /* !SIMULATOR */
+#endif /* PLATFORM_NATIVE */
#if CONFIG_CODEC == SWCODEC
const unsigned long *audio_master_sampr_list;
const unsigned long *hw_freq_sampr;
@@ -731,7 +731,7 @@ struct plugin_api {
int (*battery_level)(void);
bool (*battery_level_safe)(void);
int (*battery_time)(void);
-#ifndef SIMULATOR
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
unsigned int (*battery_voltage)(void);
#endif
#if CONFIG_CHARGING
@@ -745,7 +745,7 @@ struct plugin_api {
#endif
/* misc */
-#if !defined(SIMULATOR)
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
int* __errno;
#endif
void (*srand)(unsigned int seed);
@@ -902,7 +902,7 @@ struct plugin_header {
};
#ifdef PLUGIN
-#ifndef SIMULATOR
+#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
extern unsigned char plugin_start_addr[];
extern unsigned char plugin_end_addr[];
#define PLUGIN_HEADER \
@@ -911,14 +911,14 @@ extern unsigned char plugin_end_addr[];
__attribute__ ((section (".header")))= { \
PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
plugin_start_addr, plugin_end_addr, plugin_start, &rb };
-#else /* SIMULATOR */
+#else /* PLATFORM_HOSTED */
#define PLUGIN_HEADER \
const struct plugin_api *rb DATA_ATTR; \
const struct plugin_header __header \
__attribute__((visibility("default"))) = { \
PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \
NULL, NULL, plugin_start, &rb };
-#endif /* SIMULATOR */
+#endif /* CONFIG_PLATFORM */
#ifdef PLUGIN_USE_IRAM
/* Declare IRAM variables */