Button queue handling is split from main button driver

First half of
https://gerrit.rockbox.org/r/c/rockbox/+/570

Change-Id: Icc64dfd8194c18f69564ed5f8bf7dd70a4330eb9
This commit is contained in:
William Wilgus 2024-11-27 17:11:03 -05:00
parent 5954a2fd48
commit da9d67a0fe
30 changed files with 266 additions and 221 deletions

View file

@ -105,12 +105,12 @@ void scrollwheel(unsigned int wheel_value)
/* the wheel is more reliable if we don't send every change,
* every WHEEL_COUNTER_DIVth is basically one "physical click"
* which should make up 1 item in lists */
if (++counter >= WHEEL_COUNTER_DIV && queue_empty(&button_queue))
if (++counter >= WHEEL_COUNTER_DIV && button_queue_empty())
{
buttonlight_on();
backlight_on();
reset_poweroff_timer();
queue_post(&button_queue, btn, ((wheel_delta+1)<<24));
button_queue_post(btn, ((wheel_delta+1)<<24));
/* message posted - reset count and remember post */
counter = 0;
last_wheel_post = current_tick;