diff options
author | Linus Nielsen Feltzing <linus@haxx.se> | 2004-03-02 10:01:26 +0000 |
---|---|---|
committer | Linus Nielsen Feltzing <linus@haxx.se> | 2004-03-02 10:01:26 +0000 |
commit | aa5b23d6162a5ac6cbfc1d871ed9360ffa946c56 (patch) | |
tree | 1794c4afe151ef50305f94f73403576c3063c232 /firmware | |
parent | 68331ffb08a7ea044e68133bc23ee458b9f98bd2 (diff) |
Removed the interrupt disabling in lcd_write_data()
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@4329 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware')
-rw-r--r-- | firmware/drivers/lcd.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/firmware/drivers/lcd.c b/firmware/drivers/lcd.c index 950f8b5057..fa072ac3f5 100644 --- a/firmware/drivers/lcd.c +++ b/firmware/drivers/lcd.c @@ -195,9 +195,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) byte = *p_bytes++ << 24; /* fetch to MSB position */ - /* make port modifications atomic, in case an IRQ uses PBDRL */ - /* (currently not the case, so this could be optimized away) */ - oldlevel = set_irq_level(15); + /* This code will fail if an interrupt changes the contents of PBDRL. + If so, we must disable the interrupt here. */ /* precalculate the values for later bit toggling, init data write */ asm ( @@ -287,7 +286,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) : "r0" ); - set_irq_level(oldlevel); + /* This is the place to reenable the interrupts, if we have disabled + them. See above. */ } while (--count); /* tail loop is faster */ } @@ -306,9 +306,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) the only carry add/sub which does not destroy a source register */ byte = ~(*p_bytes++ << 24); /* fetch to MSB position */ - /* make port modifications atomic, in case an IRQ uses PBDRL */ - /* (currently not the case, so this could be optimized away) */ - oldlevel = set_irq_level(15); + /* This code will fail if an interrupt changes the contents of PBDRL. + If so, we must disable the interrupt here. */ /* precalculate the values for later bit toggling, init data write */ asm ( @@ -390,7 +389,8 @@ void lcd_write_data(unsigned char* p_bytes, int count) "r0" ); - set_irq_level(oldlevel); + /* This is the place to reenable the interrupts, if we have disabled + them. See above. */ } while (--count); /* tail loop is faster */ } |