diff options
author | Jens Arnold <amiconn@rockbox.org> | 2008-03-25 19:57:23 +0000 |
---|---|---|
committer | Jens Arnold <amiconn@rockbox.org> | 2008-03-25 19:57:23 +0000 |
commit | 1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323 (patch) | |
tree | a3862957ba38ea22bfd01504c0389d23cb4b09a9 | |
parent | 386f77b0521433f55811f5735aa7a7df5c422760 (diff) | |
download | rockbox-1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323.tar.gz rockbox-1f4bcc86dac8e57aa2fba4e5b3149fbe52ead323.zip |
Revert accidental tree commit. /me needs a smaller enter key...
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@16805 a1c6a512-1295-4272-9138-f99709370657
34 files changed, 427 insertions, 411 deletions
diff --git a/apps/SOURCES b/apps/SOURCES index 56ed12d947..96b5c0f825 100644 --- a/apps/SOURCES +++ b/apps/SOURCES | |||
@@ -75,7 +75,6 @@ gui/backdrop.c | |||
75 | #endif | 75 | #endif |
76 | 76 | ||
77 | #ifdef HAVE_LCD_CHARCELLS | 77 | #ifdef HAVE_LCD_CHARCELLS |
78 | player/bmp.c | ||
79 | player/icons.c | 78 | player/icons.c |
80 | player/keyboard.c | 79 | player/keyboard.c |
81 | #endif | 80 | #endif |
@@ -130,7 +129,6 @@ metadata/mp4.c | |||
130 | metadata/mpc.c | 129 | metadata/mpc.c |
131 | metadata/ogg.c | 130 | metadata/ogg.c |
132 | metadata/sid.c | 131 | metadata/sid.c |
133 | metadata/mod.c | ||
134 | metadata/spc.c | 132 | metadata/spc.c |
135 | metadata/vorbis.c | 133 | metadata/vorbis.c |
136 | metadata/wave.c | 134 | metadata/wave.c |
diff --git a/apps/codecs/Makefile b/apps/codecs/Makefile index 7c066d284d..5a65341d02 100644 --- a/apps/codecs/Makefile +++ b/apps/codecs/Makefile | |||
@@ -47,7 +47,6 @@ all: $(LINKCODEC) $(ROCKS) | |||
47 | ifndef SIMVER | 47 | ifndef SIMVER |
48 | $(BUILDDIR)/%.a : % $(CODECDEPS) | 48 | $(BUILDDIR)/%.a : % $(CODECDEPS) |
49 | 49 | ||
50 | $(OBJDIR)/mod.elf : $(OBJDIR)/mod.o $(OBJDIR)/codec_crt0.o | ||
51 | $(OBJDIR)/wav.elf : $(OBJDIR)/wav.o $(OBJDIR)/codec_crt0.o | 50 | $(OBJDIR)/wav.elf : $(OBJDIR)/wav.o $(OBJDIR)/codec_crt0.o |
52 | $(OBJDIR)/sid.elf : $(OBJDIR)/sid.o $(OBJDIR)/codec_crt0.o | 51 | $(OBJDIR)/sid.elf : $(OBJDIR)/sid.o $(OBJDIR)/codec_crt0.o |
53 | $(OBJDIR)/adx.elf : $(OBJDIR)/adx.o $(OBJDIR)/codec_crt0.o | 52 | $(OBJDIR)/adx.elf : $(OBJDIR)/adx.o $(OBJDIR)/codec_crt0.o |
diff --git a/apps/codecs/SOURCES b/apps/codecs/SOURCES index 3c0118c1ce..a93cb6c0cc 100644 --- a/apps/codecs/SOURCES +++ b/apps/codecs/SOURCES | |||
@@ -13,7 +13,6 @@ wma.c | |||
13 | aac.c | 13 | aac.c |
14 | #endif | 14 | #endif |
15 | ape.c | 15 | ape.c |
16 | mod.c | ||
17 | shorten.c | 16 | shorten.c |
18 | aiff.c | 17 | aiff.c |
19 | speex.c | 18 | speex.c |
diff --git a/apps/filetypes.c b/apps/filetypes.c index 694bb0a7cf..1ef136d5ce 100644 --- a/apps/filetypes.c +++ b/apps/filetypes.c | |||
@@ -69,7 +69,6 @@ const struct filetype inbuilt_filetypes[] = { | |||
69 | { "m4a", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | 69 | { "m4a", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, |
70 | { "m4b", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | 70 | { "m4b", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, |
71 | { "mp4", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | 71 | { "mp4", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, |
72 | { "mod", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | ||
73 | { "shn", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | 72 | { "shn", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, |
74 | { "aif", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | 73 | { "aif", FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, |
75 | { "aiff",FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, | 74 | { "aiff",FILE_ATTR_AUDIO, Icon_Audio, VOICE_EXT_MPA }, |
diff --git a/apps/metadata.c b/apps/metadata.c index 303fafc070..3abbd74c35 100644 --- a/apps/metadata.c +++ b/apps/metadata.c | |||
@@ -183,14 +183,6 @@ bool get_metadata(struct mp3entry* id3, int fd, const char* trackname) | |||
183 | 183 | ||
184 | break; | 184 | break; |
185 | 185 | ||
186 | case AFMT_MOD: | ||
187 | if (!get_mod_metadata(fd, id3)) | ||
188 | { | ||
189 | return false; | ||
190 | } | ||
191 | |||
192 | break; | ||
193 | |||
194 | case AFMT_SHN: | 186 | case AFMT_SHN: |
195 | id3->vbr = true; | 187 | id3->vbr = true; |
196 | id3->filesize = filesize(fd); | 188 | id3->filesize = filesize(fd); |
diff --git a/apps/metadata/metadata_parsers.h b/apps/metadata/metadata_parsers.h index b34d09fe4c..c3265f8a43 100644 --- a/apps/metadata/metadata_parsers.h +++ b/apps/metadata/metadata_parsers.h | |||
@@ -25,7 +25,6 @@ bool get_mp4_metadata(int fd, struct mp3entry* id3); | |||
25 | bool get_monkeys_metadata(int fd, struct mp3entry* id3); | 25 | bool get_monkeys_metadata(int fd, struct mp3entry* id3); |
26 | bool get_musepack_metadata(int fd, struct mp3entry *id3); | 26 | bool get_musepack_metadata(int fd, struct mp3entry *id3); |
27 | bool get_sid_metadata(int fd, struct mp3entry* id3); | 27 | bool get_sid_metadata(int fd, struct mp3entry* id3); |
28 | bool get_mod_metadata(int fd, struct mp3entry* id3); | ||
29 | bool get_spc_metadata(int fd, struct mp3entry* id3); | 28 | bool get_spc_metadata(int fd, struct mp3entry* id3); |
30 | bool get_ogg_metadata(int fd, struct mp3entry* id3); | 29 | bool get_ogg_metadata(int fd, struct mp3entry* id3); |
31 | bool get_wave_metadata(int fd, struct mp3entry* id3); | 30 | bool get_wave_metadata(int fd, struct mp3entry* id3); |
diff --git a/apps/plugins/CATEGORIES b/apps/plugins/CATEGORIES index c2ad75e0c7..4b267c162b 100644 --- a/apps/plugins/CATEGORIES +++ b/apps/plugins/CATEGORIES | |||
@@ -80,7 +80,6 @@ stopwatch,apps | |||
80 | test_codec,viewers | 80 | test_codec,viewers |
81 | test_disk,apps | 81 | test_disk,apps |
82 | test_fps,apps | 82 | test_fps,apps |
83 | test_grey,apps | ||
84 | test_sampr,apps | 83 | test_sampr,apps |
85 | test_scanrate,apps | 84 | test_scanrate,apps |
86 | test_viewports,apps | 85 | test_viewports,apps |
diff --git a/apps/plugins/SOURCES b/apps/plugins/SOURCES index 968592d15a..23c22f9826 100644 --- a/apps/plugins/SOURCES +++ b/apps/plugins/SOURCES | |||
@@ -19,7 +19,6 @@ stats.c | |||
19 | stopwatch.c | 19 | stopwatch.c |
20 | vbrfix.c | 20 | vbrfix.c |
21 | viewer.c | 21 | viewer.c |
22 | test_disk.c | ||
23 | 22 | ||
24 | #ifdef OLYMPUS_MROBE_500 | 23 | #ifdef OLYMPUS_MROBE_500 |
25 | /* remove these once the plugins before it are compileable */ | 24 | /* remove these once the plugins before it are compileable */ |
@@ -47,22 +46,17 @@ flipit.c | |||
47 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ | 46 | #ifdef HAVE_LCD_BITMAP /* Not for the Player */ |
48 | brickmania.c | 47 | brickmania.c |
49 | maze.c | 48 | maze.c |
50 | mazezam.c | 49 | mazezam.c |
51 | greyscale.c | ||
52 | test_fps.c | ||
53 | test_scanrate.c | ||
54 | text_editor.c | 50 | text_editor.c |
55 | wavview.c | 51 | wavview.c |
56 | robotfindskitten.c | 52 | robotfindskitten.c |
57 | 53 | ||
58 | /* Plugins needing the grayscale lib on low-depth LCDs */ | 54 | /* Plugins needing the grayscale lib on low-depth LCDs */ |
55 | #ifndef IAUDIO_M3 /* FIXME: no greyscale library yet */ | ||
59 | fire.c | 56 | fire.c |
60 | jpeg.c | 57 | jpeg.c |
61 | mandelbrot.c | 58 | mandelbrot.c |
62 | plasma.c | 59 | plasma.c |
63 | |||
64 | #if LCD_DEPTH < 4 | ||
65 | test_grey.c | ||
66 | #endif | 60 | #endif |
67 | 61 | ||
68 | blackjack.c | 62 | blackjack.c |
@@ -124,7 +118,6 @@ nim.c | |||
124 | 118 | ||
125 | #if CONFIG_CODEC == SWCODEC /* software codec platforms */ | 119 | #if CONFIG_CODEC == SWCODEC /* software codec platforms */ |
126 | mp3_encoder.c | 120 | mp3_encoder.c |
127 | test_codec.c | ||
128 | wav2wv.c | 121 | wav2wv.c |
129 | #else /* hardware codec platforms */ | 122 | #else /* hardware codec platforms */ |
130 | #ifndef HAVE_MMC /* not for Ondio, has no remote control pin */ | 123 | #ifndef HAVE_MMC /* not for Ondio, has no remote control pin */ |
diff --git a/apps/plugins/SUBDIRS b/apps/plugins/SUBDIRS index b0bffc73eb..9bda7c2715 100644 --- a/apps/plugins/SUBDIRS +++ b/apps/plugins/SUBDIRS | |||
@@ -34,7 +34,7 @@ pacbox | |||
34 | 34 | ||
35 | /* For all the color targets */ | 35 | /* For all the color targets */ |
36 | #if defined(HAVE_LCD_COLOR) || \ | 36 | #if defined(HAVE_LCD_COLOR) || \ |
37 | (LCD_DEPTH == 2) && !defined(ARCHOS_AV300) | 37 | (LCD_DEPTH == 2) && !defined(ARCHOS_AV300) && !defined(IAUDIO_M3) |
38 | doom | 38 | doom |
39 | #endif | 39 | #endif |
40 | 40 | ||
@@ -42,7 +42,9 @@ doom | |||
42 | #if CONFIG_CODEC == SWCODEC | 42 | #if CONFIG_CODEC == SWCODEC |
43 | midi | 43 | midi |
44 | /* beatbox */ | 44 | /* beatbox */ |
45 | #ifndef IAUDIO_M3 /* TODO: no greyscale lib yet */ | ||
45 | mpegplayer | 46 | mpegplayer |
46 | #endif | 47 | #endif |
48 | #endif | ||
47 | 49 | ||
48 | #endif /* IRIVER_IFP7XX_SERIES */ | 50 | #endif /* IRIVER_IFP7XX_SERIES */ |
diff --git a/apps/plugins/doom/i_video.c b/apps/plugins/doom/i_video.c index ce4b670583..bc0f204d3b 100644 --- a/apps/plugins/doom/i_video.c +++ b/apps/plugins/doom/i_video.c | |||
@@ -235,16 +235,6 @@ void I_ShutdownGraphics(void) | |||
235 | #define DOOMBUTTON_ESC BUTTON_OFF | 235 | #define DOOMBUTTON_ESC BUTTON_OFF |
236 | #define DOOMBUTTON_ENTER BUTTON_SELECT | 236 | #define DOOMBUTTON_ENTER BUTTON_SELECT |
237 | #define DOOMBUTTON_WEAPON BUTTON_ON | 237 | #define DOOMBUTTON_WEAPON BUTTON_ON |
238 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
239 | #define DOOMBUTTON_ESC BUTTON_RC_REC | ||
240 | #define DOOMBUTTON_UP BUTTON_RC_VOL_UP | ||
241 | #define DOOMBUTTON_DOWN BUTTON_RC_VOL_DOWN | ||
242 | #define DOOMBUTTON_LEFT BUTTON_RC_REW | ||
243 | #define DOOMBUTTON_RIGHT BUTTON_RC_FF | ||
244 | #define DOOMBUTTON_OPEN BUTTON_RC_PLAY | ||
245 | #define DOOMBUTTON_SHOOT BUTTON_RC_MODE | ||
246 | #define DOOMBUTTON_ENTER BUTTON_RC_PLAY | ||
247 | #define DOOMBUTTON_WEAPON BUTTON_RC_MENU | ||
248 | #elif CONFIG_KEYPAD == COWOND2_PAD | 238 | #elif CONFIG_KEYPAD == COWOND2_PAD |
249 | #define DOOMBUTTON_ESC BUTTON_POWER | 239 | #define DOOMBUTTON_ESC BUTTON_POWER |
250 | #define DOOMBUTTON_UP BUTTON_UP | 240 | #define DOOMBUTTON_UP BUTTON_UP |
diff --git a/apps/plugins/greyscale.c b/apps/plugins/greyscale.c index 42ba08f22e..522a81fc28 100644 --- a/apps/plugins/greyscale.c +++ b/apps/plugins/greyscale.c | |||
@@ -78,17 +78,6 @@ PLUGIN_HEADER | |||
78 | #define GREYSCALE_LEFT BUTTON_LEFT | 78 | #define GREYSCALE_LEFT BUTTON_LEFT |
79 | #define GREYSCALE_RIGHT BUTTON_RIGHT | 79 | #define GREYSCALE_RIGHT BUTTON_RIGHT |
80 | #define GREYSCALE_OFF BUTTON_EQ | 80 | #define GREYSCALE_OFF BUTTON_EQ |
81 | |||
82 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
83 | #define GREYSCALE_SHIFT BUTTON_RC_PLAY /* somewhat dangerous... */ | ||
84 | #define GREYSCALE_UP BUTTON_RC_VOL_UP | ||
85 | #define GREYSCALE_DOWN BUTTON_RC_VOL_DOWN | ||
86 | #define GREYSCALE_LEFT BUTTON_RC_REW | ||
87 | #define GREYSCALE_RIGHT BUTTON_RC_FF | ||
88 | #define GREYSCALE_OFF BUTTON_RC_REC | ||
89 | |||
90 | #define GREYSCALE_RC_OFF BUTTON_REC | ||
91 | |||
92 | #endif | 81 | #endif |
93 | 82 | ||
94 | #define GFX_HEIGHT (LCD_HEIGHT-8) | 83 | #define GFX_HEIGHT (LCD_HEIGHT-8) |
diff --git a/apps/plugins/jpeg.c b/apps/plugins/jpeg.c index fcef31f5fd..e2c1b4861b 100644 --- a/apps/plugins/jpeg.c +++ b/apps/plugins/jpeg.c | |||
@@ -198,18 +198,6 @@ PLUGIN_HEADER | |||
198 | #define JPEG_NEXT (BUTTON_DISPLAY | BUTTON_RIGHT) | 198 | #define JPEG_NEXT (BUTTON_DISPLAY | BUTTON_RIGHT) |
199 | #define JPEG_PREVIOUS (BUTTON_DISPLAY | BUTTON_LEFT) | 199 | #define JPEG_PREVIOUS (BUTTON_DISPLAY | BUTTON_LEFT) |
200 | 200 | ||
201 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
202 | #define JPEG_ZOOM_IN_PRE BUTTON_RC_PLAY | ||
203 | #define JPEG_ZOOM_IN (BUTTON_RC_PLAY|BUTTON_REL) | ||
204 | #define JPEG_ZOOM_OUT (BUTTON_RC_PLAY|BUTTON_REPEAT) | ||
205 | #define JPEG_UP BUTTON_RC_VOL_UP | ||
206 | #define JPEG_DOWN BUTTON_RC_VOL_DOWN | ||
207 | #define JPEG_LEFT BUTTON_RC_REW | ||
208 | #define JPEG_RIGHT BUTTON_RC_FF | ||
209 | #define JPEG_MENU BUTTON_RC_REC | ||
210 | #define JPEG_NEXT BUTTON_RC_MODE | ||
211 | #define JPEG_PREVIOUS BUTTON_RC_MENU | ||
212 | |||
213 | #elif CONFIG_KEYPAD == COWOND2_PAD | 201 | #elif CONFIG_KEYPAD == COWOND2_PAD |
214 | #define JPEG_ZOOM_IN BUTTON_PLUS | 202 | #define JPEG_ZOOM_IN BUTTON_PLUS |
215 | #define JPEG_ZOOM_OUT BUTTON_MINUS | 203 | #define JPEG_ZOOM_OUT BUTTON_MINUS |
diff --git a/apps/plugins/lib/SOURCES b/apps/plugins/lib/SOURCES index 6a44c80ffa..f1aded6122 100644 --- a/apps/plugins/lib/SOURCES +++ b/apps/plugins/lib/SOURCES | |||
@@ -3,7 +3,8 @@ configfile.c | |||
3 | fixedpoint.c | 3 | fixedpoint.c |
4 | playback_control.c | 4 | playback_control.c |
5 | rgb_hsv.c | 5 | rgb_hsv.c |
6 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) | 6 | #if defined(HAVE_LCD_BITMAP) && (LCD_DEPTH < 4) \ |
7 | && !defined(IAUDIO_M3) /* TODO: Test whether it can be implemented */ | ||
7 | grey_core.c | 8 | grey_core.c |
8 | grey_draw.c | 9 | grey_draw.c |
9 | grey_parm.c | 10 | grey_parm.c |
diff --git a/apps/plugins/lib/grey.h b/apps/plugins/lib/grey.h index 4298ae3ada..ce37e17829 100644 --- a/apps/plugins/lib/grey.h +++ b/apps/plugins/lib/grey.h | |||
@@ -134,8 +134,8 @@ void grey_ub_scroll_down(int count); | |||
134 | 134 | ||
135 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 135 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
136 | #define _GREY_BSHIFT 0 | 136 | #define _GREY_BSHIFT 0 |
137 | #else /* vertical packing or vertical interleaved */ | 137 | #else |
138 | #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | 138 | #if LCD_DEPTH == 1 |
139 | #define _GREY_BSHIFT 3 | 139 | #define _GREY_BSHIFT 3 |
140 | #elif LCD_DEPTH == 2 | 140 | #elif LCD_DEPTH == 2 |
141 | #define _GREY_BSHIFT 2 | 141 | #define _GREY_BSHIFT 2 |
@@ -155,7 +155,7 @@ struct _grey_info | |||
155 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 155 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
156 | int bx; /* 8-pixel units */ | 156 | int bx; /* 8-pixel units */ |
157 | int bwidth; /* 8-pixel units */ | 157 | int bwidth; /* 8-pixel units */ |
158 | #else /* vertical packing or vertical interleaved */ | 158 | #else /* vertical packing */ |
159 | int by; /* 4-pixel or 8-pixel units */ | 159 | int by; /* 4-pixel or 8-pixel units */ |
160 | int bheight; /* 4-pixel or 8-pixel units */ | 160 | int bheight; /* 4-pixel or 8-pixel units */ |
161 | #endif | 161 | #endif |
diff --git a/apps/plugins/lib/grey_core.c b/apps/plugins/lib/grey_core.c index ad8f306dea..caa7af2f25 100644 --- a/apps/plugins/lib/grey_core.c +++ b/apps/plugins/lib/grey_core.c | |||
@@ -26,8 +26,7 @@ | |||
26 | #include "plugin.h" | 26 | #include "plugin.h" |
27 | #include "grey.h" | 27 | #include "grey.h" |
28 | 28 | ||
29 | #if defined(HAVE_ADJUSTABLE_CPU_FREQ) && \ | 29 | #if defined(CPU_PP) && defined(HAVE_ADJUSTABLE_CPU_FREQ) |
30 | (defined(CPU_PP) || (CONFIG_LCD == LCD_TL0350A)) | ||
31 | #define NEED_BOOST | 30 | #define NEED_BOOST |
32 | #endif | 31 | #endif |
33 | 32 | ||
@@ -144,42 +143,6 @@ static const unsigned char lcdlinear[256] = { | |||
144 | 203, 206, 209, 212, 215, 219, 222, 226, | 143 | 203, 206, 209, 212, 215, 219, 222, 226, |
145 | 229, 233, 236, 240, 244, 248, 251, 255 | 144 | 229, 233, 236, 240, 244, 248, 251, 255 |
146 | }; | 145 | }; |
147 | #elif CONFIG_LCD == LCD_TL0350A | ||
148 | /* generic linear curve - not yet measured */ | ||
149 | static const unsigned char lcdlinear[256] = { | ||
150 | 0, 1, 2, 3, 4, 5, 6, 7, | ||
151 | 8, 9, 10, 11, 12, 13, 14, 15, | ||
152 | 16, 17, 18, 19, 20, 21, 22, 23, | ||
153 | 24, 25, 26, 27, 28, 29, 30, 31, | ||
154 | 32, 33, 34, 35, 36, 37, 38, 39, | ||
155 | 40, 41, 42, 43, 44, 45, 46, 47, | ||
156 | 48, 49, 50, 51, 52, 53, 54, 55, | ||
157 | 56, 57, 58, 59, 60, 61, 62, 63, | ||
158 | 64, 65, 66, 67, 68, 69, 70, 71, | ||
159 | 72, 73, 74, 75, 76, 77, 78, 79, | ||
160 | 80, 81, 82, 83, 84, 85, 86, 87, | ||
161 | 88, 89, 90, 91, 92, 93, 94, 95, | ||
162 | 96, 97, 98, 99, 100, 101, 102, 103, | ||
163 | 104, 105, 106, 107, 108, 109, 110, 111, | ||
164 | 112, 113, 114, 115, 116, 117, 118, 119, | ||
165 | 120, 121, 122, 123, 124, 125, 126, 127, | ||
166 | 128, 129, 130, 131, 132, 133, 134, 135, | ||
167 | 136, 137, 138, 139, 140, 141, 142, 143, | ||
168 | 144, 145, 146, 147, 148, 149, 150, 151, | ||
169 | 152, 153, 154, 155, 156, 157, 158, 159, | ||
170 | 160, 161, 162, 163, 164, 165, 166, 167, | ||
171 | 168, 169, 170, 171, 172, 173, 174, 175, | ||
172 | 176, 177, 178, 179, 180, 181, 182, 183, | ||
173 | 184, 185, 186, 187, 188, 189, 190, 191, | ||
174 | 192, 193, 194, 195, 196, 197, 198, 199, | ||
175 | 200, 201, 202, 203, 204, 205, 206, 207, | ||
176 | 208, 209, 210, 211, 212, 213, 214, 215, | ||
177 | 216, 217, 218, 219, 220, 221, 222, 223, | ||
178 | 224, 225, 226, 227, 228, 229, 230, 231, | ||
179 | 232, 233, 234, 235, 236, 237, 238, 239, | ||
180 | 240, 241, 242, 243, 244, 245, 246, 247, | ||
181 | 248, 249, 250, 251, 252, 253, 254, 255 | ||
182 | }; | ||
183 | #endif | 146 | #endif |
184 | #else /* SIMULATOR */ | 147 | #else /* SIMULATOR */ |
185 | /* undo a (generic) PC display gamma of 2.0 to simulate target behaviour */ | 148 | /* undo a (generic) PC display gamma of 2.0 to simulate target behaviour */ |
@@ -262,7 +225,7 @@ static unsigned long _grey_get_pixel(int x, int y) | |||
262 | int yg = y - _grey_info.y; | 225 | int yg = y - _grey_info.y; |
263 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 226 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
264 | int idx = _grey_info.width * yg + xg; | 227 | int idx = _grey_info.width * yg + xg; |
265 | #else /* vertical packing or vertical interleaved */ | 228 | #else |
266 | int idx = _grey_info.width * (yg & ~_GREY_BMASK) | 229 | int idx = _grey_info.width * (yg & ~_GREY_BMASK) |
267 | + (xg << _GREY_BSHIFT) + (~yg & _GREY_BMASK); | 230 | + (xg << _GREY_BSHIFT) + (~yg & _GREY_BMASK); |
268 | #endif | 231 | #endif |
@@ -280,7 +243,7 @@ static void _timer_isr(void) | |||
280 | _grey_info.bx, _grey_info.y, | 243 | _grey_info.bx, _grey_info.y, |
281 | _grey_info.bwidth, _grey_info.height, | 244 | _grey_info.bwidth, _grey_info.height, |
282 | _grey_info.width); | 245 | _grey_info.width); |
283 | #else /* vertical packing or vertical interleaved */ | 246 | #else |
284 | _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, | 247 | _grey_info.rb->lcd_blit_grey_phase(_grey_info.values, _grey_info.phases, |
285 | _grey_info.x, _grey_info.by, | 248 | _grey_info.x, _grey_info.by, |
286 | _grey_info.width, _grey_info.bheight, | 249 | _grey_info.width, _grey_info.bheight, |
@@ -392,8 +355,8 @@ bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, | |||
392 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 355 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
393 | bdim = (width + 7) >> 3; | 356 | bdim = (width + 7) >> 3; |
394 | width = bdim << 3; | 357 | width = bdim << 3; |
395 | #else /* vertical packing or vertical interleaved */ | 358 | #else /* vertical packing */ |
396 | #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | 359 | #if LCD_DEPTH == 1 |
397 | bdim = (height + 7) >> 3; | 360 | bdim = (height + 7) >> 3; |
398 | height = bdim << 3; | 361 | height = bdim << 3; |
399 | #elif LCD_DEPTH == 2 | 362 | #elif LCD_DEPTH == 2 |
@@ -445,7 +408,7 @@ bool grey_init(struct plugin_api* newrb, unsigned char *gbuf, long gbuf_size, | |||
445 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 408 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
446 | _grey_info.bx = 0; | 409 | _grey_info.bx = 0; |
447 | _grey_info.bwidth = bdim; | 410 | _grey_info.bwidth = bdim; |
448 | #else /* vertical packing or vertical interleaved */ | 411 | #else |
449 | _grey_info.by = 0; | 412 | _grey_info.by = 0; |
450 | _grey_info.bheight = bdim; | 413 | _grey_info.bheight = bdim; |
451 | #endif | 414 | #endif |
@@ -528,9 +491,6 @@ void grey_show(bool enable) | |||
528 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); | 491 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); |
529 | #elif CONFIG_LCD == LCD_MROBE100 | 492 | #elif CONFIG_LCD == LCD_MROBE100 |
530 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); /* not calibrated/tested */ | 493 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 83, 1, _timer_isr); /* not calibrated/tested */ |
531 | #elif CONFIG_LCD == LCD_TL0350A | ||
532 | _grey_info.rb->timer_register(1, NULL, TIMER_FREQ / 75, 1, _timer_isr); /* verified */ | ||
533 | /* This is half of the actual frame frequency, but 150Hz is too much */ | ||
534 | #endif /* CONFIG_LCD */ | 494 | #endif /* CONFIG_LCD */ |
535 | #endif /* !SIMULATOR */ | 495 | #endif /* !SIMULATOR */ |
536 | _grey_info.rb->screen_dump_set_hook(grey_screendump_hook); | 496 | _grey_info.rb->screen_dump_set_hook(grey_screendump_hook); |
@@ -647,11 +607,8 @@ static void grey_screendump_hook(int fd) | |||
647 | #elif LCD_DEPTH == 2 | 607 | #elif LCD_DEPTH == 2 |
648 | int shift; | 608 | int shift; |
649 | #endif | 609 | #endif |
650 | #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED | 610 | #endif /* LCD_PIXELFORMAT == VERTICAL_PACKING */ |
651 | unsigned data; | 611 | unsigned char *lcdptr; |
652 | int shift; | ||
653 | #endif /* LCD_PIXELFORMAT */ | ||
654 | fb_data *lcdptr; | ||
655 | unsigned char *clut_entry; | 612 | unsigned char *clut_entry; |
656 | unsigned char linebuf[MAX(4*BMP_VARCOLORS,BMP_LINESIZE)]; | 613 | unsigned char linebuf[MAX(4*BMP_VARCOLORS,BMP_LINESIZE)]; |
657 | 614 | ||
@@ -703,7 +660,7 @@ static void grey_screendump_hook(int fd) | |||
703 | lcdptr++; | 660 | lcdptr++; |
704 | } | 661 | } |
705 | #endif /* LCD_DEPTH */ | 662 | #endif /* LCD_DEPTH */ |
706 | #elif LCD_PIXELFORMAT == VERTICAL_PACKING | 663 | #else /* LCD_PIXELFORMAT == VERTICAL_PACKING */ |
707 | #if LCD_DEPTH == 1 | 664 | #if LCD_DEPTH == 1 |
708 | mask = 1 << (y & 7); | 665 | mask = 1 << (y & 7); |
709 | lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); | 666 | lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); |
@@ -751,32 +708,6 @@ static void grey_screendump_hook(int fd) | |||
751 | lcdptr++; | 708 | lcdptr++; |
752 | } | 709 | } |
753 | #endif /* LCD_DEPTH */ | 710 | #endif /* LCD_DEPTH */ |
754 | #elif LCD_PIXELFORMAT == VERTICAL_INTERLEAVED | ||
755 | #if LCD_DEPTH == 2 | ||
756 | shift = y & 7; | ||
757 | lcdptr = _grey_info.rb->lcd_framebuffer + _GREY_MULUQ(LCD_WIDTH, y >> 3); | ||
758 | |||
759 | for (x = 0; x < LCD_WIDTH; x++) | ||
760 | { | ||
761 | gx = x - _grey_info.x; | ||
762 | |||
763 | if (((unsigned)gy < (unsigned)_grey_info.height) | ||
764 | && ((unsigned)gx < (unsigned)_grey_info.width)) | ||
765 | { | ||
766 | linebuf[x] = BMP_FIXEDCOLORS | ||
767 | + _grey_info.values[_GREY_MULUQ(_grey_info.width, | ||
768 | gy & ~_GREY_BMASK) | ||
769 | + (gx << _GREY_BSHIFT) | ||
770 | + (~gy & _GREY_BMASK)]; | ||
771 | } | ||
772 | else | ||
773 | { | ||
774 | data = (*lcdptr >> shift) & 0x0101; | ||
775 | linebuf[x] = ((data >> 7) | data) & 3; | ||
776 | } | ||
777 | lcdptr++; | ||
778 | } | ||
779 | #endif /* LCD_DEPTH */ | ||
780 | #endif /* LCD_PIXELFORMAT */ | 711 | #endif /* LCD_PIXELFORMAT */ |
781 | 712 | ||
782 | _grey_info.rb->write(fd, linebuf, BMP_LINESIZE); | 713 | _grey_info.rb->write(fd, linebuf, BMP_LINESIZE); |
diff --git a/apps/plugins/lib/grey_draw.c b/apps/plugins/lib/grey_draw.c index a1b99fc13b..7b24ba4c70 100644 --- a/apps/plugins/lib/grey_draw.c +++ b/apps/plugins/lib/grey_draw.c | |||
@@ -630,7 +630,7 @@ void grey_ub_gray_bitmap_part(const unsigned char *src, int src_x, int src_y, | |||
630 | { | 630 | { |
631 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 631 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
632 | int idx = _GREY_MULUQ(_grey_info.width, yc); | 632 | int idx = _GREY_MULUQ(_grey_info.width, yc); |
633 | #else /* vertical packing or vertical interleaved */ | 633 | #else |
634 | int idx = _GREY_MULUQ(_grey_info.width, yc & ~_GREY_BMASK) | 634 | int idx = _GREY_MULUQ(_grey_info.width, yc & ~_GREY_BMASK) |
635 | + (~yc & _GREY_BMASK); | 635 | + (~yc & _GREY_BMASK); |
636 | #endif /* LCD_PIXELFORMAT */ | 636 | #endif /* LCD_PIXELFORMAT */ |
diff --git a/apps/plugins/lib/grey_parm.c b/apps/plugins/lib/grey_parm.c index e4aaec3efd..63d09dfd72 100644 --- a/apps/plugins/lib/grey_parm.c +++ b/apps/plugins/lib/grey_parm.c | |||
@@ -34,8 +34,8 @@ void grey_set_position(int x, int y) | |||
34 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING | 34 | #if LCD_PIXELFORMAT == HORIZONTAL_PACKING |
35 | _grey_info.bx = (x + 4) >> 3; | 35 | _grey_info.bx = (x + 4) >> 3; |
36 | x = 8 * _grey_info.bx; | 36 | x = 8 * _grey_info.bx; |
37 | #else /* vertical packing or vertical interleaved */ | 37 | #else |
38 | #if (LCD_DEPTH == 1) || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | 38 | #if LCD_DEPTH == 1 |
39 | _grey_info.by = (y + 4) >> 3; | 39 | _grey_info.by = (y + 4) >> 3; |
40 | y = 8 * _grey_info.by; | 40 | y = 8 * _grey_info.by; |
41 | #elif LCD_DEPTH == 2 | 41 | #elif LCD_DEPTH == 2 |
diff --git a/apps/plugins/lib/grey_scroll.c b/apps/plugins/lib/grey_scroll.c index ba790b035f..12a27daf23 100644 --- a/apps/plugins/lib/grey_scroll.c +++ b/apps/plugins/lib/grey_scroll.c | |||
@@ -191,8 +191,7 @@ void grey_ub_scroll_up(int count) | |||
191 | _grey_info.fg_brightness : | 191 | _grey_info.fg_brightness : |
192 | _grey_info.bg_brightness]; | 192 | _grey_info.bg_brightness]; |
193 | 193 | ||
194 | #if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ | 194 | #if LCD_PIXELFORMAT == VERTICAL_PACKING |
195 | || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | ||
196 | if (count & _GREY_BMASK) | 195 | if (count & _GREY_BMASK) |
197 | { | 196 | { |
198 | /* Scrolling by fractional blocks - move pixel wise. */ | 197 | /* Scrolling by fractional blocks - move pixel wise. */ |
@@ -263,8 +262,7 @@ void grey_ub_scroll_down(int count) | |||
263 | _grey_info.fg_brightness : | 262 | _grey_info.fg_brightness : |
264 | _grey_info.bg_brightness]; | 263 | _grey_info.bg_brightness]; |
265 | 264 | ||
266 | #if (LCD_PIXELFORMAT == VERTICAL_PACKING) \ | 265 | #if LCD_PIXELFORMAT == VERTICAL_PACKING |
267 | || (LCD_PIXELFORMAT == VERTICAL_INTERLEAVED) | ||
268 | if (count & _GREY_BMASK) | 266 | if (count & _GREY_BMASK) |
269 | { | 267 | { |
270 | /* Scrolling by fractional blocks - move pixel wise. */ | 268 | /* Scrolling by fractional blocks - move pixel wise. */ |
diff --git a/apps/plugins/mandelbrot.c b/apps/plugins/mandelbrot.c index 4a4872b827..26ec3e4ab9 100644 --- a/apps/plugins/mandelbrot.c +++ b/apps/plugins/mandelbrot.c | |||
@@ -202,22 +202,6 @@ PLUGIN_HEADER | |||
202 | #define MANDELBROT_MAXITER_DEC BUTTON_PLAY | 202 | #define MANDELBROT_MAXITER_DEC BUTTON_PLAY |
203 | #define MANDELBROT_RESET BUTTON_DISPLAY | 203 | #define MANDELBROT_RESET BUTTON_DISPLAY |
204 | 204 | ||
205 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
206 | #define MANDELBROT_QUIT BUTTON_RC_REC | ||
207 | #define MANDELBROT_UP BUTTON_RC_VOL_UP | ||
208 | #define MANDELBROT_DOWN BUTTON_RC_VOL_DOWN | ||
209 | #define MANDELBROT_LEFT BUTTON_RC_REW | ||
210 | #define MANDELBROT_RIGHT BUTTON_RC_FF | ||
211 | #define MANDELBROT_ZOOM_IN_PRE BUTTON_RC_PLAY | ||
212 | #define MANDELBROT_ZOOM_IN (BUTTON_RC_PLAY | BUTTON_REL) | ||
213 | #define MANDELBROT_ZOOM_OUT_PRE BUTTON_RC_PLAY | ||
214 | #define MANDELBROT_ZOOM_OUT (BUTTON_RC_PLAY | BUTTON_REPEAT) | ||
215 | #define MANDELBROT_MAXITER_INC_PRE BUTTON_RC_MODE | ||
216 | #define MANDELBROT_MAXITER_INC (BUTTON_RC_MODE|BUTTON_REL) | ||
217 | #define MANDELBROT_MAXITER_DEC_PRE BUTTON_RC_MODE | ||
218 | #define MANDELBROT_MAXITER_DEC (BUTTON_RC_MODE|BUTTON_REPEAT) | ||
219 | #define MANDELBROT_RESET BUTTON_RC_MENU | ||
220 | |||
221 | #elif CONFIG_KEYPAD == COWOND2_PAD | 205 | #elif CONFIG_KEYPAD == COWOND2_PAD |
222 | #define MANDELBROT_QUIT BUTTON_POWER | 206 | #define MANDELBROT_QUIT BUTTON_POWER |
223 | #define MANDELBROT_UP BUTTON_UP | 207 | #define MANDELBROT_UP BUTTON_UP |
diff --git a/apps/plugins/mpegplayer/mpeg_settings.c b/apps/plugins/mpegplayer/mpeg_settings.c index b7b7def729..7dfdd36927 100644 --- a/apps/plugins/mpegplayer/mpeg_settings.c +++ b/apps/plugins/mpegplayer/mpeg_settings.c | |||
@@ -102,14 +102,6 @@ struct mpeg_settings settings; | |||
102 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLAY | 102 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLAY |
103 | #define MPEG_START_TIME_EXIT BUTTON_POWER | 103 | #define MPEG_START_TIME_EXIT BUTTON_POWER |
104 | 104 | ||
105 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
106 | #define MPEG_START_TIME_SELECT BUTTON_RC_PLAY | ||
107 | #define MPEG_START_TIME_LEFT BUTTON_RC_REW | ||
108 | #define MPEG_START_TIME_RIGHT BUTTON_RC_FF | ||
109 | #define MPEG_START_TIME_UP BUTTON_RC_VOL_UP | ||
110 | #define MPEG_START_TIME_DOWN BUTTON_RC_VOL_DOWN | ||
111 | #define MPEG_START_TIME_EXIT BUTTON_RC_REC | ||
112 | |||
113 | #elif CONFIG_KEYPAD == COWOND2_PAD | 105 | #elif CONFIG_KEYPAD == COWOND2_PAD |
114 | #define MPEG_START_TIME_SELECT BUTTON_SELECT | 106 | #define MPEG_START_TIME_SELECT BUTTON_SELECT |
115 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLUS | 107 | #define MPEG_START_TIME_SCROLL_UP BUTTON_PLUS |
diff --git a/apps/plugins/mpegplayer/mpegplayer.c b/apps/plugins/mpegplayer/mpegplayer.c index 8a947904a3..d068fd8254 100644 --- a/apps/plugins/mpegplayer/mpegplayer.c +++ b/apps/plugins/mpegplayer/mpegplayer.c | |||
@@ -202,15 +202,6 @@ PLUGIN_IRAM_DECLARE | |||
202 | #define MPEG_RW BUTTON_LEFT | 202 | #define MPEG_RW BUTTON_LEFT |
203 | #define MPEG_FF BUTTON_RIGHT | 203 | #define MPEG_FF BUTTON_RIGHT |
204 | 204 | ||
205 | #elif CONFIG_KEYPAD == IAUDIO_M3_PAD | ||
206 | #define MPEG_MENU BUTTON_RC_MENU | ||
207 | #define MPEG_STOP BUTTON_RC_REC | ||
208 | #define MPEG_PAUSE BUTTON_RC_PLAY | ||
209 | #define MPEG_VOLDOWN BUTTON_RC_VOL_DOWN | ||
210 | #define MPEG_VOLUP BUTTON_RC_VOL_UP | ||
211 | #define MPEG_RW BUTTON_RC_REW | ||
212 | #define MPEG_FF BUTTON_RC_FF | ||
213 | |||
214 | #elif CONFIG_KEYPAD == COWOND2_PAD | 205 | #elif CONFIG_KEYPAD == COWOND2_PAD |
215 | #define MPEG_MENU BUTTON_MENU | 206 | #define MPEG_MENU BUTTON_MENU |
216 | #define MPEG_STOP BUTTON_POWER | 207 | #define MPEG_STOP BUTTON_POWER |
diff --git a/apps/plugins/plasma.c b/apps/plugins/plasma.c index 2e04bd59b5..d5c1ef427f 100644 --- a/apps/plugins/plasma.c +++ b/apps/plugins/plasma.c | |||
@@ -59,7 +59,6 @@ static int plasma_frequency; | |||
59 | #define PLASMA_QUIT BUTTON_MENU | 59 | #define PLASMA_QUIT BUTTON_MENU |
60 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_FWD | 60 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_FWD |
61 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_BACK | 61 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_BACK |
62 | |||
63 | #elif (CONFIG_KEYPAD == GIGABEAT_PAD) | 62 | #elif (CONFIG_KEYPAD == GIGABEAT_PAD) |
64 | #define PLASMA_QUIT BUTTON_A | 63 | #define PLASMA_QUIT BUTTON_A |
65 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 64 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
@@ -75,38 +74,26 @@ static int plasma_frequency; | |||
75 | #define PLASMA_QUIT BUTTON_POWER | 74 | #define PLASMA_QUIT BUTTON_POWER |
76 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 75 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
77 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 76 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
78 | |||
79 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) | 77 | #elif (CONFIG_KEYPAD == IRIVER_H10_PAD) |
80 | #define PLASMA_QUIT BUTTON_POWER | 78 | #define PLASMA_QUIT BUTTON_POWER |
81 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_UP | 79 | #define PLASMA_INCREASE_FREQUENCY BUTTON_SCROLL_UP |
82 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_DOWN | 80 | #define PLASMA_DECREASE_FREQUENCY BUTTON_SCROLL_DOWN |
83 | |||
84 | #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) | 81 | #elif (CONFIG_KEYPAD == GIGABEAT_S_PAD) |
85 | #define PLASMA_QUIT BUTTON_BACK | 82 | #define PLASMA_QUIT BUTTON_BACK |
86 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 83 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
87 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 84 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
88 | |||
89 | #elif (CONFIG_KEYPAD == MROBE100_PAD) | 85 | #elif (CONFIG_KEYPAD == MROBE100_PAD) |
90 | #define PLASMA_QUIT BUTTON_POWER | 86 | #define PLASMA_QUIT BUTTON_POWER |
91 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 87 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
92 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 88 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
93 | |||
94 | #elif (CONFIG_KEYPAD == IAUDIO_M3_PAD) | ||
95 | #define PLASMA_QUIT BUTTON_RC_REC | ||
96 | #define PLASMA_INCREASE_FREQUENCY BUTTON_RC_VOL_UP | ||
97 | #define PLASMA_DECREASE_FREQUENCY BUTTON_RC_VOL_DOWN | ||
98 | #define PLASMA_RC_QUIT BUTTON_REC | ||
99 | |||
100 | #elif (CONFIG_KEYPAD == COWOND2_PAD) | 89 | #elif (CONFIG_KEYPAD == COWOND2_PAD) |
101 | #define PLASMA_QUIT BUTTON_POWER | 90 | #define PLASMA_QUIT BUTTON_POWER |
102 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 91 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
103 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 92 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
104 | |||
105 | #else | 93 | #else |
106 | #define PLASMA_QUIT BUTTON_OFF | 94 | #define PLASMA_QUIT BUTTON_OFF |
107 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP | 95 | #define PLASMA_INCREASE_FREQUENCY BUTTON_UP |
108 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN | 96 | #define PLASMA_DECREASE_FREQUENCY BUTTON_DOWN |
109 | |||
110 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) | 97 | #if (CONFIG_KEYPAD == IRIVER_H100_PAD) || (CONFIG_KEYPAD == IRIVER_H300_PAD) |
111 | #define PLASMA_RC_QUIT BUTTON_RC_STOP | 98 | #define PLASMA_RC_QUIT BUTTON_RC_STOP |
112 | #endif | 99 | #endif |
diff --git a/apps/plugins/test_fps.c b/apps/plugins/test_fps.c index a312c13662..7c86fabdc0 100644 --- a/apps/plugins/test_fps.c +++ b/apps/plugins/test_fps.c | |||
@@ -260,7 +260,7 @@ static void time_remote_update(void) | |||
260 | } | 260 | } |
261 | #endif | 261 | #endif |
262 | 262 | ||
263 | #if LCD_DEPTH < 4 | 263 | #if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) |
264 | 264 | ||
265 | GREY_INFO_STRUCT_IRAM | 265 | GREY_INFO_STRUCT_IRAM |
266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; | 266 | static unsigned char greydata[LCD_HEIGHT][LCD_WIDTH]; |
@@ -357,7 +357,7 @@ enum plugin_status plugin_start(struct plugin_api* api, void* parameter) | |||
357 | log_text("Main LCD YUV"); | 357 | log_text("Main LCD YUV"); |
358 | time_main_yuv(); | 358 | time_main_yuv(); |
359 | #endif | 359 | #endif |
360 | #if LCD_DEPTH < 4 | 360 | #if (LCD_DEPTH < 4) && !defined(IAUDIO_M3) |
361 | log_text("Greyscale library"); | 361 | log_text("Greyscale library"); |
362 | time_greyscale(); | 362 | time_greyscale(); |
363 | #endif | 363 | #endif |
diff --git a/bootloader/ipod.c b/bootloader/ipod.c index bafcb4909d..b3ff7bcedb 100644 --- a/bootloader/ipod.c +++ b/bootloader/ipod.c | |||
@@ -56,49 +56,6 @@ unsigned char *loadbuffer = (unsigned char *)DRAM_START; | |||
56 | /* Bootloader version */ | 56 | /* Bootloader version */ |
57 | char version[] = APPSVERSION; | 57 | char version[] = APPSVERSION; |
58 | 58 | ||
59 | struct sysinfo | ||
60 | { | ||
61 | unsigned IsyS; /* == "IsyS" */ | ||
62 | unsigned len; | ||
63 | char BoardHwName[16]; | ||
64 | char pszSerialNumber[32]; | ||
65 | char pu8FirewireGuid[16]; | ||
66 | unsigned boardHwRev; | ||
67 | unsigned bootLoaderImageRev; | ||
68 | unsigned diskModeImageRev; | ||
69 | unsigned diagImageRev; | ||
70 | unsigned osImageRev; | ||
71 | unsigned iram_perhaps; | ||
72 | unsigned Flsh; | ||
73 | unsigned flash_zero; | ||
74 | unsigned flash_base; | ||
75 | unsigned flash_size; | ||
76 | unsigned flash_zero2; | ||
77 | unsigned Sdrm; | ||
78 | unsigned sdram_zero; | ||
79 | unsigned sdram_base; | ||
80 | unsigned sdram_size; | ||
81 | unsigned sdram_zero2; | ||
82 | unsigned Frwr; | ||
83 | unsigned frwr_zero; | ||
84 | unsigned frwr_base; | ||
85 | unsigned frwr_size; | ||
86 | unsigned frwr_zero2; | ||
87 | unsigned Iram; | ||
88 | unsigned iram_zero; | ||
89 | unsigned iram_base; | ||
90 | unsigned iram_size; | ||
91 | unsigned iram_zero2; | ||
92 | char pad7[120]; | ||
93 | unsigned boardHwSwInterfaceRev; | ||
94 | |||
95 | /* added in V3 */ | ||
96 | char HddFirmwareRev[10]; | ||
97 | unsigned short RegionCode; | ||
98 | unsigned PolicyFlags; | ||
99 | char ModelNumStr[16]; | ||
100 | }; | ||
101 | |||
102 | #define BUTTON_LEFT 1 | 59 | #define BUTTON_LEFT 1 |
103 | #define BUTTON_MENU 2 | 60 | #define BUTTON_MENU 2 |
104 | #define BUTTON_RIGHT 3 | 61 | #define BUTTON_RIGHT 3 |
@@ -263,24 +220,6 @@ void fatal_error(void) | |||
263 | 220 | ||
264 | } | 221 | } |
265 | 222 | ||
266 | static struct sysinfo ** const sysinfo_ptr = | ||
267 | #if CONFIG_CPU == PP5002 || CONFIG_CPU == PP5020 | ||
268 | 0x40017f1c; | ||
269 | #elif CONFIG_CPU == PP5022 || CONFIG_CPU == PP5024 | ||
270 | 0x4001ff1c; | ||
271 | #endif | ||
272 | |||
273 | static unsigned ipod_get_hwrev_sysinfo(void) | ||
274 | { | ||
275 | if ( (*sysinfo_ptr)->IsyS == *(unsigned *)"IsyS" ) | ||
276 | { | ||
277 | if ((*sysinfo_ptr)->len == 0xf8) | ||
278 | return (*sysinfo_ptr)->sdram_zero2; | ||
279 | else | ||
280 | return (*sysinfo_ptr)->boardHwSwInterfaceRev; | ||
281 | } | ||
282 | return 0xffffffff; /* unknown */ | ||
283 | } | ||
284 | 223 | ||
285 | void* main(void) | 224 | void* main(void) |
286 | { | 225 | { |
@@ -331,9 +270,6 @@ void* main(void) | |||
331 | printf("Rockbox boot loader"); | 270 | printf("Rockbox boot loader"); |
332 | printf("Version: %s", version); | 271 | printf("Version: %s", version); |
333 | printf("IPOD version: 0x%08x", IPOD_HW_REVISION); | 272 | printf("IPOD version: 0x%08x", IPOD_HW_REVISION); |
334 | |||
335 | printf("SysI ptr: %08x", *sysinfo_ptr); | ||
336 | printf("SysI HWR: %08x", ipod_get_hwrev_sysinfo()); | ||
337 | 273 | ||
338 | i=ata_init(); | 274 | i=ata_init(); |
339 | if (i==0) { | 275 | if (i==0) { |
diff --git a/firmware/SOURCES b/firmware/SOURCES index 1d60ea1016..0a8ac2a8e3 100644 --- a/firmware/SOURCES +++ b/firmware/SOURCES | |||
@@ -513,7 +513,6 @@ target/coldfire/iaudio/m3/backlight-m3.c | |||
513 | target/coldfire/iaudio/m3/button-m3.c | 513 | target/coldfire/iaudio/m3/button-m3.c |
514 | target/coldfire/iaudio/m3/fmradio_i2c-m3.c | 514 | target/coldfire/iaudio/m3/fmradio_i2c-m3.c |
515 | target/coldfire/iaudio/m3/lcd-m3.c | 515 | target/coldfire/iaudio/m3/lcd-m3.c |
516 | target/coldfire/iaudio/m3/lcd-as-m3.S | ||
517 | target/coldfire/iaudio/m3/power-m3.c | 516 | target/coldfire/iaudio/m3/power-m3.c |
518 | target/coldfire/iaudio/m3/powermgmt-m3.c | 517 | target/coldfire/iaudio/m3/powermgmt-m3.c |
519 | target/coldfire/iaudio/m3/system-m3.c | 518 | target/coldfire/iaudio/m3/system-m3.c |
diff --git a/firmware/backlight.c b/firmware/backlight.c index 4c4471ace6..0f66fbf574 100644 --- a/firmware/backlight.c +++ b/firmware/backlight.c | |||
@@ -468,7 +468,7 @@ void backlight_thread(void) | |||
468 | lcd_remote_off(); | 468 | lcd_remote_off(); |
469 | break; | 469 | break; |
470 | #elif defined HAVE_REMOTE_LCD_AS_MAIN | 470 | #elif defined HAVE_REMOTE_LCD_AS_MAIN |
471 | case SYS_REMOTE_PLUGGED: | 471 | case SYS_REMOTE_PLUGGED: |
472 | lcd_on(); | 472 | lcd_on(); |
473 | lcd_update(); | 473 | lcd_update(); |
474 | break; | 474 | break; |
diff --git a/firmware/export/config-player.h b/firmware/export/config-player.h index c69fe8cfcb..b9e3035951 100644 --- a/firmware/export/config-player.h +++ b/firmware/export/config-player.h | |||
@@ -46,7 +46,7 @@ | |||
46 | 46 | ||
47 | /* Uncomment this if you want to enable ATA power-off control. | 47 | /* Uncomment this if you want to enable ATA power-off control. |
48 | * Attention, some players crash when ATA power-off is enabled! */ | 48 | * Attention, some players crash when ATA power-off is enabled! */ |
49 | #define HAVE_ATA_POWER_OFF | 49 | //#define HAVE_ATA_POWER_OFF |
50 | 50 | ||
51 | /* Define this if you control ata power player style | 51 | /* Define this if you control ata power player style |
52 | (with PB4, new player only) */ | 52 | (with PB4, new player only) */ |
diff --git a/firmware/export/id3.h b/firmware/export/id3.h index 267f1b4afa..bb3b6a6fe5 100644 --- a/firmware/export/id3.h +++ b/firmware/export/id3.h | |||
@@ -49,7 +49,6 @@ enum | |||
49 | AFMT_WAVPACK, /* WavPack */ | 49 | AFMT_WAVPACK, /* WavPack */ |
50 | AFMT_ALAC, /* Apple Lossless Audio Codec */ | 50 | AFMT_ALAC, /* Apple Lossless Audio Codec */ |
51 | AFMT_AAC, /* Advanced Audio Coding (AAC) in M4A container */ | 51 | AFMT_AAC, /* Advanced Audio Coding (AAC) in M4A container */ |
52 | AFMT_MOD, /* MOD File Format */ | ||
53 | AFMT_SHN, /* Shorten */ | 52 | AFMT_SHN, /* Shorten */ |
54 | AFMT_SID, /* SID File Format */ | 53 | AFMT_SID, /* SID File Format */ |
55 | AFMT_ADX, /* ADX File Format */ | 54 | AFMT_ADX, /* ADX File Format */ |
diff --git a/firmware/id3.c b/firmware/id3.c index 87b4ce9d31..f594528910 100644 --- a/firmware/id3.c +++ b/firmware/id3.c | |||
@@ -90,9 +90,6 @@ const struct afmt_entry audio_formats[AFMT_NUM_CODECS] = | |||
90 | [AFMT_AAC] = | 90 | [AFMT_AAC] = |
91 | AFMT_ENTRY("AAC", "aac", NULL, "mp4\0" ), | 91 | AFMT_ENTRY("AAC", "aac", NULL, "mp4\0" ), |
92 | /* Shorten */ | 92 | /* Shorten */ |
93 | [AFMT_MOD] = | ||
94 | AFMT_ENTRY("MOD", "mod", NULL, "mod\0" ), | ||
95 | /* Shorten */ | ||
96 | [AFMT_SHN] = | 93 | [AFMT_SHN] = |
97 | AFMT_ENTRY("SHN", "shorten", NULL, "shn\0" ), | 94 | AFMT_ENTRY("SHN", "shorten", NULL, "shn\0" ), |
98 | /* SID File Format */ | 95 | /* SID File Format */ |
diff --git a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c index 669654f5c3..5b022e09c5 100644 --- a/firmware/target/arm/iriver/h10/lcd-h10_5gb.c +++ b/firmware/target/arm/iriver/h10/lcd-h10_5gb.c | |||
@@ -108,7 +108,6 @@ void lcd_init_device(void) | |||
108 | { | 108 | { |
109 | CLCD_CLOCK_SRC |= 0xc0000000; /* Set LCD interface clock to PLL */ | 109 | CLCD_CLOCK_SRC |= 0xc0000000; /* Set LCD interface clock to PLL */ |
110 | /* H10 LCD is initialised by the bootloader */ | 110 | /* H10 LCD is initialised by the bootloader */ |
111 | lcd_write_reg(R_ENTRY_MODE, 0x1030); /* BGR =1, ID1 = 1, ID0 = 1 */ | ||
112 | } | 111 | } |
113 | 112 | ||
114 | /*** update functions ***/ | 113 | /*** update functions ***/ |
@@ -276,51 +275,88 @@ void lcd_blit_yuv(unsigned char * const src[3], | |||
276 | 275 | ||
277 | 276 | ||
278 | /* Update a fraction of the display. */ | 277 | /* Update a fraction of the display. */ |
279 | void lcd_update_rect(int x, int y, int width, int height) | 278 | void lcd_update_rect(int x0, int y0, int width, int height) |
280 | { | 279 | { |
281 | const fb_data *addr; | 280 | int x1, y1; |
282 | int bytes_to_write; | 281 | int newx,newwidth; |
283 | 282 | unsigned long *addr; | |
284 | if (x + width >= LCD_WIDTH) | ||
285 | width = LCD_WIDTH - x; | ||
286 | if (y + height >= LCD_HEIGHT) | ||
287 | height = LCD_HEIGHT - y; | ||
288 | |||
289 | if ((width <= 0) || (height <= 0)) | ||
290 | return; /* Nothing left to do. 0 would hang the transfer. */ | ||
291 | |||
292 | /* Ensure x and width are both even, so we can read | ||
293 | * 32-bit aligned data from the framebuffer */ | ||
294 | width = (width + (x & 1) + 1) & ~1; | ||
295 | x &= ~1; | ||
296 | |||
297 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (LCD_HEIGHT-1) << 8); | ||
298 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, ((x + width - 1) << 8) | x); | ||
299 | lcd_write_reg(R_RAM_ADDR_SET, (y << 8) | x); | ||
300 | 283 | ||
284 | /* Ensure x and width are both even - so we can read 32-bit aligned | ||
285 | data from lcd_framebuffer */ | ||
286 | newx=x0&~1; | ||
287 | newwidth=width&~1; | ||
288 | if (newx+newwidth < x0+width) { newwidth+=2; } | ||
289 | x0=newx; width=newwidth; | ||
290 | |||
291 | /* calculate the drawing region */ | ||
292 | y1 = (y0 + height) - 1; /* max vert */ | ||
293 | x1 = (x0 + width) - 1; /* max horiz */ | ||
294 | |||
295 | |||
296 | /* swap max horiz < start horiz */ | ||
297 | if (y1 < y0) { | ||
298 | int t; | ||
299 | t = y0; | ||
300 | y0 = y1; | ||
301 | y1 = t; | ||
302 | } | ||
303 | |||
304 | /* swap max vert < start vert */ | ||
305 | if (x1 < x0) { | ||
306 | int t; | ||
307 | t = x0; | ||
308 | x0 = x1; | ||
309 | x1 = t; | ||
310 | } | ||
311 | |||
312 | /* max horiz << 8 | start horiz */ | ||
313 | lcd_write_reg(R_HORIZ_RAM_ADDR_POS, (x1 << 8) | x0); | ||
314 | |||
315 | /* max vert << 8 | start vert */ | ||
316 | lcd_write_reg(R_VERT_RAM_ADDR_POS, (y1 << 8) | y0); | ||
317 | |||
318 | /* start vert << 8 | start horiz */ | ||
319 | lcd_write_reg(R_RAM_ADDR_SET, (y0 << 8) | x0); | ||
320 | |||
321 | /* start drawing */ | ||
301 | lcd_send_cmd(R_WRITE_DATA_2_GRAM); | 322 | lcd_send_cmd(R_WRITE_DATA_2_GRAM); |
302 | 323 | ||
303 | addr = &lcd_framebuffer[y][x]; | 324 | addr = (unsigned long*)&lcd_framebuffer[y0][x0]; |
304 | bytes_to_write = width * height * sizeof(fb_data); | ||
305 | /* must be <= 0x10000, but that's guaranteed on H10. */ | ||
306 | 325 | ||
307 | LCD2_BLOCK_CTRL = 0x10000080; | 326 | while (height > 0) { |
308 | LCD2_BLOCK_CONFIG = 0xc0010000 | (bytes_to_write - 1); | 327 | int c, r; |
309 | LCD2_BLOCK_CTRL = 0x34000000; | 328 | int h, pixels_to_write; |
310 | 329 | ||
311 | do | 330 | pixels_to_write = (width * height) * 2; |
312 | { | 331 | h = height; |
313 | int w = width >> 1; | 332 | |
314 | do | 333 | /* calculate how much we can do in one go */ |
315 | { | 334 | if (pixels_to_write > 0x10000) { |
316 | while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_TXOK)); | 335 | h = (0x10000/2) / width; |
317 | LCD2_BLOCK_DATA = *(unsigned long*)addr; /* output 2 pixels */ | 336 | pixels_to_write = (width * h) * 2; |
318 | addr += 2; | ||
319 | } | 337 | } |
320 | while (--w > 0); | 338 | |
321 | addr += LCD_WIDTH - width; | 339 | LCD2_BLOCK_CTRL = 0x10000080; |
340 | LCD2_BLOCK_CONFIG = 0xc0010000 | (pixels_to_write - 1); | ||
341 | LCD2_BLOCK_CTRL = 0x34000000; | ||
342 | |||
343 | /* for each row */ | ||
344 | for (r = 0; r < h; r++) { | ||
345 | /* for each column */ | ||
346 | for (c = 0; c < width; c += 2) { | ||
347 | while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_TXOK)); | ||
348 | |||
349 | /* output 2 pixels */ | ||
350 | LCD2_BLOCK_DATA = *addr++; | ||
351 | } | ||
352 | addr += (LCD_WIDTH - width)/2; | ||
353 | } | ||
354 | |||
355 | while (!(LCD2_BLOCK_CTRL & LCD2_BLOCK_READY)); | ||
356 | LCD2_BLOCK_CONFIG = 0; | ||
357 | |||
358 | height -= h; | ||
322 | } | 359 | } |
323 | while (--height > 0); | ||
324 | } | 360 | } |
325 | 361 | ||
326 | /* Update the display. | 362 | /* Update the display. |
diff --git a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c index 6565d3088d..5a03dc6180 100644 --- a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c +++ b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c | |||
@@ -64,106 +64,83 @@ bool remote_initialized = false; | |||
64 | static inline void _write_byte(unsigned data) | 64 | static inline void _write_byte(unsigned data) |
65 | { | 65 | { |
66 | asm volatile ( | 66 | asm volatile ( |
67 | "move.w %%sr,%%d2 \n" /* Get current interrupt level */ | 67 | "move.l (%[gpo0]), %%d0 \n" /* Get current state of data line */ |
68 | "move.w #0x2700,%%sr \n" /* Disable interrupts */ | 68 | "and.l %[dbit], %%d0 \n" |
69 | |||
70 | "move.l (%[gpo0]), %%d0 \n" /* Get current state of data port */ | ||
71 | "move.l %%d0, %%d1 \n" | ||
72 | "and.l %[dbit], %%d1 \n" /* Check current state of data line */ | ||
73 | "beq.s 1f \n" /* and set it as previous-state bit */ | 69 | "beq.s 1f \n" /* and set it as previous-state bit */ |
74 | "bset #8, %[data] \n" | 70 | "bset #8, %[data] \n" |
75 | "1: \n" | 71 | "1: \n" |
76 | "move.l %[data], %%d1 \n" /* Compute the 'bit derivative', i.e. a value */ | 72 | "move.l %[data], %%d0 \n" /* Compute the 'bit derivative', i.e. a value */ |
77 | "lsr.l #1, %%d1 \n" /* with 1's where the data changes from the */ | 73 | "lsr.l #1, %%d0 \n" /* with 1's where the data changes from the */ |
78 | "eor.l %%d1, %[data] \n" /* previous state, and 0's where it doesn't */ | 74 | "eor.l %%d0, %[data] \n" /* previous state, and 0's where it doesn't */ |
79 | "swap %[data] \n" /* Shift data to upper byte */ | 75 | "swap %[data] \n" /* Shift data to upper byte */ |
80 | "lsl.l #8, %[data] \n" | 76 | "lsl.l #8, %[data] \n" |
81 | 77 | ||
82 | "eor.l %[cbit], %%d0 \n" /* precalculate opposite state of clock line */ | 78 | "move.l %[cbit], %%d1 \n" /* Prepare mask for flipping CLK */ |
83 | 79 | "or.l %[dbit], %%d1 \n" /* and DATA at once */ | |
80 | |||
84 | "lsl.l #1,%[data] \n" /* Shift out MSB */ | 81 | "lsl.l #1,%[data] \n" /* Shift out MSB */ |
85 | "bcc.s 1f \n" | 82 | "bcc.s 1f \n" |
86 | "eor.l %[dbit], %%d0 \n" /* 1: Flip data bit */ | 83 | "eor.l %%d1, (%[gpo0]) \n" /* 1: Flip both CLK and DATA */ |
84 | ".word 0x51fa \n" /* (trapf.w - shadow next insn) */ | ||
87 | "1: \n" | 85 | "1: \n" |
88 | "move.l %%d0, %%d1 \n" | 86 | "eor.l %[cbit], (%[gpo0]) \n" /* else flip CLK only */ |
89 | "move.l %%d0, (%[gpo0]) \n" /* Output new state and set CLK = 0*/ | 87 | "eor.l %[cbit], (%[gpo0]) \n" /* Flip CLK again */ |
90 | "eor.l %[cbit], %%d1 \n" | ||
91 | "nop \n" | ||
92 | 88 | ||
93 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 89 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ |
94 | "bcc.s 1f \n" | 90 | "bcc.s 1f \n" |
95 | "eor.l %[dbit], %%d0 \n" | 91 | "eor.l %%d1, (%[gpo0]) \n" |
92 | ".word 0x51fa \n" | ||
96 | "1: \n" | 93 | "1: \n" |
97 | "move.l %%d1, (%[gpo0]) \n" /* set CLK = 1 (delayed) */ | 94 | "eor.l %[cbit], (%[gpo0]) \n" |
98 | "move.l %%d0, %%d1 \n" | 95 | "eor.l %[cbit], (%[gpo0]) \n" |
99 | "move.l %%d0, (%[gpo0]) \n" | ||
100 | "eor.l %[cbit], %%d1 \n" | ||
101 | "nop \n" | ||
102 | 96 | ||
103 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 97 | "lsl.l #1,%[data] \n" |
104 | "bcc.s 1f \n" | 98 | "bcc.s 1f \n" |
105 | "eor.l %[dbit], %%d0 \n" | 99 | "eor.l %%d1, (%[gpo0]) \n" |
100 | ".word 0x51fa \n" | ||
106 | "1: \n" | 101 | "1: \n" |
107 | "move.l %%d1, (%[gpo0]) \n" | 102 | "eor.l %[cbit], (%[gpo0]) \n" |
108 | "move.l %%d0, %%d1 \n" | 103 | "eor.l %[cbit], (%[gpo0]) \n" |
109 | "move.l %%d0, (%[gpo0]) \n" | ||
110 | "eor.l %[cbit], %%d1 \n" | ||
111 | "nop \n" | ||
112 | 104 | ||
113 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 105 | "lsl.l #1,%[data] \n" |
114 | "bcc.s 1f \n" | 106 | "bcc.s 1f \n" |
115 | "eor.l %[dbit], %%d0 \n" | 107 | "eor.l %%d1, (%[gpo0]) \n" |
108 | ".word 0x51fa \n" | ||
116 | "1: \n" | 109 | "1: \n" |
117 | "move.l %%d1, (%[gpo0]) \n" | 110 | "eor.l %[cbit], (%[gpo0]) \n" |
118 | "move.l %%d0, %%d1 \n" | 111 | "eor.l %[cbit], (%[gpo0]) \n" |
119 | "move.l %%d0, (%[gpo0]) \n" | ||
120 | "eor.l %[cbit], %%d1 \n" | ||
121 | "nop \n" | ||
122 | 112 | ||
123 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 113 | "lsl.l #1,%[data] \n" |
124 | "bcc.s 1f \n" | 114 | "bcc.s 1f \n" |
125 | "eor.l %[dbit], %%d0 \n" | 115 | "eor.l %%d1, (%[gpo0]) \n" |
116 | ".word 0x51fa \n" | ||
126 | "1: \n" | 117 | "1: \n" |
127 | "move.l %%d1, (%[gpo0]) \n" | 118 | "eor.l %[cbit], (%[gpo0]) \n" |
128 | "move.l %%d0, %%d1 \n" | 119 | "eor.l %[cbit], (%[gpo0]) \n" |
129 | "move.l %%d0, (%[gpo0]) \n" | ||
130 | "eor.l %[cbit], %%d1 \n" | ||
131 | "nop \n" | ||
132 | 120 | ||
133 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 121 | "lsl.l #1,%[data] \n" |
134 | "bcc.s 1f \n" | 122 | "bcc.s 1f \n" |
135 | "eor.l %[dbit], %%d0 \n" | 123 | "eor.l %%d1, (%[gpo0]) \n" |
124 | ".word 0x51fa \n" | ||
136 | "1: \n" | 125 | "1: \n" |
137 | "move.l %%d1, (%[gpo0]) \n" | 126 | "eor.l %[cbit], (%[gpo0]) \n" |
138 | "move.l %%d0, %%d1 \n" | 127 | "eor.l %[cbit], (%[gpo0]) \n" |
139 | "move.l %%d0, (%[gpo0]) \n" | ||
140 | "eor.l %[cbit], %%d1 \n" | ||
141 | "nop \n" | ||
142 | 128 | ||
143 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 129 | "lsl.l #1,%[data] \n" |
144 | "bcc.s 1f \n" | 130 | "bcc.s 1f \n" |
145 | "eor.l %[dbit], %%d0 \n" | 131 | "eor.l %%d1, (%[gpo0]) \n" |
132 | ".word 0x51fa \n" | ||
146 | "1: \n" | 133 | "1: \n" |
147 | "move.l %%d1, (%[gpo0]) \n" | 134 | "eor.l %[cbit], (%[gpo0]) \n" |
148 | "move.l %%d0, %%d1 \n" | 135 | "eor.l %[cbit], (%[gpo0]) \n" |
149 | "move.l %%d0, (%[gpo0]) \n" | ||
150 | "eor.l %[cbit], %%d1 \n" | ||
151 | "nop \n" | ||
152 | 136 | ||
153 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | 137 | "lsl.l #1,%[data] \n" |
154 | "bcc.s 1f \n" | 138 | "bcc.s 1f \n" |
155 | "eor.l %[dbit], %%d0 \n" | 139 | "eor.l %%d1, (%[gpo0]) \n" |
140 | ".word 0x51fa \n" | ||
156 | "1: \n" | 141 | "1: \n" |
157 | "move.l %%d1, (%[gpo0]) \n" | 142 | "eor.l %[cbit], (%[gpo0]) \n" |
158 | "move.l %%d0, %%d1 \n" | 143 | "eor.l %[cbit], (%[gpo0]) \n" |
159 | "move.l %%d0, (%[gpo0]) \n" | ||
160 | "eor.l %[cbit], %%d1 \n" | ||
161 | "nop \n" | ||
162 | |||
163 | "nop \n" | ||
164 | "move.l %%d1, (%[gpo0]) \n" /* set CLK = 1 (delayed) */ | ||
165 | |||
166 | "move.w %%d2, %%sr \n" /* Restore interrupt level */ | ||
167 | : /* outputs */ | 144 | : /* outputs */ |
168 | [data]"+d"(data) | 145 | [data]"+d"(data) |
169 | : /* inputs */ | 146 | : /* inputs */ |
@@ -171,7 +148,7 @@ static inline void _write_byte(unsigned data) | |||
171 | [cbit]"d"(0x00004000), | 148 | [cbit]"d"(0x00004000), |
172 | [dbit]"d"(0x00002000) | 149 | [dbit]"d"(0x00002000) |
173 | : /* clobbers */ | 150 | : /* clobbers */ |
174 | "d0", "d1", "d2" | 151 | "d0", "d1" |
175 | ); | 152 | ); |
176 | } | 153 | } |
177 | 154 | ||
@@ -180,7 +157,7 @@ static inline void _write_byte(unsigned data) | |||
180 | static inline void _write_fast(unsigned data) | 157 | static inline void _write_fast(unsigned data) |
181 | { | 158 | { |
182 | asm volatile ( | 159 | asm volatile ( |
183 | "move.w %%sr,%%d2 \n" /* Get current interrupt level */ | 160 | "move.w %%sr,%%d3 \n" /* Get current interrupt level */ |
184 | "move.w #0x2700,%%sr \n" /* Disable interrupts */ | 161 | "move.w #0x2700,%%sr \n" /* Disable interrupts */ |
185 | 162 | ||
186 | "move.l (%[gpo0]), %%d0 \n" /* Get current state of data port */ | 163 | "move.l (%[gpo0]), %%d0 \n" /* Get current state of data port */ |
@@ -262,7 +239,7 @@ static inline void _write_fast(unsigned data) | |||
262 | "move.l %%d1, (%[gpo0]) \n" | 239 | "move.l %%d1, (%[gpo0]) \n" |
263 | "move.l %%d0, (%[gpo0]) \n" | 240 | "move.l %%d0, (%[gpo0]) \n" |
264 | 241 | ||
265 | "move.w %%d2, %%sr \n" /* Restore interrupt level */ | 242 | "move.w %%d3, %%sr \n" /* Restore interrupt level */ |
266 | : /* outputs */ | 243 | : /* outputs */ |
267 | [data]"+d"(data) | 244 | [data]"+d"(data) |
268 | : /* inputs */ | 245 | : /* inputs */ |
@@ -270,7 +247,7 @@ static inline void _write_fast(unsigned data) | |||
270 | [cbit]"d"(0x00004000), | 247 | [cbit]"d"(0x00004000), |
271 | [dbit]"d"(0x00002000) | 248 | [dbit]"d"(0x00002000) |
272 | : /* clobbers */ | 249 | : /* clobbers */ |
273 | "d0", "d1", "d2" | 250 | "d0", "d1", "d2", "d3" |
274 | ); | 251 | ); |
275 | } | 252 | } |
276 | 253 | ||
diff --git a/firmware/target/coldfire/iaudio/m3/button-m3.c b/firmware/target/coldfire/iaudio/m3/button-m3.c index f5d4b59363..ecea221a4c 100644 --- a/firmware/target/coldfire/iaudio/m3/button-m3.c +++ b/firmware/target/coldfire/iaudio/m3/button-m3.c | |||
@@ -116,7 +116,7 @@ int button_read_device(void) | |||
116 | else | 116 | else |
117 | btn |= BUTTON_RC_VOL_DOWN; | 117 | btn |= BUTTON_RC_VOL_DOWN; |
118 | } | 118 | } |
119 | if ((GPIO_READ & 0x80000000) == 0) | 119 | if ((GPIO_READ & 0x80000000) == 0) |
120 | btn |= BUTTON_RC_PLAY; | 120 | btn |= BUTTON_RC_PLAY; |
121 | } | 121 | } |
122 | 122 | ||
diff --git a/firmware/target/coldfire/iaudio/m3/lcd-m3.c b/firmware/target/coldfire/iaudio/m3/lcd-m3.c index 4bc22380f5..ae72832a82 100644 --- a/firmware/target/coldfire/iaudio/m3/lcd-m3.c +++ b/firmware/target/coldfire/iaudio/m3/lcd-m3.c | |||
@@ -61,6 +61,263 @@ static int cached_contrast = DEFAULT_CONTRAST_SETTING; | |||
61 | bool initialized = false; | 61 | bool initialized = false; |
62 | 62 | ||
63 | 63 | ||
64 | /* Standard low-level byte writer. Requires CLK high on entry */ | ||
65 | static inline void _write_byte(unsigned data) | ||
66 | { | ||
67 | asm volatile ( | ||
68 | "move.l (%[gpo0]), %%d0 \n" /* Get current state of data line */ | ||
69 | "and.l %[dbit], %%d0 \n" | ||
70 | "beq.s 1f \n" /* and set it as previous-state bit */ | ||
71 | "bset #8, %[data] \n" | ||
72 | "1: \n" | ||
73 | "move.l %[data], %%d0 \n" /* Compute the 'bit derivative', i.e. a value */ | ||
74 | "lsr.l #1, %%d0 \n" /* with 1's where the data changes from the */ | ||
75 | "eor.l %%d0, %[data] \n" /* previous state, and 0's where it doesn't */ | ||
76 | "swap %[data] \n" /* Shift data to upper byte */ | ||
77 | "lsl.l #8, %[data] \n" | ||
78 | |||
79 | "move.l %[cbit], %%d1 \n" /* Prepare mask for flipping CLK */ | ||
80 | "or.l %[dbit], %%d1 \n" /* and DATA at once */ | ||
81 | |||
82 | "lsl.l #1,%[data] \n" /* Shift out MSB */ | ||
83 | "bcc.s 1f \n" | ||
84 | "eor.l %%d1, (%[gpo0]) \n" /* 1: Flip both CLK and DATA */ | ||
85 | ".word 0x51fa \n" /* (trapf.w - shadow next insn) */ | ||
86 | "1: \n" | ||
87 | "eor.l %[cbit], (%[gpo0]) \n" /* else flip CLK only */ | ||
88 | "eor.l %[cbit], (%[gpo0]) \n" /* Flip CLK again */ | ||
89 | |||
90 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | ||
91 | "bcc.s 1f \n" | ||
92 | "eor.l %%d1, (%[gpo0]) \n" | ||
93 | ".word 0x51fa \n" | ||
94 | "1: \n" | ||
95 | "eor.l %[cbit], (%[gpo0]) \n" | ||
96 | "eor.l %[cbit], (%[gpo0]) \n" | ||
97 | |||
98 | "lsl.l #1,%[data] \n" | ||
99 | "bcc.s 1f \n" | ||
100 | "eor.l %%d1, (%[gpo0]) \n" | ||
101 | ".word 0x51fa \n" | ||
102 | "1: \n" | ||
103 | "eor.l %[cbit], (%[gpo0]) \n" | ||
104 | "eor.l %[cbit], (%[gpo0]) \n" | ||
105 | |||
106 | "lsl.l #1,%[data] \n" | ||
107 | "bcc.s 1f \n" | ||
108 | "eor.l %%d1, (%[gpo0]) \n" | ||
109 | ".word 0x51fa \n" | ||
110 | "1: \n" | ||
111 | "eor.l %[cbit], (%[gpo0]) \n" | ||
112 | "eor.l %[cbit], (%[gpo0]) \n" | ||
113 | |||
114 | "lsl.l #1,%[data] \n" | ||
115 | "bcc.s 1f \n" | ||
116 | "eor.l %%d1, (%[gpo0]) \n" | ||
117 | ".word 0x51fa \n" | ||
118 | "1: \n" | ||
119 | "eor.l %[cbit], (%[gpo0]) \n" | ||
120 | "eor.l %[cbit], (%[gpo0]) \n" | ||
121 | |||
122 | "lsl.l #1,%[data] \n" | ||
123 | "bcc.s 1f \n" | ||
124 | "eor.l %%d1, (%[gpo0]) \n" | ||
125 | ".word 0x51fa \n" | ||
126 | "1: \n" | ||
127 | "eor.l %[cbit], (%[gpo0]) \n" | ||
128 | "eor.l %[cbit], (%[gpo0]) \n" | ||
129 | |||
130 | "lsl.l #1,%[data] \n" | ||
131 | "bcc.s 1f \n" | ||
132 | "eor.l %%d1, (%[gpo0]) \n" | ||
133 | ".word 0x51fa \n" | ||
134 | "1: \n" | ||
135 | "eor.l %[cbit], (%[gpo0]) \n" | ||
136 | "eor.l %[cbit], (%[gpo0]) \n" | ||
137 | |||
138 | "lsl.l #1,%[data] \n" | ||
139 | "bcc.s 1f \n" | ||
140 | "eor.l %%d1, (%[gpo0]) \n" | ||
141 | ".word 0x51fa \n" | ||
142 | "1: \n" | ||
143 | "eor.l %[cbit], (%[gpo0]) \n" | ||
144 | "eor.l %[cbit], (%[gpo0]) \n" | ||
145 | : /* outputs */ | ||
146 | [data]"+d"(data) | ||
147 | : /* inputs */ | ||
148 | [gpo0]"a"(&GPIO_OUT), | ||
149 | [cbit]"d"(0x20000000), | ||
150 | [dbit]"d"(0x04000000) | ||
151 | : /* clobbers */ | ||
152 | "d0", "d1" | ||
153 | ); | ||
154 | } | ||
155 | |||
156 | /* Fast low-level byte writer. Don't use with high CPU clock. | ||
157 | * Requires CLK high on entry */ | ||
158 | static inline void _write_fast(unsigned data) | ||
159 | { | ||
160 | asm volatile ( | ||
161 | "move.w %%sr,%%d3 \n" /* Get current interrupt level */ | ||
162 | "move.w #0x2700,%%sr \n" /* Disable interrupts */ | ||
163 | |||
164 | "move.l (%[gpo0]), %%d0 \n" /* Get current state of data port */ | ||
165 | "move.l %%d0, %%d1 \n" | ||
166 | "and.l %[dbit], %%d1 \n" /* Check current state of data line */ | ||
167 | "beq.s 1f \n" /* and set it as previous-state bit */ | ||
168 | "bset #8, %[data] \n" | ||
169 | "1: \n" | ||
170 | "move.l %[data], %%d1 \n" /* Compute the 'bit derivative', i.e. a value */ | ||
171 | "lsr.l #1, %%d1 \n" /* with 1's where the data changes from the */ | ||
172 | "eor.l %%d1, %[data] \n" /* previous state, and 0's where it doesn't */ | ||
173 | "swap %[data] \n" /* Shift data to upper byte */ | ||
174 | "lsl.l #8, %[data] \n" | ||
175 | |||
176 | "move.l %%d0, %%d1 \n" /* precalculate opposite state of clock line */ | ||
177 | "eor.l %[cbit], %%d1 \n" | ||
178 | |||
179 | "lsl.l #1,%[data] \n" /* Shift out MSB */ | ||
180 | "bcc.s 1f \n" | ||
181 | "eor.l %[dbit], %%d0 \n" /* 1: Flip data bit */ | ||
182 | "eor.l %[dbit], %%d1 \n" /* for both clock states */ | ||
183 | "1: \n" | ||
184 | "move.l %%d1, (%[gpo0]) \n" /* Output new state and set CLK */ | ||
185 | "move.l %%d0, (%[gpo0]) \n" /* reset CLK */ | ||
186 | |||
187 | "lsl.l #1,%[data] \n" /* ..unrolled.. */ | ||
188 | "bcc.s 1f \n" | ||
189 | "eor.l %[dbit], %%d0 \n" | ||
190 | "eor.l %[dbit], %%d1 \n" | ||
191 | "1: \n" | ||
192 | "move.l %%d1, (%[gpo0]) \n" | ||
193 | "move.l %%d0, (%[gpo0]) \n" | ||
194 | |||
195 | "lsl.l #1,%[data] \n" | ||
196 | "bcc.s 1f \n" | ||
197 | "eor.l %[dbit], %%d0 \n" | ||
198 | "eor.l %[dbit], %%d1 \n" | ||
199 | "1: \n" | ||
200 | "move.l %%d1, (%[gpo0]) \n" | ||
201 | "move.l %%d0, (%[gpo0]) \n" | ||
202 | |||
203 | "lsl.l #1,%[data] \n" | ||
204 | "bcc.s 1f \n" | ||
205 | "eor.l %[dbit], %%d0 \n" | ||
206 | "eor.l %[dbit], %%d1 \n" | ||
207 | "1: \n" | ||
208 | "move.l %%d1, (%[gpo0]) \n" | ||
209 | "move.l %%d0, (%[gpo0]) \n" | ||
210 | |||
211 | "lsl.l #1,%[data] \n" | ||
212 | "bcc.s 1f \n" | ||
213 | "eor.l %[dbit], %%d0 \n" | ||
214 | "eor.l %[dbit], %%d1 \n" | ||
215 | "1: \n" | ||
216 | "move.l %%d1, (%[gpo0]) \n" | ||
217 | "move.l %%d0, (%[gpo0]) \n" | ||
218 | |||
219 | "lsl.l #1,%[data] \n" | ||
220 | "bcc.s 1f \n" | ||
221 | "eor.l %[dbit], %%d0 \n" | ||
222 | "eor.l %[dbit], %%d1 \n" | ||
223 | "1: \n" | ||
224 | "move.l %%d1, (%[gpo0]) \n" | ||
225 | "move.l %%d0, (%[gpo0]) \n" | ||
226 | |||
227 | "lsl.l #1,%[data] \n" | ||
228 | "bcc.s 1f \n" | ||
229 | "eor.l %[dbit], %%d0 \n" | ||
230 | "eor.l %[dbit], %%d1 \n" | ||
231 | "1: \n" | ||
232 | "move.l %%d1, (%[gpo0]) \n" | ||
233 | "move.l %%d0, (%[gpo0]) \n" | ||
234 | |||
235 | "lsl.l #1,%[data] \n" | ||
236 | "bcc.s 1f \n" | ||
237 | "eor.l %[dbit], %%d0 \n" | ||
238 | "eor.l %[dbit], %%d1 \n" | ||
239 | "1: \n" | ||
240 | "move.l %%d1, (%[gpo0]) \n" | ||
241 | "move.l %%d0, (%[gpo0]) \n" | ||
242 | |||
243 | "move.w %%d3, %%sr \n" /* Restore interrupt level */ | ||
244 | : /* outputs */ | ||
245 | [data]"+d"(data) | ||
246 | : /* inputs */ | ||
247 | [gpo0]"a"(&GPIO_OUT), | ||
248 | [cbit]"d"(0x20000000), | ||
249 | [dbit]"d"(0x04000000) | ||
250 | : /* clobbers */ | ||
251 | "d0", "d1", "d2", "d3" | ||
252 | ); | ||
253 | } | ||
254 | |||
255 | void lcd_write_command(int cmd) | ||
256 | { | ||
257 | RS_LO; | ||
258 | CS_LO; | ||
259 | _write_byte(cmd); | ||
260 | CS_HI; | ||
261 | } | ||
262 | |||
263 | void lcd_write_command_e(int cmd, int data) | ||
264 | { | ||
265 | RS_LO; | ||
266 | CS_LO; | ||
267 | _write_byte(cmd); | ||
268 | _write_byte(data); | ||
269 | CS_HI; | ||
270 | } | ||
271 | |||
272 | void lcd_write_data(const fb_data *p_words, int count) | ||
273 | { | ||
274 | const unsigned char *p_bytes = (const unsigned char *)p_words; | ||
275 | const unsigned char *p_end = (const unsigned char *)(p_words + count); | ||
276 | |||
277 | RS_HI; | ||
278 | CS_LO; | ||
279 | if (cpu_frequency < 50000000) | ||
280 | { | ||
281 | while (p_bytes < p_end) | ||
282 | _write_fast(*p_bytes++); | ||
283 | } | ||
284 | else | ||
285 | { | ||
286 | while (p_bytes < p_end) | ||
287 | _write_byte(*p_bytes++); | ||
288 | } | ||
289 | CS_HI; | ||
290 | } | ||
291 | |||
292 | static void lcd_mono_data(const unsigned char *p_words, int count) | ||
293 | { | ||
294 | unsigned data; | ||
295 | const unsigned char *p_bytes = p_words; | ||
296 | const unsigned char *p_end = p_words + count; | ||
297 | |||
298 | RS_HI; | ||
299 | CS_LO; | ||
300 | if (cpu_frequency < 50000000) | ||
301 | { | ||
302 | while (p_bytes < p_end) | ||
303 | { | ||
304 | data = *p_bytes++; | ||
305 | _write_fast(data); | ||
306 | _write_fast(data); | ||
307 | } | ||
308 | } | ||
309 | else | ||
310 | { | ||
311 | while (p_bytes < p_end) | ||
312 | { | ||
313 | data = *p_bytes++; | ||
314 | _write_byte(data); | ||
315 | _write_byte(data); | ||
316 | } | ||
317 | } | ||
318 | CS_HI; | ||
319 | } | ||
320 | |||
64 | int lcd_default_contrast(void) | 321 | int lcd_default_contrast(void) |
65 | { | 322 | { |
66 | return DEFAULT_CONTRAST_SETTING; | 323 | return DEFAULT_CONTRAST_SETTING; |
@@ -200,9 +457,6 @@ void lcd_init_device(void) | |||
200 | #endif | 457 | #endif |
201 | } | 458 | } |
202 | 459 | ||
203 | /* Helper function. */ | ||
204 | void lcd_mono_data(const unsigned char *data, int count); | ||
205 | |||
206 | /* Performance function that works with an external buffer | 460 | /* Performance function that works with an external buffer |
207 | note that by and bheight are in 8-pixel units! */ | 461 | note that by and bheight are in 8-pixel units! */ |
208 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, | 462 | void lcd_blit_mono(const unsigned char *data, int x, int by, int width, |
@@ -223,28 +477,20 @@ void lcd_blit_mono(const unsigned char *data, int x, int by, int width, | |||
223 | } | 477 | } |
224 | } | 478 | } |
225 | 479 | ||
226 | /* Helper function for lcd_grey_phase_blit(). */ | 480 | /* TODO: implement grey blit function */ |
227 | void lcd_grey_data(unsigned char *values, unsigned char *phases, int count); | ||
228 | 481 | ||
229 | /* Performance function that works with an external buffer | 482 | /* Performance function that works with an external buffer |
230 | note that by and bheight are in 8-pixel units! */ | 483 | note that by and bheight are in 8-pixel units! */ |
231 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, | 484 | void lcd_blit_grey_phase(unsigned char *values, unsigned char *phases, |
232 | int x, int by, int width, int bheight, int stride) | 485 | int x, int by, int width, int bheight, int stride) |
233 | { | 486 | { |
234 | if (initialized) | 487 | (void)values; |
235 | { | 488 | (void)phases; |
236 | stride <<= 3; /* 8 pixels per block */ | 489 | (void)x; |
237 | while (bheight--) | 490 | (void)by; |
238 | { | 491 | (void)width; |
239 | lcd_write_command(LCD_SET_PAGE | ((by > 5 ? by + 2 : by) & 0xf)); | 492 | (void)bheight; |
240 | lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf); | 493 | (void)stride; |
241 | |||
242 | lcd_grey_data(values, phases, width); | ||
243 | values += stride; | ||
244 | phases += stride; | ||
245 | by++; | ||
246 | } | ||
247 | } | ||
248 | } | 494 | } |
249 | 495 | ||
250 | /* Update the display. | 496 | /* Update the display. |
@@ -255,13 +501,12 @@ void lcd_update(void) | |||
255 | int y; | 501 | int y; |
256 | if (initialized) | 502 | if (initialized) |
257 | { | 503 | { |
258 | for(y = 0;y < LCD_FBHEIGHT;y++) | 504 | for(y = 0;y < LCD_FBHEIGHT;y++) { |
259 | { | ||
260 | /* Copy display bitmap to hardware. | 505 | /* Copy display bitmap to hardware. |
261 | The COM48-COM63 lines are not connected so we have to skip | 506 | The COM48-COM63 lines are not connected so we have to skip |
262 | them. Further, the column address doesn't wrap, so we | 507 | them. Further, the column address doesn't wrap, so we |
263 | have to update one page at a time. */ | 508 | have to update one page at a time. */ |
264 | lcd_write_command(LCD_SET_PAGE | (y > 5 ? y + 2 : y)); | 509 | lcd_write_command(LCD_SET_PAGE | (y>5?y+2:y)); |
265 | lcd_write_command_e(LCD_SET_COLUMN | 0, 0); | 510 | lcd_write_command_e(LCD_SET_COLUMN | 0, 0); |
266 | lcd_write_data(lcd_framebuffer[y], LCD_WIDTH); | 511 | lcd_write_data(lcd_framebuffer[y], LCD_WIDTH); |
267 | } | 512 | } |
@@ -291,7 +536,7 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
291 | COM48-COM63 are not connected, so we need to skip those */ | 536 | COM48-COM63 are not connected, so we need to skip those */ |
292 | for (; y <= ymax; y++) | 537 | for (; y <= ymax; y++) |
293 | { | 538 | { |
294 | lcd_write_command(LCD_SET_PAGE | ((y > 5 ? y + 2 : y) & 0xf)); | 539 | lcd_write_command(LCD_SET_PAGE | ((y > 5?y + 2:y) & 0xf)); |
295 | lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf); | 540 | lcd_write_command_e(LCD_SET_COLUMN | ((x >> 4) & 0xf), x & 0xf); |
296 | 541 | ||
297 | lcd_write_data(&lcd_framebuffer[y][x], width); | 542 | lcd_write_data(&lcd_framebuffer[y][x], width); |
@@ -302,23 +547,19 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
302 | void lcd_set_invert_display(bool yesno) | 547 | void lcd_set_invert_display(bool yesno) |
303 | { | 548 | { |
304 | cached_invert = yesno; | 549 | cached_invert = yesno; |
305 | if (initialized) | 550 | if(initialized) |
306 | lcd_write_command(LCD_REVERSE | yesno); | 551 | lcd_write_command(LCD_REVERSE | yesno); |
307 | } | 552 | } |
308 | 553 | ||
309 | void lcd_set_flip(bool yesno) | 554 | void lcd_set_flip(bool yesno) |
310 | { | 555 | { |
311 | cached_flip = yesno; | 556 | cached_flip = yesno; |
312 | if (initialized) | 557 | if(initialized) { |
313 | { | 558 | if(yesno) { |
314 | if(yesno) | ||
315 | { | ||
316 | lcd_write_command(LCD_SELECT_ADC | 0); | 559 | lcd_write_command(LCD_SELECT_ADC | 0); |
317 | lcd_write_command(LCD_SELECT_SHL | 0); | 560 | lcd_write_command(LCD_SELECT_SHL | 0); |
318 | lcd_write_command_e(LCD_SET_COM0, 16); | 561 | lcd_write_command_e(LCD_SET_COM0, 16); |
319 | } | 562 | } else { |
320 | else | ||
321 | { | ||
322 | lcd_write_command(LCD_SELECT_ADC | 1); | 563 | lcd_write_command(LCD_SELECT_ADC | 1); |
323 | lcd_write_command(LCD_SELECT_SHL | 8); | 564 | lcd_write_command(LCD_SELECT_SHL | 8); |
324 | lcd_write_command_e(LCD_SET_COM0, 0); | 565 | lcd_write_command_e(LCD_SET_COM0, 0); |
diff --git a/wps/cabbiev2/wpsbackdrop-240x320x16.bmp b/wps/cabbiev2/wpsbackdrop-240x320x16.bmp index f57065124b..a9ece0259b 100644 --- a/wps/cabbiev2/wpsbackdrop-240x320x16.bmp +++ b/wps/cabbiev2/wpsbackdrop-240x320x16.bmp | |||
Binary files differ | |||