summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRafaël Carré <rafael.carre@gmail.com>2010-04-01 08:29:30 +0000
committerRafaël Carré <rafael.carre@gmail.com>2010-04-01 08:29:30 +0000
commit92411e8a96d9658022787530b564ff5926b18387 (patch)
tree43d6e1b2f8abcefdfb499081449c6cc20429f609
parentb79ca5919469efaac3b4b53a545b61f78a2d5315 (diff)
downloadrockbox-92411e8a96d9658022787530b564ff5926b18387.tar.gz
rockbox-92411e8a96d9658022787530b564ff5926b18387.zip
Fuzev2 LCD: replace delays by calls to lcd_delay() (delays not changed)
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@25422 a1c6a512-1295-4272-9138-f99709370657
-rw-r--r--firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
index 7e5b30d122..53d8f73904 100644
--- a/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
+++ b/firmware/target/arm/as3525/sansa-fuzev2/lcd-fuzev2.c
@@ -115,7 +115,6 @@ static void as3525_dbop_init(void)
115 115
116static inline void dbop_set_mode(int mode) 116static inline void dbop_set_mode(int mode)
117{ 117{
118 int delay = 10;
119 unsigned long ctrl = DBOP_CTRL; 118 unsigned long ctrl = DBOP_CTRL;
120 int words = (ctrl >> 13) & 3; // bits 14:13 119 int words = (ctrl >> 13) & 3; // bits 14:13
121 if (mode == 32 && words != 2) 120 if (mode == 32 && words != 2)
@@ -124,7 +123,7 @@ static inline void dbop_set_mode(int mode)
124 DBOP_CTRL = (ctrl & ~(1<<14)) | (1<<13); // 2 serial words 123 DBOP_CTRL = (ctrl & ~(1<<14)) | (1<<13); // 2 serial words
125 else 124 else
126 return; 125 return;
127 while(delay--) asm volatile("nop"); 126 lcd_delay(10);
128} 127}
129 128
130static void dbop_write_data(const int16_t* p_bytes, int count) 129static void dbop_write_data(const int16_t* p_bytes, int count)
@@ -166,7 +165,7 @@ static void dbop_write_data(const int16_t* p_bytes, int count)
166static void lcd_write_cmd(unsigned short cmd) 165static void lcd_write_cmd(unsigned short cmd)
167{ 166{
168 volatile int i; 167 volatile int i;
169 for(i=0;i<0x20;i++) asm volatile ("nop\n"); 168 lcd_delay(0x20);
170 169
171 DBOP_CTRL |= 1<<13; 170 DBOP_CTRL |= 1<<13;
172 DBOP_CTRL &= ~(1<<14); // 2 serial words 171 DBOP_CTRL &= ~(1<<14); // 2 serial words