summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-04 14:52:59 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-04 14:52:59 -0600
commit8d3f3c9fbf532d1e3ee63f35c2dfd1e7f26a3a14 (patch)
treefe516e2a748ddcb7b9ae535a65431f02e93a6dac /nuttx
parentc0fbf8e319b8648ef9f5b25161620c03aed9f37c (diff)
downloadpx4-nuttx-8d3f3c9fbf532d1e3ee63f35c2dfd1e7f26a3a14.tar.gz
px4-nuttx-8d3f3c9fbf532d1e3ee63f35c2dfd1e7f26a3a14.tar.bz2
px4-nuttx-8d3f3c9fbf532d1e3ee63f35c2dfd1e7f26a3a14.zip
WM8904 interface enable method now returns the previous interrupt state
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/include/nuttx/audio/wm8904.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/nuttx/include/nuttx/audio/wm8904.h b/nuttx/include/nuttx/audio/wm8904.h
index c2f0a78ed..6536d7789 100644
--- a/nuttx/include/nuttx/audio/wm8904.h
+++ b/nuttx/include/nuttx/audio/wm8904.h
@@ -128,6 +128,7 @@
#define WM8904_DETACH(s) ((s)->attach(s,NULL,NULL))
#define WM8904_ENABLE(s) ((s)->enable(s,true))
#define WM8904_DISABLE(s) ((s)->enable(s,false))
+#define WM8904_RESTORE(s,e) ((s)->enable(s,e))
/****************************************************************************
* Public Types
@@ -171,12 +172,13 @@ struct wm8904_lower_s
*
* attach - Attach or detach the WM8904 interrupt handler to the GPIO
* interrupt
- * enable - Enable or disable the GPIO interrupt
+ * enable - Enable or disable the GPIO interrupt. Returns the
+ * previous interrupt state.
*/
CODE int (*attach)(FAR const struct wm8904_lower_s *lower,
wm8904_handler_t isr, FAR void *arg);
- CODE void (*enable)(FAR const struct wm8904_lower_s *lower, bool enable);
+ CODE bool (*enable)(FAR const struct wm8904_lower_s *lower, bool enable);
};
/****************************************************************************