Include support for PCA9555 interrupt driven IO changes detection.

Currently using a signal, and a single notified task.
signal handling support moved to generic IO expander header (not pca specific)
This commit is contained in:
Sebastien Lorquet
2015-11-17 14:09:43 +01:00
parent 8242600e5e
commit 826aadbce8
4 changed files with 76 additions and 35 deletions
+12
View File
@@ -41,9 +41,16 @@
****************************************************************************/
#include <nuttx/config.h>
#include <nuttx/wqueue.h>
#if defined(CONFIG_IOEXPANDER)
#ifndef CONFIG_PCA9555_INT_DISABLE
#ifndef CONFIG_SCHED_WORKQUEUE
#error "Work queue support required. CONFIG_SCHED_WORKQUEUE must be selected."
#endif
#endif
/****************************************************************************
* Pre-processor Definitions
****************************************************************************/
@@ -249,6 +256,11 @@ struct ioexpander_ops_s
struct ioexpander_dev_s
{
FAR const struct ioexpander_ops_s *ops;
#ifdef CONFIG_IOEXPANDER_INT_ENABLE
struct work_s work; /* Supports the interrupt handling "bottom half" */
int sigpid; /* PID to be signaled in case of interrupt */
int sigval; /* signal to be sent in case of interrupt */
#endif
};
#endif //CONFIG_IOEXPANDER