summaryrefslogtreecommitdiff
path: root/firmware/target/arm/as3525/button-e200v2-fuze.c
diff options
context:
space:
mode:
authorThomas Martitz <kugel@rockbox.org>2009-09-01 00:42:22 +0000
committerThomas Martitz <kugel@rockbox.org>2009-09-01 00:42:22 +0000
commitb9093b2b35310af1ea28a5a96d036818146783ab (patch)
tree3d01ab19875e7aa78356c4c1ad940abfa4b50cba /firmware/target/arm/as3525/button-e200v2-fuze.c
parentfb65077a18bd2f35b24b049aaa9cfb724a946c27 (diff)
downloadrockbox-b9093b2b35310af1ea28a5a96d036818146783ab.tar.gz
rockbox-b9093b2b35310af1ea28a5a96d036818146783ab.zip
Fuze/e200v2: Speed up the LCD further by letting the FIFO fill until it's full instead of keeping it almost empty.
The blue bars I previously had with this way are fixed by blocking DBOP output while reading buttons from GPIO. We reached the maximum fps even at unboosted now (100.0 fps at lcd_update(), DBOP can't do more). Optimisation to YUV stuff is still possible though. The e200v2 scrollwheel is very improved due to the this and the previous speedup since the chance of getting the wheel read blocked is greatly decreased with faster updates. git-svn-id: svn://svn.rockbox.org/rockbox/trunk@22578 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/arm/as3525/button-e200v2-fuze.c')
-rw-r--r--firmware/target/arm/as3525/button-e200v2-fuze.c10
1 files changed, 8 insertions, 2 deletions
diff --git a/firmware/target/arm/as3525/button-e200v2-fuze.c b/firmware/target/arm/as3525/button-e200v2-fuze.c
index 6a9f02959c..5518f981e8 100644
--- a/firmware/target/arm/as3525/button-e200v2-fuze.c
+++ b/firmware/target/arm/as3525/button-e200v2-fuze.c
@@ -32,7 +32,7 @@
32#define WHEEL_COUNTER_DIV 4 32#define WHEEL_COUNTER_DIV 4
33#define ACCEL_INCREMENT 2 33#define ACCEL_INCREMENT 2
34#define ACCEL_SHIFT 2 34#define ACCEL_SHIFT 2
35#define BUTTON_DELAY 45 35#define BUTTON_DELAY 30
36#endif 36#endif
37 37
38#ifdef SANSA_E200V2 38#ifdef SANSA_E200V2
@@ -246,6 +246,11 @@ static int button_gpio(void)
246 int btn = BUTTON_NONE; 246 int btn = BUTTON_NONE;
247 if(hold_button) 247 if(hold_button)
248 return btn; 248 return btn;
249
250 /* disable DBOP output while changing GPIO pins that share lines with it */
251 DBOP_CTRL &= ~(1<<16);
252 button_delay();
253
249 /* set afsel, so that we can read our buttons */ 254 /* set afsel, so that we can read our buttons */
250 GPIOC_AFSEL &= ~(1<<2|1<<3|1<<4|1<<5|1<<6); 255 GPIOC_AFSEL &= ~(1<<2|1<<3|1<<4|1<<5|1<<6);
251 /* set dir so we can read our buttons (but reset the C pins first) */ 256 /* set dir so we can read our buttons (but reset the C pins first) */
@@ -276,7 +281,8 @@ static int button_gpio(void)
276 /* return to settings needed for lcd */ 281 /* return to settings needed for lcd */
277 GPIOC_DIR |= (1<<2|1<<3|1<<4|1<<5|1<<6); 282 GPIOC_DIR |= (1<<2|1<<3|1<<4|1<<5|1<<6);
278 GPIOC_AFSEL |= (1<<2|1<<3|1<<4|1<<5|1<<6); 283 GPIOC_AFSEL |= (1<<2|1<<3|1<<4|1<<5|1<<6);
279 284
285 DBOP_CTRL |= (1<<16); /* enable output again */
280 return btn; 286 return btn;
281} 287}
282 288