mirror of
https://github.com/apache/nuttx.git
synced 2026-05-28 20:08:15 +08:00
Add power-related debug output
This commit is contained in:
@@ -751,6 +751,37 @@ config DEBUG_NET_INFO
|
|||||||
|
|
||||||
endif # DEBUG_NET
|
endif # DEBUG_NET
|
||||||
|
|
||||||
|
config DEBUG_POWER
|
||||||
|
bool "Power-related Debug Features"
|
||||||
|
default n
|
||||||
|
---help---
|
||||||
|
Enable power-related debug features.
|
||||||
|
|
||||||
|
if DEBUG_POWER
|
||||||
|
|
||||||
|
config DEBUG_POWER_ERROR
|
||||||
|
bool "Power-related Error Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_ERROR
|
||||||
|
---help---
|
||||||
|
Enable power-related error output to SYSLOG.
|
||||||
|
|
||||||
|
config DEBUG_POWER_WARN
|
||||||
|
bool "Power-related Warnings Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_WARN
|
||||||
|
---help---
|
||||||
|
Enable power-related warning output to SYSLOG.
|
||||||
|
|
||||||
|
config DEBUG_POWER_INFO
|
||||||
|
bool "Power-related Informational Output"
|
||||||
|
default n
|
||||||
|
depends on DEBUG_INFO
|
||||||
|
---help---
|
||||||
|
Enable power-related informational output to SYSLOG.
|
||||||
|
|
||||||
|
endif # DEBUG_POWER
|
||||||
|
|
||||||
config DEBUG_WIRELESS
|
config DEBUG_WIRELESS
|
||||||
bool "Wireless Debug Features"
|
bool "Wireless Debug Features"
|
||||||
default n
|
default n
|
||||||
|
|||||||
@@ -233,6 +233,24 @@
|
|||||||
# define ninfo(x...)
|
# define ninfo(x...)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER_ERROR
|
||||||
|
# define pwrerr(format, ...) _err(format, ##__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define pwrerr(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER_WARN
|
||||||
|
# define pwrwarn(format, ...) _warn(format, ##__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define pwrwarn(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER_INFO
|
||||||
|
# define pwrinfo(format, ...) _info(format, ##__VA_ARGS__)
|
||||||
|
#else
|
||||||
|
# define pwrinfo(x...)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_WIRELESS_ERROR
|
#ifdef CONFIG_DEBUG_WIRELESS_ERROR
|
||||||
# define wlerr(format, ...) _err(format, ##__VA_ARGS__)
|
# define wlerr(format, ...) _err(format, ##__VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
@@ -795,6 +813,24 @@
|
|||||||
# define ninfo (void)
|
# define ninfo (void)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER_ERROR
|
||||||
|
# define pwrerr _err
|
||||||
|
#else
|
||||||
|
# define pwrerr (void)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER_WARN
|
||||||
|
# define pwrwarn _warn
|
||||||
|
#else
|
||||||
|
# define pwrwarn (void)
|
||||||
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER_INFO
|
||||||
|
# define pwrinfo _info
|
||||||
|
#else
|
||||||
|
# define pwrinfo (void)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_WIRELESS_ERROR
|
#ifdef CONFIG_DEBUG_WIRELESS_ERROR
|
||||||
# define wlerr _err
|
# define wlerr _err
|
||||||
#else
|
#else
|
||||||
@@ -1303,6 +1339,14 @@
|
|||||||
# define ninfodumpbuffer(m,b,n)
|
# define ninfodumpbuffer(m,b,n)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef CONFIG_DEBUG_POWER
|
||||||
|
# define pwrerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||||
|
# define pwrinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||||
|
#else
|
||||||
|
# define pwrerrdumpbuffer(m,b,n)
|
||||||
|
# define pwrinfodumpbuffer(m,b,n)
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef CONFIG_DEBUG_WIRELESS
|
#ifdef CONFIG_DEBUG_WIRELESS
|
||||||
# define wlerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
# define wlerrdumpbuffer(m,b,n) errdumpbuffer(m,b,n)
|
||||||
# define wlinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
# define wlinfodumpbuffer(m,b,n) infodumpbuffer(m,b,n)
|
||||||
|
|||||||
Reference in New Issue
Block a user