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 /firmware | |
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
Diffstat (limited to 'firmware')
-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 @@ ****************************************************************************/ #include "config.h" -#include "sh7034.h" +#include "cpu.h" +#if CONFIG_CPU == SH7034 #define LCDR (PBDR_ADDR+1) #ifdef HAVE_LCD_CHARCELLS @@ -304,4 +305,55 @@ _lcd_write_data: .end: .size _lcd_write_command,.end-_lcd_write_command +#elif CONFIG_CPU == MCF5249 + .section .icode,"ax",@progbits + + .align 2 + .global lcd_write_command + .type lcd_write_command,@function + +lcd_write_command: + move.l (4,%sp),%d0 + lea MBAR2,%a1 + move.l #~8,%d1 + and.l %d1,(0xb4,%a1) + move.w %d0,0xf0000000 + rts + + .align 2 + .global lcd_write_command_ex + .type lcd_write_command_ex,@function +lcd_write_command_ex: + lea MBAR2,%a1 + + move.l (4,%sp),%d0 /* Command */ + + move.l #~8,%d1 /* Set A0 = 0 */ + and.l %d1,(0xb4,%a1) + move.w %d0,0xf0000000 /* Write to LCD */ + + move.l (8,%sp),%d0 /* Data */ + + not.l %d1 /* Set A0 = 1 */ + or.l %d1,(0xb4,%a1) + move.w %d0,0xf0000000 /* Write to LCD */ + rts + + .align 2 + .global lcd_write_data + .type lcd_write_data,@function + +lcd_write_data: + move.l (4,%sp),%a0 /* Data pointer */ + move.l (8,%sp),%d0 /* Length */ + lea MBAR2,%a1 + moveq #8,%d1 + or.l %d1,(0xb4,%a1) +.loop: + move.b (%a0)+,%d1 + move.w %d1,0xf0000000 + subq.l #1,%d0 + bne .loop + rts +#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 ); extern void lcd_scroll_delay( int ms ); extern void lcd_set_contrast(int val); extern void lcd_write_command( int byte ); +extern void lcd_write_command_ex( int cmd, unsigned char data ); extern void lcd_write_data( const unsigned char* p_bytes, int count ); extern int lcd_default_contrast(void); |