>> Essentially, you can do the same with both. > there is a a remote with LCD that is usable in nearly every menu.
Okay, so I guess that iriver remote code probably shouldn't be touched. Here's another patch (based on the previous one, but may work on its own) that gets the ipod accessory navigation buttons to work. This one is also not too clean. It's good enough to run on my ipod. If people are interested I can clean it up. Andrei >From 95c23bb5685f4079704971e0be7ab4e627e3a828 Mon Sep 17 00:00:00 2001 From: Purdea Andrei <and...@purdea.ro> Date: Tue, 29 Jan 2013 01:30:56 +0200 Subject: [PATCH] get navigation mode running with ipod accessories --- apps/iap.c | 19 +++++++++++++++++++ firmware/drivers/button.c | 3 ++- 2 files changed, 21 insertions(+), 1 deletion(-) diff --git a/apps/iap.c b/apps/iap.c index 6fe0a03..afe02b8 100644 --- a/apps/iap.c +++ b/apps/iap.c @@ -547,6 +547,25 @@ static void iap_handlepkt_mode2(unsigned int len, const unsigned char *buf) { iap_remotebtn |= BUTTON_RC_LEFT; } + if(buf[4] & 0x40) + { + iap_remotebtn |= BUTTON_MENU; + } + if(buf[4] & 0x80) + { + iap_remotebtn |= BUTTON_SELECT; + } + } + else if(len >= 6 && buf[5] != 0) + { + if(buf[5] & 0x01) + { + iap_remotebtn |= BUTTON_SCROLL_BACK; + } + if(buf[5] & 0x02) + { + iap_remotebtn |= BUTTON_SCROLL_FWD; + } } } diff --git a/firmware/drivers/button.c b/firmware/drivers/button.c index c165e8f..5adc0bf 100644 --- a/firmware/drivers/button.c +++ b/firmware/drivers/button.c @@ -668,7 +668,8 @@ int button_apply_acceleration(const unsigned int data) if (v > 1) delta *= v; } - + if (delta == 0) return 1; /* In case we didn't provide button data + (if the scroll event didn't come from the click wheel) */ return delta; } #endif /* HAVE_WHEEL_ACCELERATION */ -- 1.7.10.4
0001-get-navigation-mode-running-with-ipod-accessories.patch
Description: Binary data