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:
Jan Pobrislo 2017-07-04 14:43:19 -06:00 committed by Gregory Nutt
parent f07420dedf
commit 7999822189
1 changed files with 2 additions and 1 deletions

View File

@ -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;
} }