WM8904: Add an option to control WM8904 register dumping
This commit is contained in:
parent
1f2428c087
commit
f4bc0ad99a
@ -131,6 +131,12 @@ config WM8904_WORKER_STACKSIZE
|
||||
int "WM8904 worker thread stack size"
|
||||
default 768
|
||||
|
||||
config WM8904_REGDUMP
|
||||
bool "WM8904 register dump"
|
||||
default n
|
||||
---help---
|
||||
Enable logic to dump the contents of all WM8904 registers.
|
||||
|
||||
endif # AUDIO_WM8904
|
||||
|
||||
config AUDIO_NULL
|
||||
|
@ -45,7 +45,7 @@ endif
|
||||
|
||||
ifeq ($(CONFIG_AUDIO_WM8904),y)
|
||||
CSRCS += wm8904.c
|
||||
ifeq ($(CONFIG_DEBUG_AUDIO),y)
|
||||
ifeq ($(CONFIG_WM8904_REGDUMP),y)
|
||||
CSRCS += wm8904_debug.c
|
||||
endif
|
||||
endif
|
||||
|
@ -132,7 +132,7 @@ struct wm8904_dev_s
|
||||
* Private Function Prototypes
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_DEBUG_AUDIO
|
||||
#ifndef CONFIG_WM8904_REGDUMP
|
||||
static
|
||||
#endif
|
||||
uint16_t wm8904_readreg(FAR struct wm8904_dev_s *priv,
|
||||
@ -259,7 +259,7 @@ static const struct audio_ops_s g_audioops =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifndef CONFIG_DEBUG_AUDIO
|
||||
#ifndef CONFIG_WM8904_REGDUMP
|
||||
static
|
||||
#endif
|
||||
uint16_t wm8904_readreg(FAR struct wm8904_dev_s *priv, uint8_t regaddr)
|
||||
|
@ -991,7 +991,7 @@
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_AUDIO
|
||||
#ifdef CONFIG_WM8904_REGDUMP
|
||||
struct wm8904_dev_s;
|
||||
uint16_t wm8904_readreg(FAR struct wm8904_dev_s *priv, uint8_t regaddr);
|
||||
#endif
|
||||
|
@ -54,6 +54,8 @@
|
||||
|
||||
#include "wm8904.h"
|
||||
|
||||
#ifdef CONFIG_WM8904_REGDUMP
|
||||
|
||||
/****************************************************************************
|
||||
* Pre-processor Definitions
|
||||
****************************************************************************/
|
||||
@ -202,7 +204,6 @@ static const struct wm8904_debug_s g_wm8904_debug[] =
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_AUDIO
|
||||
void wm8904_dump_registers(FAR struct audio_lowerhalf_s *dev,
|
||||
FAR const char *msg)
|
||||
{
|
||||
@ -217,4 +218,5 @@ void wm8904_dump_registers(FAR struct audio_lowerhalf_s *dev,
|
||||
g_wm8904_debug[i].regaddr));
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* CONFIG_WM8904_REGDUMP */
|
||||
|
@ -66,6 +66,8 @@
|
||||
* CONFIG_WM8904_NUM_BUFFERS - Preferred number of buffers
|
||||
* CONFIG_WM8904_WORKER_STACKSIZE - Stack size to use when creating the the
|
||||
* WM8904 worker thread.
|
||||
* CONFIG_WM8904_REGDUMP - Enable logic to dump all WM8904 registers to
|
||||
* the SYSLOG device.
|
||||
*/
|
||||
|
||||
/* Pre-requisites */
|
||||
@ -232,7 +234,7 @@ FAR struct audio_lowerhalf_s *
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
#ifdef CONFIG_DEBUG_AUDIO
|
||||
#ifdef CONFIG_WM8904_REGDUMP
|
||||
void wm8904_dump_registers(FAR struct audio_lowerhalf_s *dev,
|
||||
FAR const char *msg);
|
||||
#else
|
||||
|
Loading…
Reference in New Issue
Block a user