summaryrefslogtreecommitdiff
path: root/firmware
diff options
context:
space:
mode:
Diffstat (limited to 'firmware')
-rw-r--r--firmware/export/config-mrobe500.h2
-rw-r--r--firmware/export/lcd.h7
-rw-r--r--firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c31
3 files changed, 35 insertions, 5 deletions
diff --git a/firmware/export/config-mrobe500.h b/firmware/export/config-mrobe500.h
index 25699bd005..08f8ba07e8 100644
--- a/firmware/export/config-mrobe500.h
+++ b/firmware/export/config-mrobe500.h
@@ -44,6 +44,8 @@
44/* define this if you want album art for this target */ 44/* define this if you want album art for this target */
45//#define HAVE_ALBUMART 45//#define HAVE_ALBUMART
46 46
47#define HAVE_LCD_MODES LCD_MODE_RGB565 | LCD_MODE_YUV | LCD_MODE_PAL256
48
47/* define this if you have access to the quickscreen */ 49/* define this if you have access to the quickscreen */
48#define HAVE_QUICKSCREEN 50#define HAVE_QUICKSCREEN
49 51
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h
index e34fac5d31..4f35927353 100644
--- a/firmware/export/lcd.h
+++ b/firmware/export/lcd.h
@@ -92,6 +92,13 @@ typedef unsigned long fb_data;
92typedef unsigned char fb_data; 92typedef unsigned char fb_data;
93#endif 93#endif
94 94
95#if defined(HAVE_LCD_MODES)
96void lcd_set_mode(int mode);
97#define LCD_MODE_RGB565 0x00000001
98#define LCD_MODE_YUV 0x00000002
99#define LCD_MODE_PAL256 0x00000004
100#endif
101
95/* common functions */ 102/* common functions */
96extern void lcd_write_command(int byte); 103extern void lcd_write_command(int byte);
97extern void lcd_write_command_e(int cmd, int data); 104extern void lcd_write_command_e(int cmd, int data);
diff --git a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
index 0357b469d9..3fa8a7e6c1 100644
--- a/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
+++ b/firmware/target/arm/tms320dm320/mrobe-500/lcd-mr500.c
@@ -256,6 +256,7 @@ void lcd_update(void)
256{ 256{
257 if (!lcd_on) 257 if (!lcd_on)
258 return; 258 return;
259
259#if CONFIG_ORIENTATION == SCREEN_PORTRAIT 260#if CONFIG_ORIENTATION == SCREEN_PORTRAIT
260 lcd_copy_buffer_rect((fb_data *)FRAME, &lcd_framebuffer[0][0], 261 lcd_copy_buffer_rect((fb_data *)FRAME, &lcd_framebuffer[0][0],
261 LCD_WIDTH*LCD_HEIGHT, 1); 262 LCD_WIDTH*LCD_HEIGHT, 1);
@@ -264,6 +265,30 @@ void lcd_update(void)
264#endif 265#endif
265} 266}
266 267
268#if defined(HAVE_LCD_MODES)
269void lcd_set_mode(int mode)
270{
271 if(mode==LCD_MODE_YUV)
272 {
273 /* Turn off the RGB buffer and enable the YUV buffer */
274 IO_OSD_OSDWINMD0&=~(0x01);
275 IO_OSD_VIDWINMD|=0x01;
276 memset16(FRAME, 0x0080, LCD_WIDTH*LCD_HEIGHT);
277 }
278 else if(mode==LCD_MODE_RGB565)
279 {
280 /* Turn on the RGB window and the YUV window off (This should probably be
281 * made into a function).
282 */
283 IO_OSD_OSDWINMD0|=0x01;
284 IO_OSD_VIDWINMD&=~(0x01);
285 }
286 else if(mode==LCD_MODE_PAL256)
287 {
288 }
289}
290#endif
291
267void lcd_blit_yuv(unsigned char * const src[3], 292void lcd_blit_yuv(unsigned char * const src[3],
268 int src_x, int src_y, int stride, 293 int src_x, int src_y, int stride,
269 int x, int y, int width, 294 int x, int y, int width,
@@ -280,13 +305,9 @@ void lcd_blit_yuv(unsigned char * const src[3],
280 unsigned char const * yuv_src[3]; 305 unsigned char const * yuv_src[3];
281 off_t z; 306 off_t z;
282 307
283 /* Turn off the RGB buffer and enable the YUV buffer */
284 IO_OSD_OSDWINMD0&=~(0x01);
285 IO_OSD_VIDWINMD|=0x01;
286
287 if (!lcd_on) 308 if (!lcd_on)
288 return; 309 return;
289 310
290 /* y has to be at multiple of 2 or else it will mess up the HW (interleaving) */ 311 /* y has to be at multiple of 2 or else it will mess up the HW (interleaving) */
291 y &= ~1; 312 y &= ~1;
292 313