summaryrefslogtreecommitdiff
path: root/firmware/export/config.h
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/export/config.h')
-rw-r--r--firmware/export/config.h28
1 files changed, 20 insertions, 8 deletions
diff --git a/firmware/export/config.h b/firmware/export/config.h
index de84dc3742..c06e5d110a 100644
--- a/firmware/export/config.h
+++ b/firmware/export/config.h
@@ -74,6 +74,13 @@
74#define AT91SAM9260 9260 74#define AT91SAM9260 9260
75#define AS3525v2 35252 75#define AS3525v2 35252
76 76
77/* platforms
78 * bit fields to allow PLATFORM_HOSTED to be OR'ed e.g. with a
79 * possible future PLATFORM_ANDROID (some OSes might need totally different
80 * handling to run on them than a stand-alone application) */
81#define PLATFORM_NATIVE (1<<0)
82#define PLATFORM_HOSTED (1<<1)
83
77/* CONFIG_KEYPAD */ 84/* CONFIG_KEYPAD */
78#define PLAYER_PAD 1 85#define PLAYER_PAD 1
79#define RECORDER_PAD 2 86#define RECORDER_PAD 2
@@ -497,6 +504,10 @@ Lyre prototype 1 */
497#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING 504#define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
498#endif 505#endif
499 506
507#ifndef CONFIG_PLATFORM
508#define CONFIG_PLATFORM PLATFORM_NATIVE
509#endif
510
500#ifndef CONFIG_TUNER 511#ifndef CONFIG_TUNER
501#define CONFIG_TUNER 0 512#define CONFIG_TUNER 0
502#endif 513#endif
@@ -675,10 +686,10 @@ Lyre prototype 1 */
675#define HAVE_EXTENDED_MESSAGING_AND_NAME 686#define HAVE_EXTENDED_MESSAGING_AND_NAME
676#define HAVE_WAKEUP_EXT_CB 687#define HAVE_WAKEUP_EXT_CB
677 688
678#ifndef SIMULATOR 689#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
679#define HAVE_PRIORITY_SCHEDULING 690#define HAVE_PRIORITY_SCHEDULING
680#define HAVE_SCHEDULER_BOOSTCTRL 691#define HAVE_SCHEDULER_BOOSTCTRL
681#endif /* SIMULATOR */ 692#endif /* PLATFORM_NATIVE */
682 693
683#define HAVE_SEMAPHORE_OBJECTS 694#define HAVE_SEMAPHORE_OBJECTS
684 695
@@ -744,7 +755,7 @@ Lyre prototype 1 */
744#endif 755#endif
745 756
746/* IRAM usage */ 757/* IRAM usage */
747#if !defined(SIMULATOR) && /* Not for simulators */ \ 758#if (CONFIG_PLATFORM & PLATFORM_NATIVE) && /* Not for hosted environments */ \
748 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \ 759 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
749 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \ 760 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
750 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \ 761 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
@@ -780,9 +791,10 @@ Lyre prototype 1 */
780#define IBSS_ATTR 791#define IBSS_ATTR
781#define STATICIRAM static 792#define STATICIRAM static
782#endif 793#endif
794
783#if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || \ 795#if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || \
784 (CONFIG_CPU == IMX31L)) \ 796 (CONFIG_CPU == IMX31L)) \
785 && !defined(SIMULATOR) && !defined(BOOTLOADER) 797 && (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(BOOTLOADER)
786/* Functions that have INIT_ATTR attached are NOT guaranteed to survive after 798/* Functions that have INIT_ATTR attached are NOT guaranteed to survive after
787 * root_menu() has been called. Their code may be overwritten by other data or 799 * root_menu() has been called. Their code may be overwritten by other data or
788 * code in order to save RAM, and references to them might point into 800 * code in order to save RAM, and references to them might point into
@@ -799,7 +811,7 @@ Lyre prototype 1 */
799#define INIT_ATTR 811#define INIT_ATTR
800#endif 812#endif
801 813
802#if defined(SIMULATOR) && defined(__APPLE__) 814#if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
803#define DATA_ATTR __attribute__ ((section("__DATA, .data"))) 815#define DATA_ATTR __attribute__ ((section("__DATA, .data")))
804#else 816#else
805#define DATA_ATTR __attribute__ ((section(".data"))) 817#define DATA_ATTR __attribute__ ((section(".data")))
@@ -923,7 +935,7 @@ Lyre prototype 1 */
923 935
924#else /* BOOTLOADER */ 936#else /* BOOTLOADER */
925 937
926#ifndef SIMULATOR 938#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
927//#define USB_ENABLE_SERIAL 939//#define USB_ENABLE_SERIAL
928#define USB_ENABLE_STORAGE 940#define USB_ENABLE_STORAGE
929 941
@@ -941,11 +953,11 @@ Lyre prototype 1 */
941/* This attribute can be used to enable to detection of plugin file handles leaks. 953/* This attribute can be used to enable to detection of plugin file handles leaks.
942 * When enabled, the plugin core will monitor open/close/creat and when the plugin exits 954 * When enabled, the plugin core will monitor open/close/creat and when the plugin exits
943 * will display an error message if the plugin leaked some file handles */ 955 * will display an error message if the plugin leaked some file handles */
944#ifndef SIMULATOR 956#if (CONFIG_PLATFORM & PLATFORM_NATIVE)
945#define HAVE_PLUGIN_CHECK_OPEN_CLOSE 957#define HAVE_PLUGIN_CHECK_OPEN_CLOSE
946#endif 958#endif
947 959
948#if defined(HAVE_DIRCACHE) && !defined(SIMULATOR) 960#if defined(HAVE_DIRCACHE) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
949#define HAVE_IO_PRIORITY 961#define HAVE_IO_PRIORITY
950#endif 962#endif
951 963