diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-26 06:53:34 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-10-26 06:53:34 +0000 |
commit | 5cf331717d5bb169f5404e7ef88a6920940f7332 (patch) | |
tree | 3c80f3f02d92ef4c1371b493cc6d7420132dd7eb | |
parent | 4f99fff7688a1311d10c23e0b950ddec62bb1115 (diff) | |
download | rockbox-5cf331717d5bb169f5404e7ef88a6920940f7332.tar.gz rockbox-5cf331717d5bb169f5404e7ef88a6920940f7332.zip |
Ported to iRiver H100
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@5351 a1c6a512-1295-4272-9138-f99709370657
-rwxr-xr-x | firmware/drivers/lcd.S | 54 | ||||
-rw-r--r-- | firmware/export/lcd.h | 1 |
2 files changed, 54 insertions, 1 deletions
diff --git a/firmware/drivers/lcd.S b/firmware/drivers/lcd.S index 3ab993c1d0..c082637f3e 100755 --- a/firmware/drivers/lcd.S +++ b/firmware/drivers/lcd.S | |||
@@ -19,8 +19,9 @@ | |||
19 | ****************************************************************************/ | 19 | ****************************************************************************/ |
20 | 20 | ||
21 | #include "config.h" | 21 | #include "config.h" |
22 | #include "sh7034.h" | 22 | #include "cpu.h" |
23 | 23 | ||
24 | #if CONFIG_CPU == SH7034 | ||
24 | #define LCDR (PBDR_ADDR+1) | 25 | #define LCDR (PBDR_ADDR+1) |
25 | 26 | ||
26 | #ifdef HAVE_LCD_CHARCELLS | 27 | #ifdef HAVE_LCD_CHARCELLS |
@@ -304,4 +305,55 @@ _lcd_write_data: | |||
304 | 305 | ||
305 | .end: | 306 | .end: |
306 | .size _lcd_write_command,.end-_lcd_write_command | 307 | .size _lcd_write_command,.end-_lcd_write_command |
308 | #elif CONFIG_CPU == MCF5249 | ||
309 | .section .icode,"ax",@progbits | ||
310 | |||
311 | .align 2 | ||
312 | .global lcd_write_command | ||
313 | .type lcd_write_command,@function | ||
314 | |||
315 | lcd_write_command: | ||
316 | move.l (4,%sp),%d0 | ||
317 | lea MBAR2,%a1 | ||
318 | move.l #~8,%d1 | ||
319 | and.l %d1,(0xb4,%a1) | ||
320 | move.w %d0,0xf0000000 | ||
321 | rts | ||
322 | |||
323 | .align 2 | ||
324 | .global lcd_write_command_ex | ||
325 | .type lcd_write_command_ex,@function | ||
307 | 326 | ||
327 | lcd_write_command_ex: | ||
328 | lea MBAR2,%a1 | ||
329 | |||
330 | move.l (4,%sp),%d0 /* Command */ | ||
331 | |||
332 | move.l #~8,%d1 /* Set A0 = 0 */ | ||
333 | and.l %d1,(0xb4,%a1) | ||
334 | move.w %d0,0xf0000000 /* Write to LCD */ | ||
335 | |||
336 | move.l (8,%sp),%d0 /* Data */ | ||
337 | |||
338 | not.l %d1 /* Set A0 = 1 */ | ||
339 | or.l %d1,(0xb4,%a1) | ||
340 | move.w %d0,0xf0000000 /* Write to LCD */ | ||
341 | rts | ||
342 | |||
343 | .align 2 | ||
344 | .global lcd_write_data | ||
345 | .type lcd_write_data,@function | ||
346 | |||
347 | lcd_write_data: | ||
348 | move.l (4,%sp),%a0 /* Data pointer */ | ||
349 | move.l (8,%sp),%d0 /* Length */ | ||
350 | lea MBAR2,%a1 | ||
351 | moveq #8,%d1 | ||
352 | or.l %d1,(0xb4,%a1) | ||
353 | .loop: | ||
354 | move.b (%a0)+,%d1 | ||
355 | move.w %d1,0xf0000000 | ||
356 | subq.l #1,%d0 | ||
357 | bne .loop | ||
358 | rts | ||
359 | #endif | ||
diff --git a/firmware/export/lcd.h b/firmware/export/lcd.h index b78474719a..6809aaf4ae 100644 --- a/firmware/export/lcd.h +++ b/firmware/export/lcd.h | |||
@@ -44,6 +44,7 @@ extern void lcd_scroll_speed( int speed ); | |||
44 | extern void lcd_scroll_delay( int ms ); | 44 | extern void lcd_scroll_delay( int ms ); |
45 | extern void lcd_set_contrast(int val); | 45 | extern void lcd_set_contrast(int val); |
46 | extern void lcd_write_command( int byte ); | 46 | extern void lcd_write_command( int byte ); |
47 | extern void lcd_write_command_ex( int cmd, unsigned char data ); | ||
47 | extern void lcd_write_data( const unsigned char* p_bytes, int count ); | 48 | extern void lcd_write_data( const unsigned char* p_bytes, int count ); |
48 | extern int lcd_default_contrast(void); | 49 | extern int lcd_default_contrast(void); |
49 | 50 | ||