diff --git a/Kconfig b/Kconfig index 56b30c63575..7f5fa8112df 100644 --- a/Kconfig +++ b/Kconfig @@ -1709,6 +1709,31 @@ config DEBUG_WATCHDOG_INFO Enable watchdog time informational output to SYSLOG. endif # DEBUG_WATCHDOG + +if DEBUG_MOTOR + +config DEBUG_MOTOR_ERROR + bool "Motor Error Output" + default n + depends on DEBUG_ERROR + ---help--- + Enable motor error output to SYSLOG. + +config DEBUG_MOTOR_WARN + bool "Motor Warnings Output" + default n + depends on DEBUG_WARN + ---help--- + Enable motor warning output to SYSLOG. + +config DEBUG_MOTOR_INFO + bool "Motor Informational Output" + default n + depends on DEBUG_INFO + ---help--- + Enable motor informational output to SYSLOG. + +endif # DEBUG_MOTOR endif # DEBUG_FEATURES config ARCH_HAVE_STACKCHECK diff --git a/include/debug.h b/include/debug.h index 9f2cb83eceb..f75a1fab849 100644 --- a/include/debug.h +++ b/include/debug.h @@ -731,6 +731,24 @@ # define wdinfo _none #endif +#ifdef CONFIG_DEBUG_MOTOR_ERROR +# define mtrerr _err +#else +# define mtrerr _none +#endif + +#ifdef CONFIG_DEBUG_MOTOR_WARN +# define mtrwarn _warn +#else +# define mtrwarn _none +#endif + +#ifdef CONFIG_DEBUG_MOTOR_INFO +# define mtrinfo _info +#else +# define mtrinfo _none +#endif + /* Buffer dumping macros do not depend on varargs */ #ifdef CONFIG_DEBUG_ERROR @@ -995,6 +1013,14 @@ # define wdinfodumpbuffer(m,b,n) #endif +#ifdef CONFIG_DEBUG_MOTOR +# define mtrerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n) +# define mtrinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n) +#else +# define mtrerrdumpbuffer(m,b,n) +# define mtrinfodumpbuffer(m,b,n) +#endif + /**************************************************************************** * Public Function Prototypes ****************************************************************************/