···78787979#define CONFIG_KEYPAD IPOD_1G2G_PAD
80808181+/* define this if the unit uses a scrollwheel for navigation */
8182#define HAVE_SCROLLWHEEL
8383+/* define to activate advanced wheel acceleration code */
8484+#define HAVE_WHEEL_ACCELERATION
8585+/* define from which rotation speed [degree/sec] on the acceleration starts */
8686+#define WHEEL_ACCEL_START 360
8787+/* define type of acceleration (1 = ^2, 2 = ^3, 3 = ^4) */
8888+#define WHEEL_ACCELERATION 1
82898390/* Define this to enable morse code input */
8491#define HAVE_MORSE_INPUT
-47
firmware/target/arm/ipod/button-1g-3g.c
···4949#define WHEEL_TIMEOUT (HZ/4)
5050#endif
51515252-#ifdef IPOD_3G
5352#define WHEELCLICKS_PER_ROTATION 96
5453#define WHEEL_BASE_SENSITIVITY 6 /* Compute every ... clicks */
5554#define WHEEL_REPEAT_VELOCITY 45 /* deg/s */
···188187189188 last_wheel_usec = usec;
190189}
191191-#else
192192-static void handle_scroll_wheel(int new_scroll)
193193-{
194194- int wheel_keycode = BUTTON_NONE;
195195- static int prev_scroll = -1;
196196- static int direction = 0;
197197- static int count = 0;
198198- static int scroll_state[4][4] = {
199199- {0, 1, -1, 0},
200200- {-1, 0, 0, 1},
201201- {1, 0, 0, -1},
202202- {0, -1, 1, 0}
203203- };
204204-205205- if ( prev_scroll == -1 ) {
206206- prev_scroll = new_scroll;
207207- }
208208- else if (direction != scroll_state[prev_scroll][new_scroll]) {
209209- direction = scroll_state[prev_scroll][new_scroll];
210210- count = 0;
211211- }
212212- else {
213213- backlight_on();
214214- reset_poweroff_timer();
215215- if (++count == 6) { /* reduce sensitivity */
216216- count = 0;
217217- /* 1st..3rd Gen wheel has inverse direction mapping
218218- * compared to Mini 1st Gen wheel. */
219219- switch (direction) {
220220- case 1:
221221- wheel_keycode = BUTTON_SCROLL_BACK;
222222- break;
223223- case -1:
224224- wheel_keycode = BUTTON_SCROLL_FWD;
225225- break;
226226- default:
227227- /* only happens if we get out of sync */
228228- break;
229229- }
230230- }
231231- }
232232- if (wheel_keycode != BUTTON_NONE && queue_empty(&button_queue))
233233- queue_post(&button_queue, wheel_keycode, 0);
234234- prev_scroll = new_scroll;
235235-}
236236-#endif /* IPOD_3G */
237190238191static int ipod_3g_button_read(void)
239192{