summaryrefslogtreecommitdiff
path: root/firmware/target/arm
diff options
context:
space:
mode:
Diffstat (limited to 'firmware/target/arm')
-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