mirror of
https://github.com/apache/nuttx.git
synced 2026-06-06 16:50:55 +08:00
Centralize definitions associated with CONFIG_DEBUG_PWM
This commit is contained in:
@@ -693,6 +693,30 @@
|
||||
# define i2sllinfo(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM_ERROR
|
||||
# define pwmerr(format, ...) err(format, ##__VA_ARGS__)
|
||||
# define pwmllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define pwmerr(x...)
|
||||
# define pwmllerr(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM_WARN
|
||||
# define pwmwarn(format, ...) warn(format, ##__VA_ARGS__)
|
||||
# define pwmllwarn(format, ...) llwarn(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define pwmwarn(x...)
|
||||
# define pwmllwarn(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM_INFO
|
||||
# define pwminfo(format, ...) info(format, ##__VA_ARGS__)
|
||||
# define pwmllinfo(format, ...) llinfo(format, ##__VA_ARGS__)
|
||||
#else
|
||||
# define pwminfo(x...)
|
||||
# define pwmllinfo(x...)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_SENSORS_ERROR
|
||||
# define snerr(format, ...) err(format, ##__VA_ARGS__)
|
||||
# define snllerr(format, ...) llerr(format, ##__VA_ARGS__)
|
||||
@@ -1282,6 +1306,30 @@
|
||||
# define i2sllinfo (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM_ERROR
|
||||
# define pwmerr err
|
||||
# define pwmllerr llerr
|
||||
#else
|
||||
# define pwmerr (void)
|
||||
# define pwmllerr (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM_WARN
|
||||
# define pwmwarn warn
|
||||
# define pwmllwarn llwarn
|
||||
#else
|
||||
# define pwmwarn (void)
|
||||
# define pwmllwarn (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM_INFO
|
||||
# define pwminfo info
|
||||
# define pwmllinfo llinfo
|
||||
#else
|
||||
# define pwminfo (void)
|
||||
# define pwmllinfo (void)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_SENSORS_ERROR
|
||||
# define snerr err
|
||||
# define snllerr llerr
|
||||
@@ -1508,6 +1556,14 @@
|
||||
# define i2sinfodumpbuffer(m,b,n)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_PWM
|
||||
# define pwmerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||
# define pwminfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||
#else
|
||||
# define pwmerrdumpbuffer(m,b,n)
|
||||
# define pwminfodumpbuffer(m,b,n)
|
||||
#endif
|
||||
|
||||
#ifdef CONFIG_DEBUG_SENSORS
|
||||
# define snerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||
# define sninfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||
|
||||
+1
-2
@@ -72,8 +72,7 @@
|
||||
* number of pulses. This might be used, for example to support a stepper
|
||||
* motor. If the hardware will support a fixed pulse count, then this
|
||||
* configuration should be set to enable the capability.
|
||||
* CONFIG_DEBUG_PWM - If enabled (with CONFIG_DEBUG_FEATURES and, optionally,
|
||||
* CONFIG_DEBUG_INFO), this will generate output that can be use dto
|
||||
* CONFIG_DEBUG_PWM_INFO - This will generate output that can be use to
|
||||
* debug the PWM driver.
|
||||
*/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user