summaryrefslogtreecommitdiff
path: root/nuttx/include
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-08-01 18:07:20 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-08-01 18:07:20 -0600
commitcd55d2ec95ba1ca94c64b13c993524b3b5ed731c (patch)
treebd9c74da2d8d0641bca74037086ebdc26fee3393 /nuttx/include
parent7b786e77b8d8f39915f45553a376655889778876 (diff)
downloadpx4-nuttx-cd55d2ec95ba1ca94c64b13c993524b3b5ed731c.tar.gz
px4-nuttx-cd55d2ec95ba1ca94c64b13c993524b3b5ed731c.tar.bz2
px4-nuttx-cd55d2ec95ba1ca94c64b13c993524b3b5ed731c.zip
Add debug logic to dump WM8904 registers
Diffstat (limited to 'nuttx/include')
-rw-r--r--nuttx/include/nuttx/audio/wm8904.h21
1 files changed, 21 insertions, 0 deletions
diff --git a/nuttx/include/nuttx/audio/wm8904.h b/nuttx/include/nuttx/audio/wm8904.h
index b913b1e00..ea8c386af 100644
--- a/nuttx/include/nuttx/audio/wm8904.h
+++ b/nuttx/include/nuttx/audio/wm8904.h
@@ -212,6 +212,27 @@ FAR struct audio_lowerhalf_s *
wm8904_initialize(FAR struct i2c_dev_s *i2c, FAR struct i2s_dev_s *i2s,
FAR const struct wm8904_lower_s *lower);
+/****************************************************************************
+ * Name: wm8904_dump_registers
+ *
+ * Description:
+ * Dump the contents of all WM8904 registers to the syslog device
+ *
+ * Input Parameters:
+ * dev - The device instance returned by wm8904_initialize
+ *
+ * Returned Value:
+ * None.
+ *
+ ****************************************************************************/
+
+#ifdef CONFIG_DEBUG_AUDIO
+void wm8904_dump_registers(FAR struct audio_lowerhalf_s *dev,
+ FAR const char *msg);
+#else
+# define wm8904_dump_registers(d)
+#endif
+
#undef EXTERN
#ifdef __cplusplus
}