Unify sensor debug. ADX driver was using input debug; LM75 and QENCODE that their own custom debug. Now all use CONFIG_DEBUG_SENSOR, sndbg()

This commit is contained in:
Gregory Nutt 2014-12-16 09:54:32 -06:00
parent ee9e8f0a20
commit db562b774a
6 changed files with 12 additions and 108 deletions

View File

@ -118,30 +118,6 @@
#ifdef HAVE_QENCODER
/* Debug ***************************************************************************/
/* Non-standard debug that may be enabled just for testing the quadrature encoder */
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_QENCODER
#endif
#ifdef CONFIG_DEBUG_QENCODER
# define qedbg dbg
# define qelldbg lldbg
# ifdef CONFIG_DEBUG_VERBOSE
# define qevdbg vdbg
# define qellvdbg llvdbg
# else
# define qevdbg(x...)
# define qellvdbg(x...)
# endif
#else
# define qedbg(x...)
# define qelldbg(x...)
# define qevdbg(x...)
# define qellvdbg(x...)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
@ -170,11 +146,11 @@ int qe_devinit(void)
{
/* Initialize a quadrature encoder interface. */
qevdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
ret = stm32_qeinitialize("/dev/qe0", TIMID);
if (ret < 0)
{
qedbg("stm32_qeinitialize failed: %d\n", ret);
sndbg("stm32_qeinitialize failed: %d\n", ret);
return ret;
}

View File

@ -118,30 +118,6 @@
#ifdef HAVE_QENCODER
/* Debug ***************************************************************************/
/* Non-standard debug that may be enabled just for testing the quadrature encoder */
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_QENCODER
#endif
#ifdef CONFIG_DEBUG_QENCODER
# define qedbg dbg
# define qelldbg lldbg
# ifdef CONFIG_DEBUG_VERBOSE
# define qevdbg vdbg
# define qellvdbg llvdbg
# else
# define qevdbg(x...)
# define qellvdbg(x...)
# endif
#else
# define qedbg(x...)
# define qelldbg(x...)
# define qevdbg(x...)
# define qellvdbg(x...)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
@ -170,11 +146,11 @@ int qe_devinit(void)
{
/* Initialize a quadrature encoder interface. */
qevdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
ret = stm32_qeinitialize("/dev/qe0", TIMID);
if (ret < 0)
{
qedbg("stm32_qeinitialize failed: %d\n", ret);
sndbg("stm32_qeinitialize failed: %d\n", ret);
return ret;
}

View File

@ -651,9 +651,9 @@ Where <subdir> is one of the following:
CONFIG_STM32_TIM8_QE=y : Use TIM8 as the quadrature encoder
CONFIG_STM32_TIM2_QE=y : (Or optionally TIM2)
See also apps/examples/README.tx. Special PWM-only debug options:
See also apps/examples/README.txt. Special debug options:
CONFIG_DEBUG_QENCODER
CONFIG_DEBUG_SENSORS
6. This example supports the watchdog timer test (apps/examples/watchdog)
but this must be manually enabled by selecting:

View File

@ -1438,9 +1438,9 @@ Where <subdir> is one of the following:
CONFIG_STM32_TIM8_QE=y : Use TIM8 as the quadrature encoder
CONFIG_STM32_TIM2_QE=y : (Or optionally TIM2)
See also apps/examples/README.tx. Special PWM-only debug options:
See also apps/examples/README.tx. Special debug options:
CONFIG_DEBUG_QENCODER
CONFIG_DEBUG_SENSORS
6. This example supports the watchdog timer test (apps/examples/watchdog)
but this must be manually enabled by selecting:

View File

@ -117,30 +117,6 @@
#ifdef HAVE_QENCODER
/* Debug ***************************************************************************/
/* Non-standard debug that may be enabled just for testing the quadrature encoder */
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_QENCODER
#endif
#ifdef CONFIG_DEBUG_QENCODER
# define qedbg dbg
# define qelldbg lldbg
# ifdef CONFIG_DEBUG_VERBOSE
# define qevdbg vdbg
# define qellvdbg llvdbg
# else
# define qevdbg(x...)
# define qellvdbg(x...)
# endif
#else
# define qedbg(x...)
# define qelldbg(x...)
# define qevdbg(x...)
# define qellvdbg(x...)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
@ -169,11 +145,11 @@ int qe_devinit(void)
{
/* Initialize a quadrature encoder interface. */
qevdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
ret = stm32_qeinitialize("/dev/qe0", TIMID);
if (ret < 0)
{
qedbg("stm32_qeinitialize failed: %d\n", ret);
sndbg("stm32_qeinitialize failed: %d\n", ret);
return ret;
}

View File

@ -118,30 +118,6 @@
#ifdef HAVE_QENCODER
/* Debug ***************************************************************************/
/* Non-standard debug that may be enabled just for testing the quadrature encoder */
#ifndef CONFIG_DEBUG
# undef CONFIG_DEBUG_QENCODER
#endif
#ifdef CONFIG_DEBUG_QENCODER
# define qedbg dbg
# define qelldbg lldbg
# ifdef CONFIG_DEBUG_VERBOSE
# define qevdbg vdbg
# define qellvdbg llvdbg
# else
# define qevdbg(x...)
# define qellvdbg(x...)
# endif
#else
# define qedbg(x...)
# define qelldbg(x...)
# define qevdbg(x...)
# define qellvdbg(x...)
#endif
/************************************************************************************
* Private Functions
************************************************************************************/
@ -170,11 +146,11 @@ int qe_devinit(void)
{
/* Initialize a quadrature encoder interface. */
qevdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
snvdbg("Initializing the quadrature encoder using TIM%d\n", TIMID);
ret = stm32_qeinitialize("/dev/qe0", TIMID);
if (ret < 0)
{
qedbg("stm32_qeinitialize failed: %d\n", ret);
sndbg("stm32_qeinitialize failed: %d\n", ret);
return ret;
}