summaryrefslogtreecommitdiff
path: root/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
diff options
context:
space:
mode:
authorMichael Sevakis <jethead71@rockbox.org>2007-07-28 08:12:05 +0000
committerMichael Sevakis <jethead71@rockbox.org>2007-07-28 08:12:05 +0000
commit58fc279d2674b5d56fed6772f82cdf1e431088f1 (patch)
tree07a174bba7430b0ebc3c0f84d39ecb209eec1fc5 /firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
parent885cdfdeb98d54b2597e65f1b9ae9ab98da8286f (diff)
downloadrockbox-58fc279d2674b5d56fed6772f82cdf1e431088f1.tar.gz
rockbox-58fc279d2674b5d56fed6772f82cdf1e431088f1.zip
Scroll on main and remote with a single thread. Change the way system messages are defined before running out is an issue (which requires a full update of rockbox on the player).
git-svn-id: svn://svn.rockbox.org/rockbox/trunk@14035 a1c6a512-1295-4272-9138-f99709370657
Diffstat (limited to 'firmware/target/coldfire/iaudio/lcd-remote-iaudio.c')
-rw-r--r--firmware/target/coldfire/iaudio/lcd-remote-iaudio.c14
1 files changed, 5 insertions, 9 deletions
diff --git a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
index 939f7347c4..9940017dd9 100644
--- a/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
+++ b/firmware/target/coldfire/iaudio/lcd-remote-iaudio.c
@@ -18,8 +18,9 @@
18 ****************************************************************************/ 18 ****************************************************************************/
19#include "config.h" 19#include "config.h"
20#include "system.h" 20#include "system.h"
21#include "kernel.h" 21#include "file.h"
22#include "lcd-remote.h" 22#include "lcd-remote.h"
23#include "scroll_engine.h"
23 24
24/* The LCD in the iAudio M3/M5/X5 remote control is a Tomato LSI 0350 */ 25/* The LCD in the iAudio M3/M5/X5 remote control is a Tomato LSI 0350 */
25 26
@@ -397,7 +398,6 @@ static void remote_tick(void)
397{ 398{
398 static bool last_status = false; 399 static bool last_status = false;
399 static int countdown = 0; 400 static int countdown = 0;
400 static int init_delay = 0;
401 bool current_status; 401 bool current_status;
402 402
403 current_status = remote_detect(); 403 current_status = remote_detect();
@@ -416,20 +416,16 @@ static void remote_tick(void)
416 416
417 if (current_status) 417 if (current_status)
418 { 418 {
419 if (!(countdown % 8)) 419 if (!(countdown % 48))
420 { 420 {
421 if (--init_delay <= 0) 421 queue_broadcast(SYS_REMOTE_PLUGGED, 0);
422 {
423 queue_post(&remote_scroll_queue, REMOTE_INIT_LCD, 0);
424 init_delay = 6;
425 }
426 } 422 }
427 } 423 }
428 else 424 else
429 { 425 {
430 if (countdown == 0) 426 if (countdown == 0)
431 { 427 {
432 queue_post(&remote_scroll_queue, REMOTE_DEINIT_LCD, 0); 428 queue_broadcast(SYS_REMOTE_UNPLUGGED, 0);
433 } 429 }
434 } 430 }
435 } 431 }