diff options
author | Nils Wallménius <nils@rockbox.org> | 2007-08-12 19:49:03 +0000 |
---|---|---|
committer | Nils Wallménius <nils@rockbox.org> | 2007-08-12 19:49:03 +0000 |
commit | f28da1a35a6403b153f93f66e3d96e485f89c363 (patch) | |
tree | 760d0c286a65042e18e2165ff555be0d40e80558 /uisimulator/common | |
parent | 90c40b7fea0275e212addf3ae6ac6979f5b4585b (diff) | |
download | rockbox-f28da1a35a6403b153f93f66e3d96e485f89c363.tar.gz rockbox-f28da1a35a6403b153f93f66e3d96e485f89c363.zip |
Enable a lot more features for simulators and add stubs where necessary, simulators should now work with identical lng and voice files as the respective target
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14299 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'uisimulator/common')
-rw-r--r-- | uisimulator/common/stubs.c | 104 |
1 files changed, 104 insertions, 0 deletions
diff --git a/uisimulator/common/stubs.c b/uisimulator/common/stubs.c index 5cc312a354..69daa515b0 100644 --- a/uisimulator/common/stubs.c +++ b/uisimulator/common/stubs.c | |||
@@ -44,11 +44,18 @@ int fat_startsector(void) | |||
44 | return 63; | 44 | return 63; |
45 | } | 45 | } |
46 | 46 | ||
47 | bool fat_ismounted(int volume) | ||
48 | { | ||
49 | (void)volume; | ||
50 | return true; | ||
51 | } | ||
52 | |||
47 | int ata_write_sectors(IF_MV2(int drive,) | 53 | int ata_write_sectors(IF_MV2(int drive,) |
48 | unsigned long start, | 54 | unsigned long start, |
49 | int count, | 55 | int count, |
50 | const void* buf) | 56 | const void* buf) |
51 | { | 57 | { |
58 | IF_MV((void)drive;) | ||
52 | int i; | 59 | int i; |
53 | 60 | ||
54 | for (i=0; i<count; i++ ) { | 61 | for (i=0; i<count; i++ ) { |
@@ -70,6 +77,7 @@ int ata_read_sectors(IF_MV2(int drive,) | |||
70 | int count, | 77 | int count, |
71 | void* buf) | 78 | void* buf) |
72 | { | 79 | { |
80 | IF_MV((void)drive;) | ||
73 | int i; | 81 | int i; |
74 | 82 | ||
75 | for (i=0; i<count; i++ ) { | 83 | for (i=0; i<count; i++ ) { |
@@ -105,6 +113,10 @@ void ata_spindown(int s) | |||
105 | (void)s; | 113 | (void)s; |
106 | } | 114 | } |
107 | 115 | ||
116 | void rtc_init(void) | ||
117 | { | ||
118 | } | ||
119 | |||
108 | int rtc_read(int address) | 120 | int rtc_read(int address) |
109 | { | 121 | { |
110 | return address ^ 0x55; | 122 | return address ^ 0x55; |
@@ -139,11 +151,103 @@ int rtc_write_datetime(unsigned char* buf) | |||
139 | return 0; | 151 | return 0; |
140 | } | 152 | } |
141 | 153 | ||
154 | #ifdef HAVE_RTC_ALARM | ||
155 | void rtc_get_alarm(int *h, int *m) | ||
156 | { | ||
157 | *h = 11; | ||
158 | *m = 55; | ||
159 | } | ||
160 | |||
161 | void rtc_set_alarm(int h, int m) | ||
162 | { | ||
163 | (void)h; | ||
164 | (void)m; | ||
165 | } | ||
166 | |||
167 | bool rtc_enable_alarm(bool enable) | ||
168 | { | ||
169 | return enable; | ||
170 | } | ||
171 | |||
172 | bool rtc_check_alarm_started(bool release_alarm) | ||
173 | { | ||
174 | return release_alarm; | ||
175 | } | ||
176 | |||
177 | bool rtc_check_alarm_flag(void) | ||
178 | { | ||
179 | return true; | ||
180 | } | ||
181 | #endif | ||
182 | |||
183 | #ifdef HAVE_HEADPHONE_DETECTION | ||
184 | bool headphones_inserted(void) | ||
185 | { | ||
186 | return true; | ||
187 | } | ||
188 | #endif | ||
189 | |||
190 | #ifdef HAVE_LCD_ENABLE | ||
191 | bool lcd_enabled(void) | ||
192 | { | ||
193 | return true; | ||
194 | } | ||
195 | #endif | ||
196 | |||
197 | bool charging_state(void) | ||
198 | { | ||
199 | return false; | ||
200 | } | ||
201 | |||
202 | bool charger_inserted(void) | ||
203 | { | ||
204 | return false; | ||
205 | } | ||
206 | |||
207 | #ifdef HAVE_SPDIF_POWER | ||
208 | void spdif_power_enable(bool on) | ||
209 | { | ||
210 | (void)on; | ||
211 | } | ||
212 | |||
213 | bool spdif_powered(void) | ||
214 | { | ||
215 | return false; | ||
216 | } | ||
217 | #endif | ||
218 | |||
142 | bool is_new_player(void) | 219 | bool is_new_player(void) |
143 | { | 220 | { |
144 | return having_new_lcd; | 221 | return having_new_lcd; |
145 | } | 222 | } |
146 | 223 | ||
224 | #ifdef HAVE_USB_POWER | ||
225 | bool usb_powered(void) | ||
226 | { | ||
227 | return false; | ||
228 | } | ||
229 | |||
230 | #if CONFIG_CHARGING | ||
231 | bool usb_charging_enable(bool on) | ||
232 | { | ||
233 | (void)on; | ||
234 | return false; | ||
235 | } | ||
236 | #endif | ||
237 | #endif | ||
238 | |||
239 | bool usb_inserted(void) | ||
240 | { | ||
241 | return false; | ||
242 | } | ||
243 | |||
244 | #ifdef HAVE_REMOTE_LCD_TICKING | ||
245 | void lcd_remote_emireduce(bool state) | ||
246 | { | ||
247 | (void)state; | ||
248 | } | ||
249 | #endif | ||
250 | |||
147 | void lcd_set_contrast( int x ) | 251 | void lcd_set_contrast( int x ) |
148 | { | 252 | { |
149 | (void)x; | 253 | (void)x; |