From a0fca0c7bf3bd1c121667a1e66614646a6b96752 Mon Sep 17 00:00:00 2001 From: Amaury Pouly Date: Sat, 16 Sep 2017 23:29:50 +0200 Subject: Add simulator support for the A860 This requires a few changes unrelated to the A860 because configure unsets APPLICATION but the NWZ is an application! Change-Id: Id91aa23193383ac95886b281653da5286edd9caf --- firmware/export/config/sonynwzlinux.h | 12 +++++++++--- firmware/export/hostfs.h | 3 +++ 2 files changed, 12 insertions(+), 3 deletions(-) (limited to 'firmware/export') diff --git a/firmware/export/config/sonynwzlinux.h b/firmware/export/config/sonynwzlinux.h index 4c66651e6b..4d95ef9cdd 100644 --- a/firmware/export/config/sonynwzlinux.h +++ b/firmware/export/config/sonynwzlinux.h @@ -2,7 +2,9 @@ * This config file is for the Sony NWZ Linux based targets */ +#ifndef SIMULATOR #define CONFIG_PLATFORM (PLATFORM_HOSTED) +#endif /* define this if you have a bitmap LCD display */ #define HAVE_LCD_BITMAP @@ -64,10 +66,17 @@ #define CONFIG_KEYPAD SONY_NWZ_PAD #define HAS_BUTTON_HOLD +/** Non-simulator section **/ +#ifndef SIMULATOR /* We have usb power and can detect usb but it is handled by Linux */ #define HAVE_USB_POWER #define USB_NONE +/* Audio codec */ +#define HAVE_NWZ_LINUX_CODEC + +#endif /* SIMULATOR */ + #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE /* Linux controlls charging, we can monitor */ @@ -92,9 +101,6 @@ /* Battery */ #define BATTERY_TYPES_COUNT 1 -/* Audio codec */ -#define HAVE_NWZ_LINUX_CODEC - /* special define to be use in various places */ #define SONY_NWZ_LINUX diff --git a/firmware/export/hostfs.h b/firmware/export/hostfs.h index a24d009ca9..fa916870f3 100644 --- a/firmware/export/hostfs.h +++ b/firmware/export/hostfs.h @@ -60,6 +60,9 @@ extern int hostfs_driver_type(int drive); # define hostfs_driver_type(drive) (STORAGE_NAND_NUM) # elif (CONFIG_STORAGE & STORAGE_RAMDISK) # define hostfs_driver_type(drive) (STORAGE_RAMDISK_NUM) +/* we may have hostfs without application when building sims for applications! */ +# elif (CONFIG_STORAGE & STORAGE_HOSTFS) +# define hostfs_driver_type(drive) (STORAGE_HOSTFS_NUM) # else # error Unknown storage driver # endif /* CONFIG_STORAGE */ -- cgit v1.2.3