diff options
author | Rob Purchase <shotofadds@rockbox.org> | 2008-12-01 20:55:33 +0000 |
---|---|---|
committer | Rob Purchase <shotofadds@rockbox.org> | 2008-12-01 20:55:33 +0000 |
commit | 8da8159f74f4c9373b25197e6155c753a00e1f4b (patch) | |
tree | ab52573f5f543a23df57e93779f3149738fff616 /firmware/target/arm/tcc780x | |
parent | e5bf5beaee46e7012ef921bfe73f5a5db75f1dac (diff) | |
download | rockbox-8da8159f74f4c9373b25197e6155c753a00e1f4b.tar.gz rockbox-8da8159f74f4c9373b25197e6155c753a00e1f4b.zip |
D2: Disable IRQs when writing to the LCD 3-wire interface, and re-instate the previous delay value.
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@19292 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/tcc780x')
-rw-r--r-- | firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c index fcb2e7a4a9..d6ee5f3649 100644 --- a/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c +++ b/firmware/target/arm/tcc780x/cowond2/lcd-cowond2.c | |||
@@ -77,7 +77,7 @@ void lcd_set_contrast(int val) | |||
77 | static void delay_loop(void) | 77 | static void delay_loop(void) |
78 | { | 78 | { |
79 | unsigned long x; | 79 | unsigned long x; |
80 | for (x = (unsigned)(FREQ>>24); x; x--); | 80 | for (x = (unsigned)(FREQ>>23); x; x--); |
81 | } | 81 | } |
82 | #define DELAY delay_loop() | 82 | #define DELAY delay_loop() |
83 | 83 | ||
@@ -108,8 +108,12 @@ static void ltv250qv_write(unsigned int command) | |||
108 | 108 | ||
109 | static void lcd_write_reg(unsigned char reg, unsigned short val) | 109 | static void lcd_write_reg(unsigned char reg, unsigned short val) |
110 | { | 110 | { |
111 | int level = disable_irq_save(); | ||
112 | |||
111 | ltv250qv_write(0x740000 | reg); | 113 | ltv250qv_write(0x740000 | reg); |
112 | ltv250qv_write(0x760000 | val); | 114 | ltv250qv_write(0x760000 | val); |
115 | |||
116 | restore_irq(level); | ||
113 | } | 117 | } |
114 | 118 | ||
115 | 119 | ||