Cleanup the C200 keymap a bit, fixes the time settings screen for now.
[Rockbox.git] / firmware / export / config.h
blob40d1c168a399e1a3ec385e7a60f62e8e843ec1dc
1 /***************************************************************************
2 * __________ __ ___.
3 * Open \______ \ ____ ____ | | _\_ |__ _______ ___
4 * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
5 * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
6 * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
7 * \/ \/ \/ \/ \/
8 * $Id$
10 * Copyright (C) 2002 by Daniel Stenberg
12 * All files in this archive are subject to the GNU General Public License.
13 * See the file COPYING in the source tree root for full license agreement.
15 * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
16 * KIND, either express or implied.
18 ****************************************************************************/
20 #ifndef __CONFIG_H__
21 #define __CONFIG_H__
23 #ifndef __PCTOOL__
24 #include "autoconf.h"
25 #endif
27 /* symbolic names for multiple choice configurations: */
29 /* CONFIG_TUNER (note these are combineable bit-flags) */
30 #define S1A0903X01 0x01 /* Samsung */
31 #define TEA5767 0x02 /* Philips */
32 #define LV24020LP 0x04 /* Sanyo */
33 #define SI4700 0x08 /* Silicon Labs */
35 /* CONFIG_CODEC */
36 #define MAS3587F 3587
37 #define MAS3507D 3507
38 #define MAS3539F 3539
39 #define SWCODEC 1 /* if codec is done by SW */
41 /* CONFIG_CPU */
42 #define SH7034 7034
43 #define MCF5249 5249
44 #define MCF5250 5250
45 #define PP5002 5002
46 #define PP5020 5020
47 #define PP5022 5022
48 #define PP5024 5024
49 #define PNX0101 101
50 #define S3C2440 2440
51 #define TMS320DSC25 25
52 #define DM320 320
53 #define IMX31L 31
55 /* CONFIG_KEYPAD */
56 #define PLAYER_PAD 1
57 #define RECORDER_PAD 2
58 #define ONDIO_PAD 3
59 #define IRIVER_H100_PAD 4
60 #define IRIVER_H300_PAD 5
61 #define IAUDIO_X5M5_PAD 6
62 #define IPOD_4G_PAD 7
63 #define IPOD_3G_PAD 8
64 #define IPOD_1G2G_PAD 9
65 #define IRIVER_IFP7XX_PAD 10
66 #define GIGABEAT_PAD 11
67 #define IRIVER_H10_PAD 12
68 #define SANSA_E200_PAD 13
69 #define SANSA_C200_PAD 14
70 #define ELIO_TPJ1022_PAD 15
71 #define ARCHOS_AV300_PAD 16
72 #define MROBE500_PAD 17
73 #define GIGABEAT_S_PAD 18
75 /* CONFIG_REMOTE_KEYPAD */
76 #define H100_REMOTE 1
77 #define H300_REMOTE 2
78 #define X5_REMOTE 3
80 /* CONFIG_CHARGING */
81 #define CHARGING_SIMPLE 1 /* Simple, hardware controlled charging */
82 #define CHARGING_MONITOR 2 /* Hardware controlled charging with monitoring */
83 #define CHARGING_CONTROL 3 /* Software controlled charging */
85 /* CONFIG_LCD */
86 #define LCD_SSD1815 1 /* as used by Archos Recorders and Ondios */
87 #define LCD_SSD1801 2 /* as used by Archos Player/Studio */
88 #define LCD_S1D15E06 3 /* as used by iRiver H100 series */
89 #define LCD_H300 4 /* as used by iRiver H300 series, exact model name is
90 unknown at the time of this writing */
91 #define LCD_X5 5 /* as used by iAudio X5 series, exact model name is
92 unknown at the time of this writing */
93 #define LCD_IPODCOLOR 6 /* as used by iPod Color/Photo */
94 #define LCD_IPODNANO 7 /* as used by iPod Nano */
95 #define LCD_IPODVIDEO 8 /* as used by iPod Video */
96 #define LCD_IPOD2BPP 9 /* as used by all fullsize greyscale iPods */
97 #define LCD_IPODMINI 10 /* as used by iPod Mini g1/g2 */
98 #define LCD_IFP7XX 11 /* as used by iRiver iFP 7xx/8xx */
99 #define LCD_GIGABEAT 12
100 #define LCD_H10_20GB 13 /* as used by iriver H10 20Gb */
101 #define LCD_H10_5GB 14 /* as used by iriver H10 5Gb */
102 #define LCD_TPJ1022 15 /* as used by Tatung Elio TPJ-1022 */
103 #define LCD_DSC25 16 /* as used by Archos AV300 */
104 #define LCD_C200 17 /* as used by Sandisk Sansa c200 */
105 #define LCD_MROBE500 18 /* as used by Olympus M:Robe 500i */
107 /* LCD_PIXELFORMAT */
108 #define HORIZONTAL_PACKING 1
109 #define VERTICAL_PACKING 2
110 #define HORIZONTAL_INTERLEAVED 3
111 #define VERTICAL_INTERLEAVED 4
112 #define RGB565 565
113 #define RGB565SWAPPED 3553
115 /* CONFIG_I2C */
116 #define I2C_PLAYREC 1 /* Archos Player/Recorder style */
117 #define I2C_ONDIO 2 /* Ondio style */
118 #define I2C_COLDFIRE 3 /* Coldfire style */
119 #define I2C_PP5002 4 /* PP5002 style */
120 #define I2C_PP5020 5 /* PP5020 style */
121 #define I2C_PNX0101 6 /* PNX0101 style */
122 #define I2C_S3C2440 7
123 #define I2C_PP5024 8 /* PP5024 style */
124 #define I2C_IMX31L 9
126 /* CONFIG_LED */
127 #define LED_REAL 1 /* SW controlled LED (Archos recorders, player) */
128 #define LED_VIRTUAL 2 /* Virtual LED (icon) (Archos Ondio) */
129 /* else HW controlled LED (iRiver H1x0) */
131 /* CONFIG_FLASH */
132 #define FLASH_IFP7XX 1
134 /* CONFIG_RTC */
135 #define RTC_M41ST84W 1 /* Archos Recorder */
136 #define RTC_PCF50605 2 /* iPod 3G, 4G & Mini */
137 #define RTC_PCF50606 3 /* iriver H300 */
138 #define RTC_S3C2440 4
139 #define RTC_E8564 5 /* iriver H10 */
140 #define RTC_AS3514 6 /* Sandisk Sansa e200 series */
141 #define RTC_DS1339_DS3231 7 /* h1x0 RTC mod */
142 #define RTC_IMX31L 8
144 /* USB On-the-go */
145 #define USBOTG_ISP1362 1362 /* iriver H300 */
146 #define USBOTG_M5636 5636 /* iAudio X5 */
147 #define USBOTG_ARC 5020 /* PortalPlayer 502x */
149 /* Multiple cores */
150 #define CPU 0
151 #define COP 1
153 /* now go and pick yours */
154 #if defined(ARCHOS_PLAYER)
155 #include "config-player.h"
156 #elif defined(ARCHOS_RECORDER)
157 #include "config-recorder.h"
158 #elif defined(ARCHOS_FMRECORDER)
159 #include "config-fmrecorder.h"
160 #elif defined(ARCHOS_RECORDERV2)
161 #include "config-recorderv2.h"
162 #elif defined(ARCHOS_ONDIOSP)
163 #include "config-ondiosp.h"
164 #elif defined(ARCHOS_ONDIOFM)
165 #include "config-ondiofm.h"
166 #elif defined(ARCHOS_AV300)
167 #include "config-av300.h"
168 #elif defined(IRIVER_H100)
169 #include "config-h100.h"
170 #elif defined(IRIVER_H120)
171 #include "config-h120.h"
172 #elif defined(IRIVER_H300)
173 #include "config-h300.h"
174 #elif defined(IAUDIO_X5)
175 #include "config-iaudiox5.h"
176 #elif defined(IAUDIO_M5)
177 #include "config-iaudiom5.h"
178 #elif defined(IPOD_COLOR)
179 #include "config-ipodcolor.h"
180 #elif defined(IPOD_NANO)
181 #include "config-ipodnano.h"
182 #elif defined(IPOD_VIDEO)
183 #include "config-ipodvideo.h"
184 #elif defined(IPOD_1G2G)
185 #include "config-ipod1g2g.h"
186 #elif defined(IPOD_3G)
187 #include "config-ipod3g.h"
188 #elif defined(IPOD_4G)
189 #include "config-ipod4g.h"
190 #elif defined(IRIVER_IFP7XX)
191 #include "config-ifp7xx.h"
192 #elif defined(GIGABEAT_F)
193 #include "config-gigabeat.h"
194 #elif defined(GIGABEAT_S)
195 #include "config-gigabeat-s.h"
196 #elif defined(IPOD_MINI)
197 #include "config-ipodmini.h"
198 #elif defined(IPOD_MINI2G)
199 #include "config-ipodmini2g.h"
200 #elif defined(IRIVER_H10)
201 #include "config-h10.h"
202 #elif defined(IRIVER_H10_5GB)
203 #include "config-h10_5gb.h"
204 #elif defined(SANSA_E200)
205 #include "config-e200.h"
206 #elif defined(SANSA_C200)
207 #include "config-c200.h"
208 #elif defined(ELIO_TPJ1022)
209 #include "config-tpj1022.h"
210 #elif defined(MROBE_500)
211 #include "config-mrobe500.h"
212 #else
213 /* no known platform */
214 #endif
216 /* setup basic macros from capability masks */
217 #include "config_caps.h"
219 /* now set any CONFIG_ defines correctly if they are not used,
220 No need to do this on CONFIG_'s which are compulsary (e.g CONFIG_CODEC ) */
221 #ifndef CONFIG_TUNER
222 #define CONFIG_TUNER 0
223 #endif
225 #ifndef CONFIG_USBOTG
226 #define CONFIG_USBOTG 0
227 #endif
229 #ifndef CONFIG_LED
230 #define CONFIG_LED 0
231 #endif
233 #ifndef CONFIG_CHARGING
234 #define CONFIG_CHARGING 0
235 #endif
237 #ifndef CONFIG_RTC
238 #define CONFIG_RTC 0
239 #endif
241 /* define this in the target config.h to use a different size */
242 #ifndef CONFIG_DEFAULT_ICON_HEIGHT
243 #define CONFIG_DEFAULT_ICON_HEIGHT 8
244 #endif
245 #ifndef CONFIG_DEFAULT_ICON_WIDTH
246 #define CONFIG_DEFAULT_ICON_WIDTH 6
247 #endif
248 #ifndef CONFIG_REMOTE_DEFAULT_ICON_HEIGHT
249 #define CONFIG_REMOTE_DEFAULT_ICON_HEIGHT 8
250 #endif
251 #ifndef CONFIG_REMOTE_DEFAULT_ICON_WIDTH
252 #define CONFIG_REMOTE_DEFAULT_ICON_WIDTH 6
253 #endif
255 #if (CONFIG_TUNER & (CONFIG_TUNER - 1)) != 0
256 /* Multiple possible tuners */
257 #define CONFIG_TUNER_MULTI
258 #endif
260 #if defined(BOOTLOADER) && defined(HAVE_ADJUSTABLE_CPU_FREQ)
261 /* Bootloaders don't use CPU frequency adjustment */
262 #undef HAVE_ADJUSTABLE_CPU_FREQ
263 #endif
265 /* Enable the directory cache and tagcache in RAM if we have
266 * plenty of RAM. Both features can be enabled independently. */
267 #if ((defined(MEMORYSIZE) && (MEMORYSIZE > 8)) || MEM > 8) && \
268 !defined(BOOTLOADER) && !defined(SANSA_E200) && !defined(SANSA_C200)
269 #define HAVE_DIRCACHE
270 #ifdef HAVE_TAGCACHE
271 #define HAVE_TC_RAMCACHE
272 #endif
273 #endif
275 /* Add one HAVE_ define for all mas35xx targets */
276 #if (CONFIG_CODEC == MAS3587F) || (CONFIG_CODEC == MAS3507D) || (CONFIG_CODEC == MAS3539F)
277 #define HAVE_MAS35XX
278 #endif
280 #if CONFIG_CODEC == SWCODEC && !defined(BOOTLOADER)
281 #define HAVE_EXTENDED_MESSAGING_AND_NAME
282 #endif
284 #if (CONFIG_CODEC == SWCODEC) && !defined(SIMULATOR) && !defined(BOOTLOADER)
285 #define HAVE_PRIORITY_SCHEDULING
286 #define HAVE_SCHEDULER_BOOSTCTRL
287 #endif
289 /* define for all cpus from SH family */
290 #if (CONFIG_CPU == SH7034)
291 #define CPU_SH
292 #endif
294 /* define for all cpus from coldfire family */
295 #if (CONFIG_CPU == MCF5249) || (CONFIG_CPU == MCF5250)
296 #define CPU_COLDFIRE
297 #endif
299 /* define for all cpus from PP family */
300 #if (CONFIG_CPU == PP5002)
301 #define CPU_PP
302 #elif (CONFIG_CPU == PP5020) || (CONFIG_CPU == PP5022) || (CONFIG_CPU == PP5024)
303 #define CPU_PP
304 #define CPU_PP502x
305 #endif
307 /* define for all cpus from ARM family */
308 #if defined(CPU_PP) || (CONFIG_CPU == PNX0101) || (CONFIG_CPU == S3C2440) \
309 || (CONFIG_CPU == TMS320DSC25) || (CONFIG_CPU == DM320) \
310 || (CONFIG_CPU == IMX31L)
311 #define CPU_ARM
312 #endif
314 /* Determine if accesses should be strictly long aligned. */
315 #if (CONFIG_CPU == SH7034) || defined(CPU_ARM)
316 #define ROCKBOX_STRICT_ALIGN 1
317 #endif
319 #ifndef CODEC_SIZE
320 #define CODEC_SIZE 0
321 #endif
323 /* This attribute can be used to ensure that certain symbols are never profiled
324 * which can be important as profiling a function de-inlines it */
325 #ifdef RB_PROFILE
326 #define NO_PROF_ATTR __attribute__ ((no_instrument_function))
327 #else
328 #define NO_PROF_ATTR
329 #endif
331 /* IRAM usage */
332 #if !defined(SIMULATOR) && /* Not for simulators */ \
333 (((CONFIG_CPU == SH7034) && !defined(PLUGIN)) || /* SH1 archos: core only */ \
334 defined(CPU_COLDFIRE) || /* Coldfire: core, plugins, codecs */ \
335 defined(CPU_PP) || /* PortalPlayer: core, plugins, codecs */ \
336 (CONFIG_CPU == PNX0101))
337 #define ICODE_ATTR __attribute__ ((section(".icode")))
338 #define ICONST_ATTR __attribute__ ((section(".irodata")))
339 #define IDATA_ATTR __attribute__ ((section(".idata")))
340 #define IBSS_ATTR __attribute__ ((section(".ibss")))
341 #define USE_IRAM
342 #if CONFIG_CPU != SH7034
343 #define IRAM_STEAL
344 #endif
345 #if defined(CPU_ARM)
346 /* GCC quirk workaround: arm-elf-gcc treats static functions as short_call
347 * when not compiling with -ffunction-sections, even when the function has
348 * a section attribute. */
349 #define STATICIRAM
350 #else
351 #define STATICIRAM static
352 #endif
353 #else
354 #define ICODE_ATTR
355 #define ICONST_ATTR
356 #define IDATA_ATTR
357 #define IBSS_ATTR
358 #define STATICIRAM static
359 #endif
361 #ifndef IRAM_LCDFRAMEBUFFER
362 /* if the LCD framebuffer has not been moved to IRAM, define it empty here */
363 #define IRAM_LCDFRAMEBUFFER
364 #endif
366 /* Dual core support - not yet working on the 1G/2G and 3G iPod */
367 #if defined(CPU_PP) && CONFIG_CPU != PP5002
368 #define NUM_CORES 2
369 #define CURRENT_CORE current_core()
370 /* Hopefully at some point we will learn how to mark areas of main memory as
371 * not to be cached. Until then, use IRAM for variables shared across cores */
372 #define NOCACHEBSS_ATTR IBSS_ATTR
373 #define NOCACHEDATA_ATTR IDATA_ATTR
375 #define IF_COP(empty, x, y) , x, y
377 /* Defines for inter-core messaging */
378 #define COP_REBOOT 1
380 #else
381 #define NUM_CORES 1
382 #define CURRENT_CORE CPU
383 #define NOCACHEBSS_ATTR
384 #define NOCACHEDATA_ATTR
386 #define IF_COP(empty, x, y)
388 #endif /* Processor specific */
390 #endif