summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-01 02:06:37 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-01 02:06:37 +0000
commit6f9fde95a58a984d8e6a7f3d0bc7506d3030bf2b (patch)
tree351fc921f753d09b4cf600d8b681abe2e23c4040
parente4345365f18667018dd11cd56cf9106e8ec3c346 (diff)
Move the FIFO emptying up, as having it after lcd_write_single_data16() causes problems with uneven transfers (I'm not sure why).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22581 a1c6a512-1295-4272-9138-f99709370657
-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 b19f8ea65b..23b2c3fc4e 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 2b7ce4888d..b99621b3ac 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)