mirror of
https://github.com/Rockbox/rockbox.git
synced 2025-11-09 13:12:37 -05:00
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:
parent
5954a2fd48
commit
da9d67a0fe
30 changed files with 266 additions and 221 deletions
|
|
@ -109,8 +109,8 @@ void scrollstrip_isr(void)
|
|||
if (direction != scroll_dir)
|
||||
{
|
||||
/* post release event to the button queue */
|
||||
if (queue_empty(&button_queue))
|
||||
queue_post(&button_queue, direction|BUTTON_REL, 0);
|
||||
if (button_queue_empty())
|
||||
button_queue_post(direction|BUTTON_REL, 0);
|
||||
|
||||
scroll.rel = true;
|
||||
|
||||
|
|
@ -134,8 +134,8 @@ void scrollstrip_isr(void)
|
|||
count = 0;
|
||||
|
||||
/* post scrollstrip event to the button queue */
|
||||
if (queue_empty(&button_queue))
|
||||
queue_post(&button_queue, scroll_dir, 0);
|
||||
if (button_queue_empty())
|
||||
button_queue_post(scroll_dir, 0);
|
||||
|
||||
scroll.dir = scroll_dir;
|
||||
scroll.timeout = current_tick + SLIDER_REL_TIMEOUT;
|
||||
|
|
@ -264,9 +264,9 @@ int button_read_device(void)
|
|||
if (!scroll.rel)
|
||||
if (TIME_AFTER(current_tick, scroll.timeout))
|
||||
{
|
||||
if (queue_empty(&button_queue))
|
||||
if (button_queue_empty())
|
||||
{
|
||||
queue_post(&button_queue, scroll.dir|BUTTON_REL, 0);
|
||||
button_queue_post(scroll.dir|BUTTON_REL, 0);
|
||||
scroll.rel = true;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue