summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c10
-rw-r--r--firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c10
2 files changed, 10 insertions, 10 deletions
diff --git a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
index b19f8ea..23b2c3f 100644
--- a/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
+++ b/firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c
@@ -173,13 +173,13 @@ void lcd_write_data(const fb_data* p_bytes, int count)
/* Wait if push fifo is full */
while ((DBOP_STAT & (1<<6)) != 0);
}
- /* due to the 32bit alignment requirement, we possibly need to do a
- * 16bit transfer at the end also */
- if (count > 0)
- lcd_write_single_data16(*(fb_data*)data);
-
/* While push fifo is not empty */
while ((DBOP_STAT & (1<<10)) == 0);
+
+ /* due to the 32bit alignment requirement or uneven count,
+ * we possibly need to do a 16bit transfer at the end also */
+ if (count > 0)
+ lcd_write_single_data16(*(fb_data*)data);
}
static void lcd_write_reg(int reg, int value)
diff --git a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
index 2b7ce48..b99621b 100644
--- a/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
+++ b/firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c
@@ -119,13 +119,13 @@ void lcd_write_data(const fb_data* p_bytes, int count)
/* Wait if push fifo is full */
while ((DBOP_STAT & (1<<6)) != 0);
}
- /* due to the 32bit alignment requirement, we possibly need to do a
- * 16bit transfer at the end also */
- if (count > 0)
- lcd_write_single_data16(*(fb_data*)data);
-
/* While push fifo is not empty */
while ((DBOP_STAT & (1<<10)) == 0);
+
+ /* due to the 32bit alignment requirement or uneven count,
+ * we possibly need to do a 16bit transfer at the end also */
+ if (count > 0)
+ lcd_write_single_data16(*(fb_data*)data);
}
static void lcd_write_reg(int reg, int value)