I've found that the interrupts aren't enabled since nothing updates them after btn_poll() marks the file descriptor structure as being polling. I've managed to make it work with this change.
This commit is contained in:
parent
f07420dedf
commit
7999822189
|
@ -769,7 +769,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||||
|
|
||||||
if (i >= CONFIG_BUTTONS_NPOLLWAITERS)
|
if (i >= CONFIG_BUTTONS_NPOLLWAITERS)
|
||||||
{
|
{
|
||||||
ierr("ERROR: Too man poll waiters\n");
|
ierr("ERROR: Too many poll waiters\n");
|
||||||
fds->priv = NULL;
|
fds->priv = NULL;
|
||||||
ret = -EBUSY;
|
ret = -EBUSY;
|
||||||
goto errout_with_dusem;
|
goto errout_with_dusem;
|
||||||
|
@ -797,6 +797,7 @@ static int btn_poll(FAR struct file *filep, FAR struct pollfd *fds,
|
||||||
}
|
}
|
||||||
|
|
||||||
errout_with_dusem:
|
errout_with_dusem:
|
||||||
|
btn_enable(priv);
|
||||||
btn_givesem(&priv->bu_exclsem);
|
btn_givesem(&priv->bu_exclsem);
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue