diff options
author | Thomas Jarosch <tomj@simonv.com> | 2011-02-27 23:42:37 +0000 |
---|---|---|
committer | Thomas Jarosch <tomj@simonv.com> | 2011-02-27 23:42:37 +0000 |
commit | 6e9e6a7571275f1942630e0383d3fdf912178c8d (patch) | |
tree | 74545da1553abed88ef536f0281ab1acbee96576 /firmware | |
parent | 87f7dcf38ed521fcea5561e2a0b7954617f96e66 (diff) | |
download | rockbox-6e9e6a7571275f1942630e0383d3fdf912178c8d.tar.gz rockbox-6e9e6a7571275f1942630e0383d3fdf912178c8d.zip |
RaaA: Add initial Pandora support
More information: www.openpandora.org
Possible things to implement:
- Special button mappings
- Battery monitoring
- ALSA audio backend
- Automate creation of "pnd" (=binary) file
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@29451 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/common/filefuncs.c | 2 | ||||
-rw-r--r-- | firmware/common/rbpaths.c | 2 | ||||
-rw-r--r-- | firmware/export/config.h | 6 | ||||
-rw-r--r-- | firmware/export/config/pandora.h | 96 | ||||
-rw-r--r-- | firmware/export/debug.h | 2 | ||||
-rw-r--r-- | firmware/include/dir_uncached.h | 2 | ||||
-rw-r--r-- | firmware/include/file.h | 2 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/app/button-application.c | 2 | ||||
-rw-r--r-- | firmware/target/hosted/sdl/system-sdl.c | 4 |
9 files changed, 109 insertions, 9 deletions
diff --git a/firmware/common/filefuncs.c b/firmware/common/filefuncs.c index 3811f06ec9..6eb2bafa40 100644 --- a/firmware/common/filefuncs.c +++ b/firmware/common/filefuncs.c | |||
@@ -91,7 +91,7 @@ bool dir_exists(const char *path) | |||
91 | 91 | ||
92 | #endif /* __PCTOOL__ */ | 92 | #endif /* __PCTOOL__ */ |
93 | 93 | ||
94 | #if (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_SDL|PLATFORM_MAEMO)) | 94 | #if (CONFIG_PLATFORM & (PLATFORM_NATIVE|PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) |
95 | struct dirinfo dir_get_info(DIR* parent, struct dirent *entry) | 95 | struct dirinfo dir_get_info(DIR* parent, struct dirent *entry) |
96 | { | 96 | { |
97 | (void)parent; | 97 | (void)parent; |
diff --git a/firmware/common/rbpaths.c b/firmware/common/rbpaths.c index 10fceb69d9..cb56ab4845 100644 --- a/firmware/common/rbpaths.c +++ b/firmware/common/rbpaths.c | |||
@@ -43,7 +43,7 @@ | |||
43 | #define opendir opendir_android | 43 | #define opendir opendir_android |
44 | #define mkdir mkdir_android | 44 | #define mkdir mkdir_android |
45 | #define rmdir rmdir_android | 45 | #define rmdir rmdir_android |
46 | #elif (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO)) | 46 | #elif (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) |
47 | #define open sim_open | 47 | #define open sim_open |
48 | #define remove sim_remove | 48 | #define remove sim_remove |
49 | #define rename sim_rename | 49 | #define rename sim_rename |
diff --git a/firmware/export/config.h b/firmware/export/config.h index 1783cc137d..d00958a71d 100644 --- a/firmware/export/config.h +++ b/firmware/export/config.h | |||
@@ -86,6 +86,7 @@ | |||
86 | #define PLATFORM_MAEMO4 (1<<4) | 86 | #define PLATFORM_MAEMO4 (1<<4) |
87 | #define PLATFORM_MAEMO5 (1<<5) | 87 | #define PLATFORM_MAEMO5 (1<<5) |
88 | #define PLATFORM_MAEMO (PLATFORM_MAEMO4|PLATFORM_MAEMO5) | 88 | #define PLATFORM_MAEMO (PLATFORM_MAEMO4|PLATFORM_MAEMO5) |
89 | #define PLATFORM_PANDORA (1<<6) | ||
89 | 90 | ||
90 | /* CONFIG_KEYPAD */ | 91 | /* CONFIG_KEYPAD */ |
91 | #define PLAYER_PAD 1 | 92 | #define PLAYER_PAD 1 |
@@ -448,6 +449,8 @@ Lyre prototype 1 */ | |||
448 | #include "config/nokian8xx.h" | 449 | #include "config/nokian8xx.h" |
449 | #elif defined(NOKIAN900) | 450 | #elif defined(NOKIAN900) |
450 | #include "config/nokian900.h" | 451 | #include "config/nokian900.h" |
452 | #elif defined(PANDORA) | ||
453 | #include "config/pandora.h" | ||
451 | #else | 454 | #else |
452 | /* no known platform */ | 455 | /* no known platform */ |
453 | #endif | 456 | #endif |
@@ -511,7 +514,8 @@ Lyre prototype 1 */ | |||
511 | #endif | 514 | #endif |
512 | 515 | ||
513 | /* define for all cpus from ARM family */ | 516 | /* define for all cpus from ARM family */ |
514 | #if (CONFIG_PLATFORM & PLATFORM_MAEMO5) && defined(MAEMO_ARM_BUILD) | 517 | #if ((CONFIG_PLATFORM & PLATFORM_MAEMO5) && defined(MAEMO_ARM_BUILD)) \ |
518 | || (CONFIG_PLATFORM & PLATFORM_PANDORA) | ||
515 | #define CPU_ARM | 519 | #define CPU_ARM |
516 | #define ARM_ARCH 7 /* ARMv7 */ | 520 | #define ARM_ARCH 7 /* ARMv7 */ |
517 | 521 | ||
diff --git a/firmware/export/config/pandora.h b/firmware/export/config/pandora.h new file mode 100644 index 0000000000..81dd75b975 --- /dev/null +++ b/firmware/export/config/pandora.h | |||
@@ -0,0 +1,96 @@ | |||
1 | /* | ||
2 | * This config file is for Rockbox as an application on the Nokia N8xx | ||
3 | */ | ||
4 | #define TARGET_TREE /* this target is using the target tree system */ | ||
5 | |||
6 | /* We don't run on hardware directly */ | ||
7 | #define CONFIG_PLATFORM (PLATFORM_HOSTED|PLATFORM_PANDORA) | ||
8 | |||
9 | /* For Rolo and boot loader */ | ||
10 | #define MODEL_NUMBER 100 | ||
11 | |||
12 | #define MODEL_NAME "Rockbox" | ||
13 | |||
14 | #define USB_NONE | ||
15 | |||
16 | /* define this if you have a bitmap LCD display */ | ||
17 | #define HAVE_LCD_BITMAP | ||
18 | |||
19 | /* define this if you have a colour LCD */ | ||
20 | #define HAVE_LCD_COLOR | ||
21 | |||
22 | /* define this if you want album art for this target */ | ||
23 | #define HAVE_ALBUMART | ||
24 | |||
25 | /* define this to enable bitmap scaling */ | ||
26 | #define HAVE_BMP_SCALING | ||
27 | |||
28 | /* define this to enable JPEG decoding */ | ||
29 | #define HAVE_JPEG | ||
30 | |||
31 | /* define this if you have access to the quickscreen */ | ||
32 | #define HAVE_QUICKSCREEN | ||
33 | /* define this if you have access to the pitchscreen */ | ||
34 | #define HAVE_PITCHSCREEN | ||
35 | |||
36 | /* define this if you would like tagcache to build on this target */ | ||
37 | #define HAVE_TAGCACHE | ||
38 | |||
39 | /* LCD dimensions */ | ||
40 | #define LCD_WIDTH 800 | ||
41 | #define LCD_HEIGHT 480 | ||
42 | #define LCD_DEPTH 16 | ||
43 | #define LCD_PIXELFORMAT 565 | ||
44 | |||
45 | /* define this to indicate your device's keypad */ | ||
46 | #define HAVE_TOUCHSCREEN | ||
47 | #define HAVE_BUTTON_DATA | ||
48 | |||
49 | /* define this if you have RTC RAM available for settings */ | ||
50 | //#define HAVE_RTC_RAM | ||
51 | |||
52 | /* The number of bytes reserved for loadable codecs */ | ||
53 | #define CODEC_SIZE 0x100000 | ||
54 | |||
55 | /* The number of bytes reserved for loadable plugins */ | ||
56 | #define PLUGIN_BUFFER_SIZE 0x80000 | ||
57 | |||
58 | #define AB_REPEAT_ENABLE | ||
59 | |||
60 | /* Define this if you do software codec */ | ||
61 | #define CONFIG_CODEC SWCODEC | ||
62 | |||
63 | /* Work around debug macro expansion of strncmp in scratchbox */ | ||
64 | #define _HAVE_STRING_ARCH_strncmp | ||
65 | |||
66 | #define HAVE_SCROLLWHEEL | ||
67 | #define CONFIG_KEYPAD SDL_PAD | ||
68 | |||
69 | /* Use SDL audio/pcm in a SDL app build */ | ||
70 | #define HAVE_SDL | ||
71 | #define HAVE_SDL_AUDIO | ||
72 | |||
73 | #define HAVE_SW_TONE_CONTROLS | ||
74 | |||
75 | /* Define current usage levels. */ | ||
76 | #define CURRENT_NORMAL 88 /* 18 hours from a 1600 mAh battery */ | ||
77 | #define CURRENT_BACKLIGHT 30 /* TBD */ | ||
78 | #define CURRENT_RECORD 0 /* no recording yet */ | ||
79 | |||
80 | /* Define this to the CPU frequency */ | ||
81 | /* | ||
82 | #define CPU_FREQ 48000000 | ||
83 | */ | ||
84 | |||
85 | /* Offset ( in the firmware file's header ) to the file CRC */ | ||
86 | #define FIRMWARE_OFFSET_FILE_CRC 0 | ||
87 | |||
88 | /* Offset ( in the firmware file's header ) to the real data */ | ||
89 | #define FIRMWARE_OFFSET_FILE_DATA 8 | ||
90 | |||
91 | #define CONFIG_LCD LCD_COWOND2 | ||
92 | |||
93 | /* Define this if a programmable hotkey is mapped */ | ||
94 | //#define HAVE_HOTKEY | ||
95 | |||
96 | #define BOOTDIR "/.rockbox" | ||
diff --git a/firmware/export/debug.h b/firmware/export/debug.h index 99cdf42c05..b5458af487 100644 --- a/firmware/export/debug.h +++ b/firmware/export/debug.h | |||
@@ -34,7 +34,7 @@ extern void ldebugf(const char* file, int line, const char *fmt, ...) | |||
34 | 34 | ||
35 | /* */ | 35 | /* */ |
36 | #if defined(SIMULATOR) && !defined(__PCTOOL__) \ | 36 | #if defined(SIMULATOR) && !defined(__PCTOOL__) \ |
37 | || ((CONFIG_PLATFORM & (PLATFORM_ANDROID|PLATFORM_MAEMO)) && defined(DEBUG)) | 37 | || ((CONFIG_PLATFORM & (PLATFORM_ANDROID|PLATFORM_MAEMO|PLATFORM_PANDORA)) && defined(DEBUG)) |
38 | #define DEBUGF debugf | 38 | #define DEBUGF debugf |
39 | #define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__) | 39 | #define LDEBUGF(...) ldebugf(__FILE__, __LINE__, __VA_ARGS__) |
40 | #else | 40 | #else |
diff --git a/firmware/include/dir_uncached.h b/firmware/include/dir_uncached.h index 19bed9af5d..d9a29fbada 100644 --- a/firmware/include/dir_uncached.h +++ b/firmware/include/dir_uncached.h | |||
@@ -33,7 +33,7 @@ struct dirinfo { | |||
33 | #include <stdbool.h> | 33 | #include <stdbool.h> |
34 | #include "file.h" | 34 | #include "file.h" |
35 | 35 | ||
36 | #if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO)) | 36 | #if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) |
37 | # define dirent_uncached sim_dirent | 37 | # define dirent_uncached sim_dirent |
38 | # define DIR_UNCACHED SIM_DIR | 38 | # define DIR_UNCACHED SIM_DIR |
39 | # define opendir_uncached sim_opendir | 39 | # define opendir_uncached sim_opendir |
diff --git a/firmware/include/file.h b/firmware/include/file.h index 69ed394828..48354505f5 100644 --- a/firmware/include/file.h +++ b/firmware/include/file.h | |||
@@ -46,7 +46,7 @@ extern int app_open(const char *name, int o, ...); | |||
46 | extern int app_creat(const char *name, mode_t mode); | 46 | extern int app_creat(const char *name, mode_t mode); |
47 | extern int app_remove(const char* pathname); | 47 | extern int app_remove(const char* pathname); |
48 | extern int app_rename(const char* path, const char* newname); | 48 | extern int app_rename(const char* path, const char* newname); |
49 | # if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO)) | 49 | # if (CONFIG_PLATFORM & (PLATFORM_SDL|PLATFORM_MAEMO|PLATFORM_PANDORA)) |
50 | # define filesize(x) sim_filesize(x) | 50 | # define filesize(x) sim_filesize(x) |
51 | # define fsync(x) sim_fsync(x) | 51 | # define fsync(x) sim_fsync(x) |
52 | # define ftruncate(x,y) sim_ftruncate(x,y) | 52 | # define ftruncate(x,y) sim_ftruncate(x,y) |
diff --git a/firmware/target/hosted/sdl/app/button-application.c b/firmware/target/hosted/sdl/app/button-application.c index 72f4a1770d..bb43d904ed 100644 --- a/firmware/target/hosted/sdl/app/button-application.c +++ b/firmware/target/hosted/sdl/app/button-application.c | |||
@@ -50,7 +50,7 @@ int key_to_button(int keyboard_key) | |||
50 | case SDLK_LEFT: | 50 | case SDLK_LEFT: |
51 | new_btn = BUTTON_MIDLEFT; | 51 | new_btn = BUTTON_MIDLEFT; |
52 | break; | 52 | break; |
53 | #if (CONFIG_PLATFORM & PLATFORM_MAEMO) | 53 | #if (CONFIG_PLATFORM & PLATFORM_MAEMO|PLATFORM_PANDORA) |
54 | case SDLK_RETURN: | 54 | case SDLK_RETURN: |
55 | case SDLK_KP_ENTER: | 55 | case SDLK_KP_ENTER: |
56 | #endif | 56 | #endif |
diff --git a/firmware/target/hosted/sdl/system-sdl.c b/firmware/target/hosted/sdl/system-sdl.c index 1cc9b2c919..4dc5509397 100644 --- a/firmware/target/hosted/sdl/system-sdl.c +++ b/firmware/target/hosted/sdl/system-sdl.c | |||
@@ -133,7 +133,7 @@ static int sdl_event_thread(void * param) | |||
133 | depth = 16; | 133 | depth = 16; |
134 | 134 | ||
135 | flags = SDL_HWSURFACE|SDL_DOUBLEBUF; | 135 | flags = SDL_HWSURFACE|SDL_DOUBLEBUF; |
136 | #if (CONFIG_PLATFORM & PLATFORM_MAEMO) | 136 | #if (CONFIG_PLATFORM & (PLATFORM_MAEMO|PLATFORM_PANDORA)) |
137 | /* Fullscreen mode for maemo app */ | 137 | /* Fullscreen mode for maemo app */ |
138 | flags |= SDL_FULLSCREEN; | 138 | flags |= SDL_FULLSCREEN; |
139 | #endif | 139 | #endif |
@@ -142,7 +142,7 @@ static int sdl_event_thread(void * param) | |||
142 | panicf("%s", SDL_GetError()); | 142 | panicf("%s", SDL_GetError()); |
143 | } | 143 | } |
144 | 144 | ||
145 | #if (CONFIG_PLATFORM & PLATFORM_MAEMO) | 145 | #if (CONFIG_PLATFORM & PLATFORM_MAEMO|PLATFORM_PANDORA) |
146 | /* Hide mouse cursor on real touchscreen device */ | 146 | /* Hide mouse cursor on real touchscreen device */ |
147 | SDL_ShowCursor(SDL_DISABLE); | 147 | SDL_ShowCursor(SDL_DISABLE); |
148 | #endif | 148 | #endif |