All pastes #1435302 Raw Edit

Someone

public text v1 · immutable
#1435302 ·published 2009-05-26 19:07 UTC
rendered paste body
Index: firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
===================================================================
--- firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c	(revision 21089)
+++ firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c	(working copy)
@@ -97,9 +97,12 @@
     {
         DBOP_DOUT = *p_bytes++;
 
-        /* Wait for fifo to empty */
-        while ((DBOP_STAT & (1<<10)) == 0);
+        /* Wait if fifo is full */
+        while ((DBOP_STAT & (1<<6)) != 0);
     }
+    
+    /* Wait for fifo to empty */
+    while ((DBOP_STAT & (1<<10)) == 0);
 }
 
 static void lcd_write_reg(int reg, int value)