diff options
Diffstat (limited to 'apps/plugin.h')
-rw-r--r-- | apps/plugin.h | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/plugin.h b/apps/plugin.h index a6b864ba44..b0f4e051c5 100644 --- a/apps/plugin.h +++ b/apps/plugin.h | |||
@@ -233,7 +233,7 @@ struct plugin_api { | |||
233 | void (*lcd_yuv_set_options)(unsigned options); | 233 | void (*lcd_yuv_set_options)(unsigned options); |
234 | #endif | 234 | #endif |
235 | #endif /* MEMORYSIZE > 2 */ | 235 | #endif /* MEMORYSIZE > 2 */ |
236 | #elif (LCD_DEPTH < 4) && !defined(SIMULATOR) | 236 | #elif (LCD_DEPTH < 4) && (CONFIG_PLATFORM & PLATFORM_NATIVE) |
237 | void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width, | 237 | void (*lcd_blit_mono)(const unsigned char *data, int x, int by, int width, |
238 | int bheight, int stride); | 238 | int bheight, int stride); |
239 | void (*lcd_blit_grey_phase)(unsigned char *values, unsigned char *phases, | 239 | void (*lcd_blit_grey_phase)(unsigned char *values, unsigned char *phases, |
@@ -474,7 +474,7 @@ struct plugin_api { | |||
474 | #endif | 474 | #endif |
475 | 475 | ||
476 | void (*reset_poweroff_timer)(void); | 476 | void (*reset_poweroff_timer)(void); |
477 | #ifndef SIMULATOR | 477 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
478 | int (*system_memory_guard)(int newmode); | 478 | int (*system_memory_guard)(int newmode); |
479 | long *cpu_frequency; | 479 | long *cpu_frequency; |
480 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ | 480 | #ifdef HAVE_ADJUSTABLE_CPU_FREQ |
@@ -484,7 +484,7 @@ struct plugin_api { | |||
484 | void (*cpu_boost)(bool on_off); | 484 | void (*cpu_boost)(bool on_off); |
485 | #endif | 485 | #endif |
486 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ | 486 | #endif /* HAVE_ADJUSTABLE_CPU_FREQ */ |
487 | #endif /* !SIMULATOR */ | 487 | #endif /* PLATFORM_NATIVE */ |
488 | #ifdef HAVE_SCHEDULER_BOOSTCTRL | 488 | #ifdef HAVE_SCHEDULER_BOOSTCTRL |
489 | void (*trigger_cpu_boost)(void); | 489 | void (*trigger_cpu_boost)(void); |
490 | void (*cancel_cpu_boost)(void); | 490 | void (*cancel_cpu_boost)(void); |
@@ -530,7 +530,7 @@ struct plugin_api { | |||
530 | void (*remove_event)(unsigned short id, void (*handler)(void *data)); | 530 | void (*remove_event)(unsigned short id, void (*handler)(void *data)); |
531 | void (*send_event)(unsigned short id, void *data); | 531 | void (*send_event)(unsigned short id, void *data); |
532 | 532 | ||
533 | #ifdef SIMULATOR | 533 | #if (CONFIG_PLATFORM & PLATFORM_HOSTED) |
534 | /* special simulator hooks */ | 534 | /* special simulator hooks */ |
535 | #if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 | 535 | #if defined(HAVE_LCD_BITMAP) && LCD_DEPTH < 8 |
536 | void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int)); | 536 | void (*sim_lcd_ex_init)(unsigned long (*getpixel)(int, int)); |
@@ -553,7 +553,7 @@ struct plugin_api { | |||
553 | void* (*memset)(void *dst, int c, size_t length); | 553 | void* (*memset)(void *dst, int c, size_t length); |
554 | void* (*memcpy)(void *out, const void *in, size_t n); | 554 | void* (*memcpy)(void *out, const void *in, size_t n); |
555 | void* (*memmove)(void *out, const void *in, size_t n); | 555 | void* (*memmove)(void *out, const void *in, size_t n); |
556 | #ifndef SIMULATOR | 556 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
557 | const unsigned char *_rbctype_; | 557 | const unsigned char *_rbctype_; |
558 | #endif | 558 | #endif |
559 | int (*atoi)(const char *str); | 559 | int (*atoi)(const char *str); |
@@ -584,7 +584,7 @@ struct plugin_api { | |||
584 | int (*sound_enum_hw_eq_band_setting)(unsigned int band, | 584 | int (*sound_enum_hw_eq_band_setting)(unsigned int band, |
585 | unsigned int band_setting); | 585 | unsigned int band_setting); |
586 | #endif /* AUDIOHW_HAVE_EQ */ | 586 | #endif /* AUDIOHW_HAVE_EQ */ |
587 | #ifndef SIMULATOR | 587 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
588 | void (*mp3_play_data)(const unsigned char* start, int size, | 588 | void (*mp3_play_data)(const unsigned char* start, int size, |
589 | void (*get_more)(unsigned char** start, size_t* size)); | 589 | void (*get_more)(unsigned char** start, size_t* size)); |
590 | void (*mp3_play_pause)(bool play); | 590 | void (*mp3_play_pause)(bool play); |
@@ -593,7 +593,7 @@ struct plugin_api { | |||
593 | #if CONFIG_CODEC != SWCODEC | 593 | #if CONFIG_CODEC != SWCODEC |
594 | void (*bitswap)(unsigned char *data, int length); | 594 | void (*bitswap)(unsigned char *data, int length); |
595 | #endif | 595 | #endif |
596 | #endif /* !SIMULATOR */ | 596 | #endif /* PLATFORM_NATIVE */ |
597 | #if CONFIG_CODEC == SWCODEC | 597 | #if CONFIG_CODEC == SWCODEC |
598 | const unsigned long *audio_master_sampr_list; | 598 | const unsigned long *audio_master_sampr_list; |
599 | const unsigned long *hw_freq_sampr; | 599 | const unsigned long *hw_freq_sampr; |
@@ -731,7 +731,7 @@ struct plugin_api { | |||
731 | int (*battery_level)(void); | 731 | int (*battery_level)(void); |
732 | bool (*battery_level_safe)(void); | 732 | bool (*battery_level_safe)(void); |
733 | int (*battery_time)(void); | 733 | int (*battery_time)(void); |
734 | #ifndef SIMULATOR | 734 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
735 | unsigned int (*battery_voltage)(void); | 735 | unsigned int (*battery_voltage)(void); |
736 | #endif | 736 | #endif |
737 | #if CONFIG_CHARGING | 737 | #if CONFIG_CHARGING |
@@ -745,7 +745,7 @@ struct plugin_api { | |||
745 | #endif | 745 | #endif |
746 | 746 | ||
747 | /* misc */ | 747 | /* misc */ |
748 | #if !defined(SIMULATOR) | 748 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
749 | int* __errno; | 749 | int* __errno; |
750 | #endif | 750 | #endif |
751 | void (*srand)(unsigned int seed); | 751 | void (*srand)(unsigned int seed); |
@@ -902,7 +902,7 @@ struct plugin_header { | |||
902 | }; | 902 | }; |
903 | 903 | ||
904 | #ifdef PLUGIN | 904 | #ifdef PLUGIN |
905 | #ifndef SIMULATOR | 905 | #if (CONFIG_PLATFORM & PLATFORM_NATIVE) |
906 | extern unsigned char plugin_start_addr[]; | 906 | extern unsigned char plugin_start_addr[]; |
907 | extern unsigned char plugin_end_addr[]; | 907 | extern unsigned char plugin_end_addr[]; |
908 | #define PLUGIN_HEADER \ | 908 | #define PLUGIN_HEADER \ |
@@ -911,14 +911,14 @@ extern unsigned char plugin_end_addr[]; | |||
911 | __attribute__ ((section (".header")))= { \ | 911 | __attribute__ ((section (".header")))= { \ |
912 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ | 912 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ |
913 | plugin_start_addr, plugin_end_addr, plugin_start, &rb }; | 913 | plugin_start_addr, plugin_end_addr, plugin_start, &rb }; |
914 | #else /* SIMULATOR */ | 914 | #else /* PLATFORM_HOSTED */ |
915 | #define PLUGIN_HEADER \ | 915 | #define PLUGIN_HEADER \ |
916 | const struct plugin_api *rb DATA_ATTR; \ | 916 | const struct plugin_api *rb DATA_ATTR; \ |
917 | const struct plugin_header __header \ | 917 | const struct plugin_header __header \ |
918 | __attribute__((visibility("default"))) = { \ | 918 | __attribute__((visibility("default"))) = { \ |
919 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ | 919 | PLUGIN_MAGIC, TARGET_ID, PLUGIN_API_VERSION, \ |
920 | NULL, NULL, plugin_start, &rb }; | 920 | NULL, NULL, plugin_start, &rb }; |
921 | #endif /* SIMULATOR */ | 921 | #endif /* CONFIG_PLATFORM */ |
922 | 922 | ||
923 | #ifdef PLUGIN_USE_IRAM | 923 | #ifdef PLUGIN_USE_IRAM |
924 | /* Declare IRAM variables */ | 924 | /* Declare IRAM variables */ |