diff options
Diffstat (limited to 'firmware/drivers/lcd.c')
-rw-r--r-- | firmware/drivers/lcd.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index aaa93b3385..f7fde506e3 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c | |||
@@ -82,7 +82,7 @@ | |||
82 | * | 82 | * |
83 | */ | 83 | */ |
84 | 84 | ||
85 | void lcd_write(bool command, int byte) __attribute__ ((section (".icode"))); | 85 | //void lcd_write(bool command, int byte) __attribute__ ((section (".icode"))); |
86 | void lcd_write(bool command, int byte) | 86 | void lcd_write(bool command, int byte) |
87 | { | 87 | { |
88 | asm("and.b %0, @(r0,gbr)" | 88 | asm("and.b %0, @(r0,gbr)" |
@@ -191,6 +191,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) | |||
191 | unsigned sda1; /* precalculated SC=low,SD=1 */ | 191 | unsigned sda1; /* precalculated SC=low,SD=1 */ |
192 | unsigned clk0sda0; /* precalculated SC and SD low */ | 192 | unsigned clk0sda0; /* precalculated SC and SD low */ |
193 | 193 | ||
194 | byte = *p_bytes++ << 24; /* fetch to MSB position */ | ||
195 | |||
194 | cli(); /* make port modifications atomic */ | 196 | cli(); /* make port modifications atomic */ |
195 | 197 | ||
196 | /* precalculate the values for later bit toggling, init data write */ | 198 | /* precalculate the values for later bit toggling, init data write */ |
@@ -211,8 +213,6 @@ void lcd_write_data(unsigned char* p_bytes, int count) | |||
211 | /* %5 */ "r"(~LCD_SD) | 213 | /* %5 */ "r"(~LCD_SD) |
212 | ); | 214 | ); |
213 | 215 | ||
214 | byte = *p_bytes++ << 24; /* fetch to MSB position */ | ||
215 | |||
216 | /* unrolled loop to serialize the byte */ | 216 | /* unrolled loop to serialize the byte */ |
217 | asm ( | 217 | asm ( |
218 | "mov %4,r0\n" /* we need &PBDRL in r0 for "or.b x,@(r0,gbr)" */ | 218 | "mov %4,r0\n" /* we need &PBDRL in r0 for "or.b x,@(r0,gbr)" */ |