From b305f9186ab1d71728f8387ebed4da8c74a0c228 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Mon, 4 Aug 2014 14:52:59 -0600 Subject: [PATCH] WM8904 interface enable method now returns the previous interrupt state --- include/nuttx/audio/wm8904.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/include/nuttx/audio/wm8904.h b/include/nuttx/audio/wm8904.h index c2f0a78ed1..6536d77890 100644 --- a/include/nuttx/audio/wm8904.h +++ b/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); }; /****************************************************************************