From 6f9fde95a58a984d8e6a7f3d0bc7506d3030bf2b Mon Sep 17 00:00:00 2001 From: Thomas Martitz Date: Tue, 1 Sep 2009 02:06:37 +0000 Subject: 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 --- firmware/target/arm/as3525/sansa-e200v2/lcd-e200v2.c | 10 +++++----- firmware/target/arm/as3525/sansa-fuze/lcd-fuze.c | 10 +++++----- 2 files changed, 10 insertions(+), 10 deletions(-) (limited to 'firmware/target/arm') 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) -- cgit v1.2.3