diff options
author | Bertrik Sikken <bertrik@sikken.nl> | 2009-09-26 10:47:10 +0000 |
---|---|---|
committer | Bertrik Sikken <bertrik@sikken.nl> | 2009-09-26 10:47:10 +0000 |
commit | 66d5bd7cf8c10971578c643c16f72b51df4a1ddf (patch) | |
tree | bea6a03ebfb85b294b7f9826a755f69af3c4e81e | |
parent | 340f32356ae39ba0b2e6fb1a2a7967f2d02e1777 (diff) | |
download | rockbox-66d5bd7cf8c10971578c643c16f72b51df4a1ddf.tar.gz rockbox-66d5bd7cf8c10971578c643c16f72b51df4a1ddf.zip |
Sansa Fuze/e200v2: protect lcd a little better against concurrent access
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22838 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r-- | firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 7 | ||||
-rw-r--r-- | firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | 7 |
2 files changed, 10 insertions, 4 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c index 23b2c3fc4e..35f06eae12 100644 --- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c +++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | |||
@@ -502,9 +502,10 @@ void lcd_update(void) | |||
502 | if (!display_on) | 502 | if (!display_on) |
503 | return; | 503 | return; |
504 | 504 | ||
505 | lcd_busy = true; | ||
506 | |||
505 | lcd_write_reg(R_ENTRY_MODE, r_entry_mode); | 507 | lcd_write_reg(R_ENTRY_MODE, r_entry_mode); |
506 | 508 | ||
507 | lcd_busy = true; | ||
508 | /* Set start position and window */ | 509 | /* Set start position and window */ |
509 | lcd_window(0, 0, LCD_WIDTH-1, LCD_HEIGHT-1); | 510 | lcd_window(0, 0, LCD_WIDTH-1, LCD_HEIGHT-1); |
510 | 511 | ||
@@ -544,8 +545,10 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
544 | if (y >= ymax) | 545 | if (y >= ymax) |
545 | return; /* nothing left to do */ | 546 | return; /* nothing left to do */ |
546 | 547 | ||
547 | lcd_write_reg(R_ENTRY_MODE, r_entry_mode); | ||
548 | lcd_busy = true; | 548 | lcd_busy = true; |
549 | |||
550 | lcd_write_reg(R_ENTRY_MODE, r_entry_mode); | ||
551 | |||
549 | lcd_window(x, y, xmax, ymax); | 552 | lcd_window(x, y, xmax, ymax); |
550 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); | 553 | lcd_write_cmd(R_WRITE_DATA_2_GRAM); |
551 | 554 | ||
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c index a1a2be25d7..d8cec6435b 100644 --- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c +++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | |||
@@ -349,9 +349,11 @@ void lcd_update(void) | |||
349 | { | 349 | { |
350 | if (!display_on) | 350 | if (!display_on) |
351 | return; | 351 | return; |
352 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); | ||
353 | 352 | ||
354 | lcd_busy = true; | 353 | lcd_busy = true; |
354 | |||
355 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); | ||
356 | |||
355 | lcd_window_x(0, LCD_WIDTH - 1); | 357 | lcd_window_x(0, LCD_WIDTH - 1); |
356 | lcd_window_y(0, LCD_HEIGHT - 1); | 358 | lcd_window_y(0, LCD_HEIGHT - 1); |
357 | 359 | ||
@@ -391,9 +393,10 @@ void lcd_update_rect(int x, int y, int width, int height) | |||
391 | if (y >= ymax) | 393 | if (y >= ymax) |
392 | return; /* nothing left to do */ | 394 | return; /* nothing left to do */ |
393 | 395 | ||
396 | lcd_busy = true; | ||
397 | |||
394 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); | 398 | lcd_write_reg(R_ENTRY_MODE, R_ENTRY_MODE_HORZ); |
395 | 399 | ||
396 | lcd_busy = true; | ||
397 | lcd_window_x(x, xmax); | 400 | lcd_window_x(x, xmax); |
398 | lcd_window_y(y, ymax); | 401 | lcd_window_y(y, ymax); |
399 | 402 | ||