diff options
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/SOURCES | 4 | ||||
-rw-r--r-- | firmware/export/config/samsungypr0.h | 21 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/sim-ui-defines.h | 7 |
3 files changed, 23 insertions, 9 deletions
diff --git a/firmware/SOURCES b/firmware/SOURCES index 86bf746df9..884e1102e2 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -14,7 +14,7 @@ powermgmt.c | |||
14 | target/hosted/cpuinfo-linux.c | 14 | target/hosted/cpuinfo-linux.c |
15 | #endif | 15 | #endif |
16 | 16 | ||
17 | #ifndef SAMSUNG_YPR0 /* uses as3514 rtc */ | 17 | #if !defined(SAMSUNG_YPR0) || defined(SIMULATOR) /* uses as3514 rtc */ |
18 | target/hosted/rtc.c | 18 | target/hosted/rtc.c |
19 | #endif | 19 | #endif |
20 | 20 | ||
@@ -74,7 +74,7 @@ target/hosted/sdl/app/button-application.c | |||
74 | #endif | 74 | #endif |
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #ifdef SAMSUNG_YPR0 | 77 | #if defined(SAMSUNG_YPR0) && !defined(SIMULATOR) |
78 | drivers/adc-as3514.c | 78 | drivers/adc-as3514.c |
79 | drivers/lcd-memframe.c | 79 | drivers/lcd-memframe.c |
80 | #if (CONFIG_RTC == RTC_AS3514) | 80 | #if (CONFIG_RTC == RTC_AS3514) |
diff --git a/firmware/export/config/samsungypr0.h b/firmware/export/config/samsungypr0.h index 970879772f..c1266f4732 100644 --- a/firmware/export/config/samsungypr0.h +++ b/firmware/export/config/samsungypr0.h | |||
@@ -5,16 +5,15 @@ | |||
5 | 5 | ||
6 | /* We don't run on hardware directly */ | 6 | /* We don't run on hardware directly */ |
7 | /* YP-R0 need it too of course */ | 7 | /* YP-R0 need it too of course */ |
8 | #ifndef SIMULATOR | ||
8 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) | 9 | #define CONFIG_PLATFORM (PLATFORM_HOSTED) |
10 | #endif | ||
9 | 11 | ||
10 | /* For Rolo and boot loader */ | 12 | /* For Rolo and boot loader */ |
11 | #define MODEL_NUMBER 100 | 13 | #define MODEL_NUMBER 100 |
12 | 14 | ||
13 | #define MODEL_NAME "Samsung YP-R0" | 15 | #define MODEL_NAME "Samsung YP-R0" |
14 | 16 | ||
15 | /*TODO: implement USB data transfer management -> see safe mode script and think a way to implemtent it in the code */ | ||
16 | #define USB_NONE | ||
17 | |||
18 | /* define this if you have a bitmap LCD display */ | 17 | /* define this if you have a bitmap LCD display */ |
19 | #define HAVE_LCD_BITMAP | 18 | #define HAVE_LCD_BITMAP |
20 | 19 | ||
@@ -90,6 +89,12 @@ | |||
90 | #define CONFIG_KEYPAD SAMSUNG_YPR0_PAD | 89 | #define CONFIG_KEYPAD SAMSUNG_YPR0_PAD |
91 | #define BUTTON_DRIVER_CLOSE | 90 | #define BUTTON_DRIVER_CLOSE |
92 | 91 | ||
92 | /** Non-simulator section **/ | ||
93 | #ifndef SIMULATOR | ||
94 | |||
95 | /*TODO: implement USB data transfer management -> see safe mode script and think a way to implemtent it in the code */ | ||
96 | #define USB_NONE | ||
97 | |||
93 | /* The YPR0 has a as3534 codec */ | 98 | /* The YPR0 has a as3534 codec */ |
94 | #define HAVE_AS3514 | 99 | #define HAVE_AS3514 |
95 | #define HAVE_AS3543 | 100 | #define HAVE_AS3543 |
@@ -109,6 +114,12 @@ | |||
109 | /* We have a GPIO pin that detects this */ | 114 | /* We have a GPIO pin that detects this */ |
110 | #define HAVE_HEADPHONE_DETECTION | 115 | #define HAVE_HEADPHONE_DETECTION |
111 | 116 | ||
117 | /* Define current usage levels. */ | ||
118 | #define CURRENT_NORMAL 24 /* ~25h, on 600mAh that's about 24mA */ | ||
119 | #define CURRENT_BACKLIGHT 62 /* ~6,5h -> 92mA. Minus 24mA normal that gives us 68mA */ | ||
120 | |||
121 | #endif /* SIMULATOR */ | ||
122 | |||
112 | /* FIXME | 123 | /* FIXME |
113 | * Lot of people reports bad battery life and funny charging times. | 124 | * Lot of people reports bad battery life and funny charging times. |
114 | * Check what's going on... | 125 | * Check what's going on... |
@@ -120,10 +131,6 @@ | |||
120 | #define BATTERY_CAPACITY_INC 0 /* capacity increment */ | 131 | #define BATTERY_CAPACITY_INC 0 /* capacity increment */ |
121 | #define BATTERY_TYPES_COUNT 1 /* only one type */ | 132 | #define BATTERY_TYPES_COUNT 1 /* only one type */ |
122 | 133 | ||
123 | /* Define current usage levels. */ | ||
124 | #define CURRENT_NORMAL 24 /* ~25h, on 600mAh that's about 24mA */ | ||
125 | #define CURRENT_BACKLIGHT 62 /* ~6,5h -> 92mA. Minus 24mA normal that gives us 68mA */ | ||
126 | |||
127 | #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE | 134 | #define CONFIG_BATTERY_MEASURE VOLTAGE_MEASURE |
128 | 135 | ||
129 | /* Linux controlls charging, we can monitor */ | 136 | /* Linux controlls charging, we can monitor */ |
diff --git a/firmware/target/hosted/sdl/sim-ui-defines.h b/firmware/target/hosted/sdl/sim-ui-defines.h index de250735e2..b238520aac 100644 --- a/firmware/target/hosted/sdl/sim-ui-defines.h +++ b/firmware/target/hosted/sdl/sim-ui-defines.h | |||
@@ -473,6 +473,13 @@ | |||
473 | #define UI_WIDTH LCD_WIDTH | 473 | #define UI_WIDTH LCD_WIDTH |
474 | #define UI_HEIGHT LCD_HEIGHT | 474 | #define UI_HEIGHT LCD_HEIGHT |
475 | 475 | ||
476 | #elif defined(SAMSUNG_YPR0) | ||
477 | #define UI_TITLE "Samsung YP-R0" | ||
478 | #define UI_WIDTH 313 /* width of GUI window */ | ||
479 | #define UI_HEIGHT 560 /* height of GUI window */ | ||
480 | #define UI_LCD_POSX 36 | ||
481 | #define UI_LCD_POSY 37 | ||
482 | |||
476 | #elif defined(SIMULATOR) | 483 | #elif defined(SIMULATOR) |
477 | #error no UI defines | 484 | #error no UI defines |
478 | #endif | 485 | #endif |