Change application selection in configure. Make android raaa compile.
[kugel-rb.git] / firmware / export / config.h
blobfe69ef4996884c38174802bceccf73f3fd9c261a
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation; either version 2
15 * of the License, or (at your option) any later version.
17 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
18 * KIND, either express or implied.
20 ****************************************************************************/
22 #ifndef __CONFIG_H__
23 #define __CONFIG_H__
25 #include "autoconf.h"
27 /* symbolic names for multiple choice configurations: */
29 /* CONFIG_STORAGE (note these are combineable bit-flags) */
30 #define STORAGE_ATA 0x01
31 #define STORAGE_MMC 0x02
32 #define STORAGE_SD 0x04
33 #define STORAGE_NAND 0x08
34 #define STORAGE_RAMDISK 0x10
36 /* CONFIG_TUNER (note these are combineable bit-flags) */
37 #define S1A0903X01 0x01 /* Samsung */
38 #define TEA5767 0x02 /* Philips */
39 #define LV24020LP 0x04 /* Sanyo */
40 #define SI4700 0x08 /* Silicon Labs */
41 #define TEA5760 0x10 /* Philips */
42 #define LV240000 0x20 /* Sanyo */
43 #define IPOD_REMOTE_TUNER 0x40 /* Apple */
44 #define RDA5802 0x80 /* RDA Microelectronics */
46 /* CONFIG_CODEC */
47 #define MAS3587F 3587
48 #define MAS3507D 3507
49 #define MAS3539F 3539
50 #define SWCODEC 1 /* if codec is done by SW */
52 /* CONFIG_CPU */
53 #define SH7034 7034
54 #define MCF5249 5249
55 #define MCF5250 5250
56 #define PP5002 5002
57 #define PP5020 5020
58 #define PP5022 5022
59 #define PP5024 5024
60 #define PP6100 6100
61 #define PNX0101 101
62 #define S3C2440 2440
63 #define DSC25 25
64 #define DM320 320
65 #define IMX31L 31
66 #define TCC770 770
67 #define TCC771L 771
68 #define TCC773L 773
69 #define TCC7801 7801
70 #define S5L8700 8700
71 #define S5L8701 8701
72 #define JZ4732 4732
73 #define AS3525 3525
74 #define AT91SAM9260 9260
75 #define AS3525v2 35252
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 #define PLATFORM_ANDROID (1<<2)
85 /* CONFIG_KEYPAD */
86 #define PLAYER_PAD 1
87 #define RECORDER_PAD 2
88 #define ONDIO_PAD 3
89 #define IRIVER_H100_PAD 4
90 #define IRIVER_H300_PAD 5
91 #define IAUDIO_X5M5_PAD 6
92 #define IPOD_4G_PAD 7
93 #define IPOD_3G_PAD 8
94 #define IPOD_1G2G_PAD 9
95 #define IRIVER_IFP7XX_PAD 10
96 #define GIGABEAT_PAD 11
97 #define IRIVER_H10_PAD 12
98 #define SANSA_E200_PAD 13
99 #define SANSA_C200_PAD 14
100 #define TATUNG_TPJ1022_PAD 15
101 #define ARCHOS_AV300_PAD 16
102 #define MROBE100_PAD 17
103 #define MROBE500_PAD 18
104 #define GIGABEAT_S_PAD 19
105 #define LOGIK_DAX_PAD 20
106 #define IAUDIO67_PAD 21
107 #define COWON_D2_PAD 22
108 #define IAUDIO_M3_PAD 23
109 #define CREATIVEZVM_PAD 24
110 #define SANSA_M200_PAD 25
111 #define CREATIVEZV_PAD 26
112 #define PHILIPS_SA9200_PAD 27
113 #define SANSA_C100_PAD 28
114 #define PHILIPS_HDD1630_PAD 29
115 #define MEIZU_M6SL_PAD 30
116 #define ONDAVX747_PAD 31
117 #define ONDAVX767_PAD 32
118 #define MEIZU_M6SP_PAD 33
119 #define MEIZU_M3_PAD 34
120 #define SANSA_CLIP_PAD 35
121 #define SANSA_FUZE_PAD 36
122 #define LYRE_PROTO1_PAD 37
123 #define SAMSUNG_YH_PAD 38
124 #define ONDAVX777_PAD 39
125 #define SAMSUNG_YPS3_PAD 40
126 #define MINI2440_PAD 41
127 #define PHILIPS_HDD6330_PAD 42
128 #define PBELL_VIBE500_PAD 43
129 #define MPIO_HD200_PAD 44
131 /* CONFIG_REMOTE_KEYPAD */
132 #define H100_REMOTE 1
133 #define H300_REMOTE 2
134 #define IAUDIO_REMOTE 3
135 #define MROBE_REMOTE 4
137 /* CONFIG_BACKLIGHT_FADING */
138 /* No fading capabilities at all (yet) */
139 #define BACKLIGHT_NO_FADING 0x0
140 /* Backlight fading is controlled using a hardware PWM mechanism */
141 #define BACKLIGHT_FADING_PWM 0x1
142 /* Backlight is controlled using a software implementation
143 * BACKLIGHT_FADING_SW_SETTING means that backlight is turned on by only setting
144 * the brightness (i.e. no real difference between backlight_on and
145 * backlight_set_brightness)
146 * BACKLIGHT_FADING_SW_HW_REG means that backlight brightness is restored
147 * "in hardware", from a hardware register upon backlight_on
148 * Both types need to have minor adjustments in the software fading code */
149 #define BACKLIGHT_FADING_SW_SETTING 0x2
150 #define BACKLIGHT_FADING_SW_HW_REG 0x4
151 /* Backlight fading is done in a target specific way
152 * for example in hardware, but not controllable*/
153 #define BACKLIGHT_FADING_TARGET 0x8
155 /* CONFIG_CHARGING */
157 /* Generic types */
158 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging
159 * (CPU cannot read charger state but may read
160 * when power is plugged-in). */
161 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring
162 * (CPU is able to read HW charging state and
163 * when power is plugged-in). */
165 /* Mostly target-specific code in the /target tree */
166 #define CHARGING_TARGET 3 /* Any algorithm - usually software controlled
167 * charging or specific programming is required to
168 * use the charging hardware. */
170 /* CONFIG_LCD */
171 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
172 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
173 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
174 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
175 unknown at the time of this writing */
176 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
177 unknown at the time of this writing */
178 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
179 #define LCD_IPODNANO 7 /* as used by iPod Nano */
180 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
181 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
182 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
183 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
184 #define LCD_GIGABEAT 12
185 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
186 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
187 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
188 #define LCD_DSC25 16 /* as used by Archos AV300 */
189 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
190 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
191 #define LCD_MROBE100 19 /* as used by Olympus M:Robe 100 */
192 #define LCD_LOGIKDAX 20 /* as used by Logik DAX - SSD1815 */
193 #define LCD_IAUDIO67 21 /* as used by iAudio 6/7 - unknown */
194 #define LCD_CREATIVEZVM 22 /* as used by Creative Zen Vision:M */
195 #define LCD_TL0350A 23 /* as used by the iAudio M3 remote, treated as main LCD */
196 #define LCD_COWOND2 24 /* as used by Cowon D2 - LTV250QV, TCC7801 driver */
197 #define LCD_SA9200 25 /* as used by the Philips SA9200 */
198 #define LCD_S6B33B2 26 /* as used by the Sansa c100 */
199 #define LCD_HDD1630 27 /* as used by the Philips HDD1630 */
200 #define LCD_MEIZUM6 28 /* as used by the Meizu M6SP and M6SL (various models) */
201 #define LCD_ONDAVX747 29 /* as used by the Onda VX747 */
202 #define LCD_ONDAVX767 30 /* as used by the Onda VX767 */
203 #define LCD_SSD1303 31 /* as used by the Sansa Clip */
204 #define LCD_FUZE 32 /* as used by the Sansa Fuze */
205 #define LCD_LYRE_PROTO1 33 /* as used by the Lyre prototype 1 */
206 #define LCD_YH925 34 /* as used by Samsung YH-925 (similar to the H10 20GB) */
207 #define LCD_VIEW 35 /* as used by the Sansa View */
208 #define LCD_NANO2G 36 /* as used by the iPod Nano 2nd Generation */
209 #define LCD_MINI2440 37 /* as used by the Mini2440 */
210 #define LCD_HDD6330 38 /* as used by the Philips HDD6330 */
211 #define LCD_VIBE500 39 /* as used by the Packard Bell Vibe 500 */
213 /* LCD_PIXELFORMAT */
214 #define HORIZONTAL_PACKING 1
215 #define VERTICAL_PACKING 2
216 #define HORIZONTAL_INTERLEAVED 3
217 #define VERTICAL_INTERLEAVED 4
218 #define RGB565 565
219 #define RGB565SWAPPED 3553
221 /* LCD_STRIDEFORMAT */
222 #define VERTICAL_STRIDE 1
223 #define HORIZONTAL_STRIDE 2
225 /* CONFIG_ORIENTATION */
226 #define SCREEN_PORTRAIT 0
227 #define SCREEN_LANDSCAPE 1
228 #define SCREEN_SQUARE 2
230 /* CONFIG_I2C */
231 #define I2C_NONE 0 /* For targets that do not use I2C - as the
232 Lyre prototype 1 */
233 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
234 #define I2C_ONDIO 2 /* Ondio style */
235 #define I2C_COLDFIRE 3 /* Coldfire style */
236 #define I2C_PP5002 4 /* PP5002 style */
237 #define I2C_PP5020 5 /* PP5020 style */
238 #define I2C_PNX0101 6 /* PNX0101 style */
239 #define I2C_S3C2440 7
240 #define I2C_PP5024 8 /* PP5024 style */
241 #define I2C_IMX31L 9
242 #define I2C_TCC77X 10
243 #define I2C_TCC780X 11
244 #define I2C_DM320 12 /* DM320 style */
245 #define I2C_S5L8700 13
246 #define I2C_JZ47XX 14 /* Ingenic Jz47XX style */
247 #define I2C_AS3525 15
249 /* CONFIG_LED */
250 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
251 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
252 /* else HW controlled LED (iRiver H1x0) */
254 /* CONFIG_NAND */
255 #define NAND_IFP7XX 1
256 #define NAND_TCC 2
257 #define NAND_SAMSUNG 3
258 #define NAND_CC 4 /* ChinaChip */
260 /* CONFIG_RTC */
261 #define RTC_M41ST84W 1 /* Archos Recorder */
262 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
263 #define RTC_PCF50606 3 /* iriver H300 */
264 #define RTC_S3C2440 4
265 #define RTC_E8564 5 /* iriver H10 */
266 #define RTC_AS3514 6 /* Sandisk Sansa series */
267 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
268 #define RTC_IMX31L 8
269 #define RTC_RX5X348AB 9
270 #define RTC_TCC77X 10
271 #define RTC_TCC780X 11
272 #define RTC_MR100 12
273 #define RTC_MC13783 13 /* Freescale MC13783 PMIC */
274 #define RTC_S5L8700 14
275 #define RTC_S35390A 15
276 #define RTC_JZ47XX 16 /* Ingenic Jz47XX */
277 #define RTC_NANO2G 17 /* This seems to be a PCF5063x */
278 #define RTC_D2 18 /* Either PCF50606 or PCF50635 */
280 /* USB On-the-go */
281 #define USBOTG_M66591 6591 /* M:Robe 500 */
282 #define USBOTG_ISP1362 1362 /* iriver H300 */
283 #define USBOTG_ISP1583 1583 /* Creative Zen Vision:M */
284 #define USBOTG_M5636 5636 /* iAudio X5 */
285 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
286 #define USBOTG_JZ4740 4740 /* Ingenic Jz4740/Jz4732 */
287 #define USBOTG_AS3525 3525 /* AMS AS3525 */
288 #define USBOTG_AS3525v2 3535 /* AMS AS3525v2 */
289 #define USBOTG_S3C6400X 6400 /* Samsung S3C6400X, also used in the S5L8701 */
291 /* Multiple cores */
292 #define CPU 0
293 #define COP 1
295 /* now go and pick yours */
296 #if defined(ARCHOS_PLAYER)
297 #include "config/archosplayer.h"
298 #elif defined(ARCHOS_RECORDER)
299 #include "config/archosrecorder.h"
300 #elif defined(ARCHOS_FMRECORDER)
301 #include "config/archosfmrecorder.h"
302 #elif defined(ARCHOS_RECORDERV2)
303 #include "config/archosrecorderv2.h"
304 #elif defined(ARCHOS_ONDIOSP)
305 #include "config/archosondiosp.h"
306 #elif defined(ARCHOS_ONDIOFM)
307 #include "config/archosondiofm.h"
308 #elif defined(ARCHOS_AV300)
309 #include "config/archosav300.h"
310 #elif defined(IRIVER_H100)
311 #include "config/iriverh100.h"
312 #elif defined(IRIVER_H120)
313 #include "config/iriverh120.h"
314 #elif defined(IRIVER_H300)
315 #include "config/iriverh300.h"
316 #elif defined(IAUDIO_X5)
317 #include "config/iaudiox5.h"
318 #elif defined(IAUDIO_M5)
319 #include "config/iaudiom5.h"
320 #elif defined(IAUDIO_M3)
321 #include "config/iaudiom3.h"
322 #elif defined(IPOD_COLOR)
323 #include "config/ipodcolor.h"
324 #elif defined(IPOD_NANO)
325 #include "config/ipodnano1g.h"
326 #elif defined(IPOD_VIDEO)
327 #include "config/ipodvideo.h"
328 #elif defined(IPOD_1G2G)
329 #include "config/ipod1g2g.h"
330 #elif defined(IPOD_3G)
331 #include "config/ipod3g.h"
332 #elif defined(IPOD_4G)
333 #include "config/ipod4g.h"
334 #elif defined(IPOD_NANO2G)
335 #include "config/ipodnano2g.h"
336 #elif defined(IRIVER_IFP7XX)
337 #include "config/iriverifp7xx.h"
338 #elif defined(GIGABEAT_F)
339 #include "config/gigabeatfx.h"
340 #elif defined(GIGABEAT_S)
341 #include "config/gigabeats.h"
342 #elif defined(IPOD_MINI)
343 #include "config/ipodmini1g.h"
344 #elif defined(IPOD_MINI2G)
345 #include "config/ipodmini2g.h"
346 #elif defined(IRIVER_H10)
347 #include "config/iriverh10.h"
348 #elif defined(IRIVER_H10_5GB)
349 #include "config/iriverh10_5gb.h"
350 #elif defined(SANSA_E200)
351 #include "config/sansae200.h"
352 #elif defined(SANSA_C200)
353 #include "config/sansac200.h"
354 #elif defined(SANSA_M200)
355 #include "config/sansam200.h"
356 #elif defined(TATUNG_TPJ1022)
357 #include "config/tatungtpj1022.h"
358 #elif defined(MROBE_100)
359 #include "config/mrobe100.h"
360 #elif defined(MROBE_500)
361 #include "config/mrobe500.h"
362 #elif defined(LOGIK_DAX)
363 #include "config/logikdax.h"
364 #elif defined(IAUDIO_7)
365 #include "config/iaudio7.h"
366 #elif defined(COWON_D2)
367 #include "config/cowond2.h"
368 #elif defined(CREATIVE_ZVM)
369 #include "config/zenvisionm30gb.h"
370 #elif defined(CREATIVE_ZVM60GB)
371 #include "config/zenvisionm60gb.h"
372 #elif defined(CREATIVE_ZV)
373 #include "config/zenvision.h"
374 #elif defined(PHILIPS_SA9200)
375 #include "config/gogearsa9200.h"
376 #elif defined(PHILIPS_HDD1630)
377 #include "config/gogearhdd1630.h"
378 #elif defined(PHILIPS_HDD6330)
379 #include "config/gogearhdd6330.h"
380 #elif defined(SANSA_C100)
381 #include "config/sansac100.h"
382 #elif defined(MEIZU_M6SL)
383 #include "config/meizum6sl.h"
384 #elif defined(MEIZU_M6SP)
385 #include "config/meizum6sp.h"
386 #elif defined(MEIZU_M3)
387 #include "config/meizum3.h"
388 #elif defined(ONDA_VX747) || defined(ONDA_VX747P)
389 #include "config/ondavx747.h"
390 #elif defined(ONDA_VX777)
391 #include "config/ondavx777.h"
392 #elif defined(ONDA_VX767)
393 #include "config/ondavx767.h"
394 #elif defined(SANSA_CLIP)
395 #include "config/sansaclip.h"
396 #elif defined(SANSA_CLIPV2)
397 #include "config/sansaclipv2.h"
398 #elif defined(SANSA_CLIPPLUS)
399 #include "config/sansaclipplus.h"
400 #elif defined(SANSA_E200V2)
401 #include "config/sansae200v2.h"
402 #elif defined(SANSA_M200V4)
403 #include "config/sansam200v4.h"
404 #elif defined(SANSA_FUZE)
405 #include "config/sansafuze.h"
406 #elif defined(SANSA_FUZEV2)
407 #include "config/sansafuzev2.h"
408 #elif defined(SANSA_C200V2)
409 #include "config/sansac200v2.h"
410 #elif defined(SANSA_VIEW)
411 #include "config/sansaview.h"
412 #elif defined(LYRE_PROTO1)
413 #include "config/lyreproto1.h"
414 #elif defined(MINI2440)
415 #include "config/mini2440.h"
416 #elif defined(SAMSUNG_YH820)
417 #include "config/samsungyh820.h"
418 #elif defined(SAMSUNG_YH920)
419 #include "config/samsungyh920.h"
420 #elif defined(SAMSUNG_YH925)
421 #include "config/samsungyh925.h"
422 #elif defined(SAMSUNG_YPS3)
423 #include "config/samsungyps3.h"
424 #elif defined(PBELL_VIBE500)
425 #include "config/vibe500.h"
426 #elif defined(MPIO_HD200)
427 #include "config/mpiohd200.h"
429 #elif defined(APPLICATION)
430 #include "config/application.h"
431 #else
432 /* no known platform */
433 #endif
435 /* keep this include after the target configs */
436 #ifdef SIMULATOR
437 #include "config/sim.h"
438 #endif
440 /* setup basic macros from capability masks */
441 #include "config_caps.h"
443 /* setup CPU-specific defines */
445 /* define for all cpus from SH family */
446 #if (CONFIG_CPU == SH7034)
447 #define CPU_SH
448 #endif
450 /* define for all cpus from coldfire family */
451 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
452 #define CPU_COLDFIRE
453 #endif
455 /* define for all cpus from PP family */
456 #if (CONFIG_CPU == PP5002)
457 #define CPU_PP
458 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) \
459 || (CONFIG_CPU == PP5024) || (CONFIG_CPU == PP6100)
460 #define CPU_PP
461 #define CPU_PP502x
462 #endif
464 /* define for all cpus from S5L870X family */
465 #if (CONFIG_CPU == S5L8700) || (CONFIG_CPU == S5L8701)
466 #define CPU_S5L870X
467 #endif
469 /* define for all cpus from TCC77X family */
470 #if (CONFIG_CPU == TCC771L) || (CONFIG_CPU == TCC773L) || (CONFIG_CPU == TCC770)
471 #define CPU_TCC77X
472 #endif
474 /* define for all cpus from TCC780 family */
475 #if (CONFIG_CPU == TCC7801)
476 #define CPU_TCC780X
477 #endif
479 /* define for all cpus from ARM7TDMI family (for specific optimisations) */
480 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == DSC25)
481 #define CPU_ARM7TDMI
482 #endif
484 /* define for all cpus from ARM family */
485 #if (CONFIG_CPU == IMX31L)
486 #define CPU_ARM
487 #define ARM_ARCH 6 /* ARMv6 */
489 #elif defined(CPU_TCC77X) || defined(CPU_TCC780X) || (CONFIG_CPU == DM320) \
490 || (CONFIG_CPU == AT91SAM9260) || (CONFIG_CPU == AS3525v2)
491 #define CPU_ARM
492 #define ARM_ARCH 5 /* ARMv5 */
494 #elif defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
495 || (CONFIG_CPU == DSC25) || defined(CPU_S5L870X) || (CONFIG_CPU == AS3525)
496 #define CPU_ARM
497 #define ARM_ARCH 4 /* ARMv4 */
498 #endif
500 #if (CONFIG_CPU == JZ4732)
501 #define CPU_MIPS 32
502 #endif
504 /* now set any CONFIG_ defines correctly if they are not used,
505 No need to do this on CONFIG_'s which are compulsory (e.g CONFIG_CODEC ) */
507 #if !defined(CONFIG_BACKLIGHT_FADING)
508 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
509 #endif
511 #ifndef CONFIG_PLATFORM
512 #define CONFIG_PLATFORM PLATFORM_NATIVE
513 #endif
515 #ifndef CONFIG_TUNER
516 #define CONFIG_TUNER 0
517 #endif
519 #ifndef CONFIG_USBOTG
520 #define CONFIG_USBOTG 0
521 #endif
523 #ifndef CONFIG_LED
524 #define CONFIG_LED LED_VIRTUAL
525 #endif
527 #ifndef CONFIG_CHARGING
528 #define CONFIG_CHARGING 0
529 #endif
531 #ifndef CONFIG_RTC
532 #define CONFIG_RTC 0
533 #endif
535 #ifndef CONFIG_ORIENTATION
536 #if LCD_HEIGHT > LCD_WIDTH
537 #define CONFIG_ORIENTATION SCREEN_PORTRAIT
538 #elif LCD_HEIGHT < LCD_WIDTH
539 #define CONFIG_ORIENTATION SCREEN_LANDSCAPE
540 #else
541 #define CONFIG_ORIENTATION SCREEN_SQUARE
542 #endif
543 #endif
545 /* Pixel aspect ratio is defined in terms of a multiplier for pixel width and
546 * height, and is set to 1:1 if the target does not set a value
548 #ifndef LCD_PIXEL_ASPECT_HEIGHT
549 #define LCD_PIXEL_ASPECT_HEIGHT 1
550 #endif
551 #ifndef LCD_PIXEL_ASPECT_WIDTH
552 #define LCD_PIXEL_ASPECT_WIDTH 1
553 #endif
555 /* Used for split displays (Sansa Clip). Set to 0 otherwise */
556 #ifndef LCD_SPLIT_LINES
557 #define LCD_SPLIT_LINES 0
558 #endif
560 /* Simulator LCD dimensions. Set to standard dimensions if undefined */
561 #ifndef SIM_LCD_WIDTH
562 #define SIM_LCD_WIDTH LCD_WIDTH
563 #endif
564 #ifndef SIM_LCD_HEIGHT
565 #define SIM_LCD_HEIGHT (LCD_HEIGHT + LCD_SPLIT_LINES)
566 #endif
568 #ifdef HAVE_REMOTE_LCD
569 #ifndef SIM_REMOTE_WIDTH
570 #define SIM_REMOTE_WIDTH LCD_REMOTE_WIDTH
571 #endif
572 #ifndef SIM_REMOTE_HEIGHT
573 #define SIM_REMOTE_HEIGHT LCD_REMOTE_HEIGHT
574 #endif
575 #endif /* HAVE_REMOTE_LCD */
577 /* define this in the target config.h to use a different size */
578 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
579 #define CONFIG_DEFAULT_ICON_HEIGHT 8
580 #endif
581 #ifndef CONFIG_DEFAULT_ICON_WIDTH
582 #define CONFIG_DEFAULT_ICON_WIDTH 6
583 #endif
584 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
585 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
586 #endif
587 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
588 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
589 #endif
591 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
592 /* Multiple possible tuners */
593 #define CONFIG_TUNER_MULTI
594 #endif
596 /* deactivate fading in bootloader */
597 #if defined(BOOTLOADER)
598 #undef CONFIG_BACKLIGHT_FADING
599 #define CONFIG_BACKLIGHT_FADING BACKLIGHT_NO_FADING
600 #endif
602 /* determine which setting/manual text to use */
603 #if (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_PWM)
605 /* possibly overridden in target config */
606 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
607 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
608 #define HAVE_BACKLIGHT_FADING_INT_SETTING
609 #endif
611 #elif (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_SETTING) \
612 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_SW_HW_REG) \
613 || (CONFIG_BACKLIGHT_FADING == BACKLIGHT_FADING_TARGET)
615 /* possibly overridden in target config */
616 #if !defined(HAVE_BACKLIGHT_FADING_BOOL_SETTING) \
617 && !defined(HAVE_BACKLIGHT_FADING_INT_SETTING)
618 #define HAVE_BACKLIGHT_FADING_BOOL_SETTING
619 #endif
621 #endif /* CONFIG_BACKLIGHT_FADING */
623 /* Storage related config handling */
625 #if (CONFIG_STORAGE & (CONFIG_STORAGE - 1)) != 0
626 /* Multiple storage drivers */
627 #define CONFIG_STORAGE_MULTI
628 #endif
630 /* Explicit HAVE_MULTIVOLUME in the config file. Allow the maximum number */
631 #ifdef HAVE_MULTIVOLUME
632 #define NUM_VOLUMES_PER_DRIVE 4
633 #else
634 #define NUM_VOLUMES_PER_DRIVE 1
635 #endif
636 #if defined(CONFIG_STORAGE_MULTI) && !defined(HAVE_MULTIDRIVE)
637 #define HAVE_MULTIDRIVE
638 #endif
640 #if defined(HAVE_MULTIDRIVE) && !defined(HAVE_MULTIVOLUME)
641 #define HAVE_MULTIVOLUME
642 #endif
644 #if defined(HAVE_MULTIDRIVE) && !defined(NUM_DRIVES)
645 #error HAVE_MULTIDRIVE needs to have an explicit NUM_DRIVES
646 #endif
648 #ifndef NUM_DRIVES
649 #define NUM_DRIVES 1
650 #endif
652 #define NUM_VOLUMES (NUM_DRIVES * NUM_VOLUMES_PER_DRIVE)
654 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
655 /* Bootloaders don't use CPU frequency adjustment */
656 #undef HAVE_ADJUSTABLE_CPU_FREQ
657 #endif
659 /* Enable the directory cache and tagcache in RAM if we have
660 * plenty of RAM. Both features can be enabled independently. */
661 #if ((defined(MEMORYSIZE) && (MEMORYSIZE >= 8)) || MEM >= 8) && \
662 !defined(BOOTLOADER) && !defined(__PCTOOL__)
663 #define HAVE_DIRCACHE
664 #ifdef HAVE_TAGCACHE
665 #define HAVE_TC_RAMCACHE
666 #endif
667 #endif
669 #if defined(HAVE_TAGCACHE) && defined(HAVE_LCD_BITMAP)
670 #define HAVE_PICTUREFLOW_INTEGRATION
671 #endif
673 /* Add one HAVE_ define for all mas35xx targets */
674 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
675 #define HAVE_MAS35XX
676 #endif
678 #if (CONFIG_CODEC == SWCODEC)
679 #ifdef BOOTLOADER
681 #if CONFIG_CPU == IMX31L
682 /* Priority in bootloader is wanted */
683 #define HAVE_PRIORITY_SCHEDULING
684 #define USB_STATUS_BY_EVENT
685 #define USB_DETECT_BY_DRV
686 #endif
688 #else /* !BOOTLOADER */
690 #define HAVE_EXTENDED_MESSAGING_AND_NAME
691 #define HAVE_WAKEUP_EXT_CB
693 #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
694 #define HAVE_PRIORITY_SCHEDULING
695 #define HAVE_SCHEDULER_BOOSTCTRL
696 #endif /* PLATFORM_NATIVE */
698 #define HAVE_SEMAPHORE_OBJECTS
700 #if defined(HAVE_USBSTACK) && CONFIG_USBOTG == USBOTG_ARC
701 #define USB_STATUS_BY_EVENT
702 #define USB_DETECT_BY_DRV
703 #if CONFIG_CPU != IMX31L
704 #define INCLUDE_TIMEOUT_API
705 #endif
706 #endif /* HAVE_USBSTACK */
709 #endif /* BOOTLOADER */
711 #if defined(HAVE_USBSTACK) || (CONFIG_CPU == JZ4732) \
712 || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) \
713 || defined(CPU_S5L870X) || (CONFIG_CPU == S3C2440)
714 #define HAVE_WAKEUP_OBJECTS
715 #endif
717 /*include support for crossfading - requires significant PCM buffer space*/
718 #if MEMORYSIZE > 2
719 #define HAVE_CROSSFADE
720 #endif
722 #endif /* (CONFIG_CODEC == SWCODEC) */
724 /* Determine if accesses should be strictly long aligned. */
725 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM) || defined(CPU_MIPS)
726 #define ROCKBOX_STRICT_ALIGN 1
727 #endif
729 #if defined(CPU_ARM) && defined(__ASSEMBLER__)
730 /* ARMv4T doesn't switch the T bit when popping pc directly, we must use BX */
731 .macro ldmpc cond="", order="ia", regs
732 #if ARM_ARCH == 4 && defined(USE_THUMB)
733 ldm\cond\order sp!, { \regs, lr }
734 bx\cond lr
735 #else
736 ldm\cond\order sp!, { \regs, pc }
737 #endif
738 .endm
739 .macro ldrpc cond=""
740 #if ARM_ARCH == 4 && defined(USE_THUMB)
741 ldr\cond lr, [sp], #4
742 bx\cond lr
743 #else
744 ldr\cond pc, [sp], #4
745 #endif
746 .endm
747 #endif
749 #ifndef CODEC_SIZE
750 #define CODEC_SIZE 0
751 #endif
753 /* This attribute can be used to ensure that certain symbols are never profiled
754 * which can be important as profiling a function de-inlines it */
755 #ifdef RB_PROFILE
756 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
757 #else
758 #define NO_PROF_ATTR
759 #endif
761 /* IRAM usage */
762 #if (CONFIG_PLATFORM & PLATFORM_NATIVE) && /* Not for hosted environments */ \
763 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
764 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
765 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
766 (CONFIG_CPU == AS3525 && MEMORYSIZE > 2 && !defined(BOOTLOADER)) || /* AS3525 +2MB: core, plugins, codecs */ \
767 (CONFIG_CPU == AS3525 && MEMORYSIZE <= 2 && !defined(PLUGIN) && !defined(CODEC) && !defined(BOOTLOADER)) || /* AS3525 2MB: core only */ \
768 (CONFIG_CPU == AS3525v2 && !defined(PLUGIN) && !defined(CODEC) && !defined(BOOTLOADER)) || /* AS3525v2: core only */ \
769 (CONFIG_CPU == PNX0101) || \
770 (CONFIG_CPU == TCC7801) || \
771 defined(CPU_S5L870X)) || /* Samsung S5L8700: core, plugins, codecs */ \
772 (CONFIG_CPU == JZ4732 && !defined(PLUGIN) && !defined(CODEC)) /* Jz4740: core only */
773 #define ICODE_ATTR __attribute__ ((section(".icode")))
774 #define ICONST_ATTR __attribute__ ((section(".irodata")))
775 #define IDATA_ATTR __attribute__ ((section(".idata")))
776 #define IBSS_ATTR __attribute__ ((section(".ibss")))
777 #define USE_IRAM
778 #if CONFIG_CPU != SH7034 && (CONFIG_CPU != AS3525 || MEMORYSIZE > 2) \
779 && CONFIG_CPU != JZ4732 && CONFIG_CPU != AS3525v2
780 #define PLUGIN_USE_IRAM
781 #endif
782 #if defined(CPU_ARM) && !defined(__ARM_EABI__)
783 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
784 * when not compiling with -ffunction-sections, even when the function has
785 * a section attribute.
786 * This is fixed with eabi since all calls are short ones by default */
787 #define STATICIRAM
788 #else
789 #define STATICIRAM static
790 #endif
791 #else
792 #define ICODE_ATTR
793 #define ICONST_ATTR
794 #define IDATA_ATTR
795 #define IBSS_ATTR
796 #define STATICIRAM static
797 #endif
799 #if (defined(CPU_PP) || (CONFIG_CPU == AS3525) || (CONFIG_CPU == AS3525v2) || \
800 (CONFIG_CPU == IMX31L)) \
801 && (CONFIG_PLATFORM & PLATFORM_NATIVE) && !defined(BOOTLOADER)
802 /* Functions that have INIT_ATTR attached are NOT guaranteed to survive after
803 * root_menu() has been called. Their code may be overwritten by other data or
804 * code in order to save RAM, and references to them might point into
805 * zombie area.
807 * It is critical that you make sure these functions are only called before
808 * the final call to root_menu() (see apps/main.c) is called (i.e. basically
809 * only while main() runs), otherwise things may go wild,
810 * from crashes to freezes to exploding daps.
812 #define INIT_ATTR __attribute__ ((section(".init")))
813 #define HAVE_INIT_ATTR
814 #else
815 #define INIT_ATTR
816 #endif
818 #if (CONFIG_PLATFORM & PLATFORM_HOSTED) && defined(__APPLE__)
819 #define DATA_ATTR __attribute__ ((section("__DATA, .data")))
820 #else
821 #define DATA_ATTR __attribute__ ((section(".data")))
822 #endif
824 #ifndef IRAM_LCDFRAMEBUFFER
825 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
826 #define IRAM_LCDFRAMEBUFFER
827 #endif
829 /* Change this if you want to build a single-core firmware for a multicore
830 * target for debugging */
831 #if defined(BOOTLOADER) || (CONFIG_CPU == PP6100)
832 #define FORCE_SINGLE_CORE
833 #endif
835 #if defined(CPU_PP)
836 #define IDLE_STACK_SIZE 0x80
837 #define IDLE_STACK_WORDS 0x20
839 /* Attributes to place data in uncached DRAM */
840 /* These are useful beyond dual-core and ultimately beyond PP since they may
841 * be used for DMA buffers and such without cache maintenence calls. */
842 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
843 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
845 #if !defined(FORCE_SINGLE_CORE)
847 #define NUM_CORES 2
848 #define HAVE_CORELOCK_OBJECT
849 #define CURRENT_CORE current_core()
850 /* Attributes for core-shared data in DRAM where IRAM is better used for other
851 * purposes. */
852 #define SHAREDBSS_ATTR NOCACHEBSS_ATTR
853 #define SHAREDDATA_ATTR NOCACHEDATA_ATTR
855 #define IF_COP(...) __VA_ARGS__
856 #define IF_COP_VOID(...) __VA_ARGS__
857 #define IF_COP_CORE(core) core
859 #endif /* !defined(FORCE_SINGLE_CORE) */
861 #endif /* CPU_PP */
863 #if CONFIG_CPU == IMX31L
864 #define NOCACHEBSS_ATTR __attribute__((section(".ncbss"),nocommon))
865 #define NOCACHEDATA_ATTR __attribute__((section(".ncdata"),nocommon))
866 #endif
868 #ifndef NUM_CORES
869 /* Default to single core */
870 #define NUM_CORES 1
871 #define CURRENT_CORE CPU
872 /* Attributes for core-shared data in DRAM - no caching considerations */
873 #define SHAREDBSS_ATTR
874 #define SHAREDDATA_ATTR
875 #ifndef NOCACHEBSS_ATTR
876 #define NOCACHEBSS_ATTR
877 #define NOCACHEDATA_ATTR
878 #endif
880 #define IF_COP(...)
881 #define IF_COP_VOID(...) void
882 #define IF_COP_CORE(core) CURRENT_CORE
884 #endif /* NUM_CORES */
886 #ifdef HAVE_HEADPHONE_DETECTION
887 /* Timeout objects required if headphone detection is enabled */
888 #ifndef INCLUDE_TIMEOUT_API
889 #define INCLUDE_TIMEOUT_API
890 #endif
891 #endif /* HAVE_HEADPHONE_DETECTION */
893 #if defined(HAVE_USB_CHARGING_ENABLE) && defined(HAVE_USBSTACK)
894 /* USB charging support in the USB stack requires timeout objects */
895 #ifndef INCLUDE_TIMEOUT_API
896 #define INCLUDE_TIMEOUT_API
897 #endif
898 #endif /* HAVE_USB_CHARGING_ENABLE && HAVE_USBSTACK */
900 #if defined(HAVE_USBSTACK) || (CONFIG_STORAGE & STORAGE_NAND)
901 #define STORAGE_GET_INFO
902 #endif
904 #ifdef CPU_MIPS
905 #include <stdbool.h> /* MIPS GCC fix? */
906 #endif
908 #if defined(HAVE_USBSTACK)
909 /* Define the implemented USB transport classes */
910 #if CONFIG_USBOTG == USBOTG_ISP1583
911 #define USB_HAS_BULK
912 #elif (CONFIG_USBOTG == USBOTG_ARC) || \
913 (CONFIG_USBOTG == USBOTG_JZ4740) || \
914 (CONFIG_USBOTG == USBOTG_M66591) || \
915 (CONFIG_USBOTG == USBOTG_AS3525)
916 #define USB_HAS_BULK
917 #define USB_HAS_INTERRUPT
918 #elif defined(CPU_TCC780X) || defined(CPU_TCC77X)
919 #define USB_HAS_BULK
920 #elif CONFIG_USBOTG == USBOTG_S3C6400X
921 #define USB_HAS_BULK
922 //#define USB_HAS_INTERRUPT -- seems to be broken
923 #endif /* CONFIG_USBOTG */
925 #if (CONFIG_USBOTG == USBOTG_ARC) || \
926 (CONFIG_USBOTG == USBOTG_AS3525)
927 #define USB_HAS_ISOCHRONOUS
928 #endif
930 /* define the class drivers to enable */
931 #ifdef BOOTLOADER
933 /* enable usb storage for targets that do bootloader usb */
934 #if (defined(TOSHIBA_GIGABEAT_S) || \
935 (defined(CREATIVE_ZVx) || \
936 defined(CPU_TCC77X) || defined(CPU_TCC780X))) || \
937 (CONFIG_USBOTG == USBOTG_JZ4740) || defined(IPOD_NANO2G) || \
938 CONFIG_USBOTG == USBOTG_AS3525
939 #define USB_ENABLE_STORAGE
940 #endif
942 #else /* BOOTLOADER */
944 #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
945 //#define USB_ENABLE_SERIAL
946 #define USB_ENABLE_STORAGE
948 #ifdef USB_HAS_INTERRUPT
949 #define USB_ENABLE_HID
950 #else
951 #define USB_ENABLE_CHARGING_ONLY
952 #endif
953 #endif
955 #endif /* BOOTLOADER */
957 #endif /* HAVE_USBSTACK */
959 /* This attribute can be used to enable to detection of plugin file handles leaks.
960 * When enabled, the plugin core will monitor open/close/creat and when the plugin exits
961 * will display an error message if the plugin leaked some file handles */
962 #if (CONFIG_PLATFORM & PLATFORM_NATIVE)
963 #define HAVE_PLUGIN_CHECK_OPEN_CLOSE
964 #endif
966 #if defined(HAVE_DIRCACHE) && (CONFIG_PLATFORM & PLATFORM_NATIVE)
967 #define HAVE_IO_PRIORITY
968 #endif
970 #endif /* __CONFIG_H__ */