diff options
Diffstat (limited to 'firmware/target')
-rw-r--r-- | firmware/target/coldfire/iaudio/lcd-remote-iaudio.c | 14 | ||||
-rw-r--r-- | firmware/target/coldfire/iriver/lcd-remote-iriver.c | 7 |
2 files changed, 9 insertions, 12 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 | } |
diff --git a/firmware/target/coldfire/iriver/lcd-remote-iriver.c b/firmware/target/coldfire/iriver/lcd-remote-iriver.c index cdc5acacca..29dbfad3db 100644 --- a/firmware/target/coldfire/iriver/lcd-remote-iriver.c +++ b/firmware/target/coldfire/iriver/lcd-remote-iriver.c | |||
@@ -19,8 +19,9 @@ | |||
19 | 19 | ||
20 | #include "config.h" | 20 | #include "config.h" |
21 | #include "system.h" | 21 | #include "system.h" |
22 | #include "kernel.h" | 22 | #include "file.h" |
23 | #include "lcd-remote.h" | 23 | #include "lcd-remote.h" |
24 | #include "scroll_engine.h" | ||
24 | 25 | ||
25 | /*** definitions ***/ | 26 | /*** definitions ***/ |
26 | 27 | ||
@@ -521,7 +522,7 @@ static void remote_tick(void) | |||
521 | 522 | ||
522 | if (--init_delay <= 0) | 523 | if (--init_delay <= 0) |
523 | { | 524 | { |
524 | queue_post(&remote_scroll_queue, REMOTE_INIT_LCD, 0); | 525 | queue_broadcast(SYS_REMOTE_PLUGGED, 0); |
525 | init_delay = 6; | 526 | init_delay = 6; |
526 | } | 527 | } |
527 | } | 528 | } |
@@ -537,7 +538,7 @@ static void remote_tick(void) | |||
537 | { | 538 | { |
538 | _remote_type = REMOTETYPE_UNPLUGGED; | 539 | _remote_type = REMOTETYPE_UNPLUGGED; |
539 | 540 | ||
540 | queue_post(&remote_scroll_queue, REMOTE_DEINIT_LCD, 0); | 541 | queue_broadcast(SYS_REMOTE_UNPLUGGED, 0); |
541 | } | 542 | } |
542 | } | 543 | } |
543 | } | 544 | } |